kernel_version = Field(String,default=None)
bootcd_version = Field(String,default=None)
boot_server = Field(String,default=None)
+ install_date = Field(String,default=None)
nm_status = Field(String,default=None)
fs_status = Field(String,default=None)
iptables_status = Field(String,default=None)
echo ' "bmlog":"'`ls /tmp/bm.log`'",'
echo ' "bootcd_version":"'`cat /mnt/cdrom/bootme/ID`'",'
echo ' "boot_server":"'`cat /mnt/cdrom/bootme/BOOTSERVER`'",'
+ echo ' "install_date":"'`python -c "import os,time,stat; print time.ctime(os.stat('/usr/boot/plnode.txt')[stat.ST_CTIME])"`'",'
echo ' "nm_status":"'`ps ax | grep nm.py | grep -v grep`'",'
echo ' "dns_status":"'`host boot.planet-lab.org 2>&1`'",'
echo ' "iptables_status":"'`iptables -t mangle -nL | awk '$1~/^[A-Z]+$/ {modules[$1]=1;}END{for (k in modules) {if (k) printf "%s ",k;}}'`'",'
else:
values.update({'kernel_version': "", 'bmlog' : "", 'bootcd_version' : '',
'boot_server' : '',
+ 'install_date' : '',
'nm_status' : '',
'fs_status' : '',
'uptime' : '',
fbnode['bootcd_version'] = "unknown"
if not fbnode['boot_server']:
fbnode['boot_server'] = "unknown"
+ if not fbnode['install_date']:
+ fbnode['install_date'] = "unknown"
fbnode['pcu'] = color_pcu_state(fbnode)
if not fields:
#print "ERROR!!!!!!!!!!!!!!!!!!!!!"
pass
- print "%(hostname)-45s | %(date_checked)11.11s | %(boot_state)5.5s| %(observed_status)8.8s | %(ssh_status)5.5s | %(pcu)6.6s | %(bootcd_version)6.6s | %(boot_server)s | %(kernel_version)s" % fbnode
+ print "%(hostname)-45s | %(date_checked)11.11s | %(boot_state)5.5s| %(observed_status)8.8s | %(ssh_status)5.5s | %(pcu)6.6s | %(bootcd_version)6.6s | %(boot_server)s | %(install_date)s | %(kernel_version)s" % fbnode
else:
format = ""
for f in fields:
--- /dev/null
+\r
+ALTER TABLE findbadnoderecord ADD COLUMN install_date varchar DEFAULT NULL;\r
+ALTER TABLE findbadnoderecord_history ADD COLUMN install_date varchar DEFAULT NULL;\r
kernel_version = widgets.CheckBox(label="Kernel")
bootcd_version = widgets.CheckBox(label="BootCD")
boot_server = widgets.CheckBox(label="Boot Server")
+ install_date = widgets.CheckBox(label="Installation Date")
observed_status = widgets.CheckBox(label="Observed Status")
uptime = widgets.CheckBox(label="Uptime")
traceroute = widgets.CheckBox(label="Traceroute")
<th>kernel</th>
<th>BootCD</th>
<th>Boot Server</th>
+ <th>Installation Date</th>
<th>last_contact</th>
</span>
<span py:if="node is not None">
<td nowrap="true" py:content="node.kernel"></td>
<td nowrap="true" py:content="node.node.bootcd_version"></td>
<td nowrap="true" py:content="node.node.boot_server"></td>
+ <td nowrap="true" py:content="node.node.install_date"></td>
<td id="node-${node.node.observed_status}" py:content="diff_time(node.node.plc_node_stats['last_contact'])"></td>
</span>
</span>
<th class="sortable plekit_table">kernel</th>
<th class="sortable plekit_table">BootCD</th>
<th class="sortable plekit_table">Boot Server</th>
+ <th class="sortable plekit_table">Installation Date</th>
<th class="sortable plekit_table">Last_contact</th>
</tr>
</thead>
<td nowrap="true" py:content="node.kernel"></td>
<td nowrap="true" py:content="node.node.bootcd_version"></td>
<td nowrap="true" py:content="node.node.boot_server"></td>
+ <td nowrap="true" py:content="node.node.install_date"></td>
<td id="node-${node.node.observed_status}" py:content="diff_time(node.node.plc_node_stats['last_contact'])"></td>
</span>
</tr>