ignore fields
[monitor.git] / nodeinfo.py
index 3376257..2a1d5f0 100755 (executable)
@@ -86,7 +86,8 @@ def fb_print_nodeinfo(fbnode):
                fbnode['state'] = color_boot_state(get_current_state(fbnode))
        else:
                fbnode['state'] = "none"
-       fbnode['kernel'] = fbnode['kernel'].split()[2]
+       if len(fbnode['kernel'].split()) > 2:
+               fbnode['kernel'] = fbnode['kernel'].split()[2]
        print "\t       %(state)5s | %(ssh)5.5s | %(pcu)5.5s | %(bootcd)6.6s | %(category)8.8s | %(kernel)s" % fbnode
 
 def act_print_nodeinfo(actnode, header):
@@ -141,11 +142,15 @@ def pcu_print_info(pcuinfo, hostname):
                        print "\t telnet %s" % (reboot.pcu_name(pcuinfo))
                if pcuinfo['portstatus']['80'] == "open" or \
                        pcuinfo['portstatus']['443'] == "open":
-                       print "\t http://%s" % (reboot.pcu_name(pcuinfo))
+                       print "\t https://%s" % (reboot.pcu_name(pcuinfo))
+                       print "\t import %s.png" % (reboot.pcu_name(pcuinfo))
+                       print """\t mutt -s "crash for %s" -a %s.png sapanb@cs.princeton.edu < /dev/null""" % (hostname, reboot.pcu_name(pcuinfo))
                if pcuinfo['portstatus']['443'] == "open":
                        print "\t racadm.py -r %s -u %s -p '%s'" % (pcuinfo['ip'], pcuinfo['username'], pcuinfo['password'])
                        print "\t cmdhttps/locfg.pl -s %s -f iloxml/Reset_Server.xml -u %s -p '%s' | grep MESSAGE" % \
                                (reboot.pcu_name(pcuinfo), pcuinfo['username'], pcuinfo['password'])
+                       print "\t cmdhttps/locfg.pl -s %s -f iloxml/License.xml -u %s -p '%s' | grep MESSAGE" % \
+                               (reboot.pcu_name(pcuinfo), pcuinfo['username'], pcuinfo['password'])
                if pcuinfo['portstatus']['16992'] == "open":
                        print "\t ./cmdamt/remoteControl -A -verbose 'http://%s:16992/RemoteControlService' -user admin -pass '%s'" % (reboot.pcu_name(pcuinfo), pcuinfo['password'])