jablonka.czprosek.czf

xenstats

Subversion Repositories:
[/] [xenupdate.py] - Diff between revs 3 and 5

Show entire file Ignore whitespace

Rev 3 Rev 5
Line 16... Line 16...
name,id,mem,cpu,state,cputime=re.split("[\t ]+",domain) name,id,mem,cpu,state,cputime=re.split("[\t ]+",domain)
cputime=int(float(cputime)*1000) cputime=int(float(cputime)*1000)
rrd=basename+name+".rrd" rrd=basename+name+".rrd"
if not os.access(rrd,os.F_OK): if not os.access(rrd,os.F_OK):
#this should preserve rrd file reset when there is some problem #this should preserve rrd file reset when there is some problem
time.sleep(10) #time.sleep(10)
if not os.access(rrd,os.F_OK): if not os.access(rrd,os.F_OK):
# 10 days of exact archive, 42 days of 1 hr RRD, 1000 days of 1 day RRD #time.sleep(10)
  # 10 days of exact archive, 42 days of 1 hr RRD, 1000 days of 1 day RRD
os.system("rrdtool create "+rrd+" --step 60 DS:cpu:COUNTER:666:0:10000"+ os.system("rrdtool create "+rrd+" --step 60 DS:cpu:COUNTER:666:0:10000"+
" RRA:LAST:0.5:1:15000"+ " RRA:LAST:0.5:1:1500000"+
" RRA:MIN:0.5:60:1000 RRA:MIN:0.5:1440:1000"+ " RRA:MIN:0.5:60:1000 RRA:MIN:0.5:1440:1000"+
" RRA:MAX:0.5:60:1000 RRA:MAX:0.5:1440:1000"+ " RRA:MAX:0.5:60:1000 RRA:MAX:0.5:1440:1000"+
" RRA:AVERAGE:0.5:60:1000 RRA:AVERAGE:0.5:1440:1000") " RRA:AVERAGE:0.5:60:1000 RRA:AVERAGE:0.5:1440:1000")
   
#this should preserve rrd file reset when there is some problem #this should preserve rrd file reset when there is some problem

Powered by WebSVN 2.2.1