/[pdpsoft]/nl.nikhef.ndpf.groupviews/trunk/ndpf-gv-dbupdate
ViewVC logotype

Diff of /nl.nikhef.ndpf.groupviews/trunk/ndpf-gv-dbupdate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2622 by templon, Tue Jun 26 09:43:49 2012 UTC revision 2623 by templon, Wed May 22 14:50:02 2013 UTC
# Line 141  for r in rl: Line 141  for r in rl:
141      runningjobs[r[0]] = r[1]      runningjobs[r[0]] = r[1]
142    
143  rtot = sum(runningjobs.values())  rtot = sum(runningjobs.values())
144  runningjobs['total'] = rtot  totslots = int(open(DATADIR+'nslots').read())
145    offlineslots = int(open(DATADIR+'oslots').read())
146    runningjobs['offline'] = offlineslots
147    runningjobs['unused'] = totslots - offlineslots - rtot
148    runningjobs['total'] = totslots
149    
150  running_files = glob.glob(DATADIR+'*.running.rrd')  running_files = glob.glob(DATADIR+'*.running.rrd')
151  for db in running_files:  for db in running_files:
# Line 194  else: Line 198  else:
198          rollover = (now - stl[-2])/2.          rollover = (now - stl[-2])/2.
199      elif len(rl) == 1:      elif len(rl) == 1:
200          rollover = now - rl[0][0]          rollover = now - rl[0][0]
201          print 'used time since last start'          if DEBUG: print 'used time since last start'
202      else:      else:
203          rollover = 600 # if nothing seen, all we know is, not in last ten minutes (keep_completed)          rollover = 600 # if nothing seen, all we know is, not in last ten minutes (keep_completed)
204          print 'set to 600, no comp_times seen'          if DEBUG: print 'set to 600, no comp_times seen'
205    
206  # print "len(stl), rollover:", len(stl), rollover  # print "len(stl), rollover:", len(stl), rollover
207  rrdtool.update(DATADIR + "rollover" + '.waittime.rrd',  rrdtool.update(DATADIR + "rollover" + '.waittime.rrd',
# Line 223  else: Line 227  else:
227  rrdtool.update(DATADIR + "lastroll" + '.waittime.rrd',  rrdtool.update(DATADIR + "lastroll" + '.waittime.rrd',
228                     'N:' + repr(int(lastroll)))                     'N:' + repr(int(lastroll)))
229    
230    cx.close()
231    
232  ### Local Variables: ***  ### Local Variables: ***
233  ### mode: python ***  ### mode: python ***
234  ### End: ***  ### End: ***

Legend:
Removed from v.2622  
changed lines
  Added in v.2623

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28