git://git.onelab.eu
/
monitor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
d96fd21
)
+ format time record
author
Stephen Soltesz
<soltesz@cs.princeton.edu>
Wed, 8 Aug 2007 13:26:24 +0000
(13:26 +0000)
committer
Stephen Soltesz
<soltesz@cs.princeton.edu>
Wed, 8 Aug 2007 13:26:24 +0000
(13:26 +0000)
dumpact.py
patch
|
blob
|
history
diff --git
a/dumpact.py
b/dumpact.py
index
6a9c3b6
..
fd5be08
100755
(executable)
--- a/
dumpact.py
+++ b/
dumpact.py
@@
-18,10
+18,11
@@
def main():
sorted_keys.sort()
for nodename in sorted_keys:
diag_nodelist = act_all[nodename]
sorted_keys.sort()
for nodename in sorted_keys:
diag_nodelist = act_all[nodename]
- lb = plcdb_hn2lb[nodename]
- if lb not in sickdb:
- sickdb[lb] = {}
- sickdb[lb][nodename] = diag_nodelist
+ if nodename in plcdb_hn2lb:
+ lb = plcdb_hn2lb[nodename]
+ if lb not in sickdb:
+ sickdb[lb] = {}
+ sickdb[lb][nodename] = diag_nodelist
sorted_keys = sickdb.keys()
sorted_keys.sort()
sorted_keys = sickdb.keys()
sorted_keys.sort()
@@
-37,12
+38,16
@@
def main():
l_ev = act_all[nodename]
print " %s" % nodename
for diag_node in l_ev:
l_ev = act_all[nodename]
print " %s" % nodename
for diag_node in l_ev:
- #s_time=time.strftime("%Y/%m/%d %H:%M:%S",time.gmtime(ev[1]))
keys = diag_node.keys()
keys.sort()
for k in keys:
if "message" not in k and "msg" not in k:
keys = diag_node.keys()
keys.sort()
for k in keys:
if "message" not in k and "msg" not in k:
- print "\t'%s' : %s" % (k, diag_node[k])
+ if 'time' in k:
+ s_time=time.strftime("%Y/%m/%d %H:%M:%S",
+ time.gmtime(diag_node[k]))
+ print "\t'%s' : %s" % (k, s_time)
+ else:
+ print "\t'%s' : %s" % (k, diag_node[k])
print "\t--"
print s_nodenames
print "\t--"
print s_nodenames