git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changes for 3.0
[monitor.git]
/
showlatlon.py
diff --git
a/showlatlon.py
b/showlatlon.py
index
4289e3d
..
ea0891c
100755
(executable)
--- a/
showlatlon.py
+++ b/
showlatlon.py
@@
-12,7
+12,6
@@
import comon
from nodecommon import color_pcu_state, datetime_fromstr
from nodehistory import get_filefromglob
import time
from nodecommon import color_pcu_state, datetime_fromstr
from nodehistory import get_filefromglob
import time
-import traceback
# region
# total
# region
# total
@@
-33,7
+32,7
@@
def gethardwarequality(nodename, fb):
return "BAD" # "cpu_slow",
if cstat['memsize'] != "null" and float(cstat['memsize']) < 2.8:
return "BAD" # "mem_small",
return "BAD" # "cpu_slow",
if cstat['memsize'] != "null" and float(cstat['memsize']) < 2.8:
return "BAD" # "mem_small",
- if cstat['disksize'] != "null" and float(cstat['disksize']) <
30
0.0:
+ if cstat['disksize'] != "null" and float(cstat['disksize']) <
25
0.0:
return "BAD" # "disk_small",
if cstat['disksize'] == "null" and \
return "BAD" # "disk_small",
if cstat['disksize'] == "null" and \
@@
-44,7
+43,7
@@
def gethardwarequality(nodename, fb):
try:
if float(cstat['cpuspeed']) >= 2.2 and \
float(cstat['memsize']) >= 2.8 and \
try:
if float(cstat['cpuspeed']) >= 2.2 and \
float(cstat['memsize']) >= 2.8 and \
- (cstat['disksize'] == "null" or float(cstat['disksize']) >=
30
0.0):
+ (cstat['disksize'] == "null" or float(cstat['disksize']) >=
25
0.0):
return "A-OK"
except:
print cstat
return "A-OK"
except:
print cstat
@@
-150,7
+149,6
@@
def main():
'hardware' : gethardwarequality(hostname, fb),
'pcuok' : color_pcu_state(fb['nodes'][hostname]['values']) }
#except:
'hardware' : gethardwarequality(hostname, fb),
'pcuok' : color_pcu_state(fb['nodes'][hostname]['values']) }
#except:
- # print traceback.print_exc()
# print args
# print fb['nodes'][hostname]['values']
results.append("%(cc)7s %(status)8s %(hardware)8s %(pcuok)8s %(site)15s %(host)42s " % args)
# print args
# print fb['nodes'][hostname]['values']
results.append("%(cc)7s %(status)8s %(hardware)8s %(pcuok)8s %(site)15s %(host)42s " % args)