3 # Read in the act_* databases and print out a human readable version
9 from monitor.wrapper import plccache
13 act_all = database.dbLoad(sys.argv[1])
14 plcdb_hn2lb = plccache.plcdb_hn2lb
18 sorted_keys = act_all.keys()
20 for nodename in sorted_keys:
21 diag_nodelist = act_all[nodename]
22 if nodename in plcdb_hn2lb:
23 lb = plcdb_hn2lb[nodename]
26 sickdb[lb][nodename] = diag_nodelist
28 sorted_keys = sickdb.keys()
30 for loginbase in sorted_keys:
31 nodedict = sickdb[loginbase]
32 sort_nodekeys = nodedict.keys()
34 print "%s :" % loginbase
35 for nodename in sort_nodekeys:
36 if len(act_all[nodename]) == 0:
37 print "%20s : %-40s has no events" % (loginbase, nodename)
39 l_ev = act_all[nodename]
40 print " %s" % nodename
41 for diag_node in l_ev:
42 keys = diag_node.keys()
45 if "message" not in k and "msg" not in k:
47 s_time=time.strftime("%Y/%m/%d %H:%M:%S", time.gmtime(diag_node[k]))
48 print "\t'%s' : %s" % (k, s_time)
50 print "\t'%s' : %s" % (k, diag_node[k])
56 if __name__ == '__main__':