Exemple #1
0
#!/usr/bin/env python

import stats
import sys

#Month must be given as three letters with the first capatilized
month=sys.argv[1]
year=sys.argv[2]
myGroup=sys.argv[3]


print "%%%%%%%% Report for " + myGroup + " group " + month + " " + year + " %%%%%%%%"
print

theJobs = stats.getJobs(['stats/*'+month+'*'+year],True)
thisGroup = stats.Collect(theJobs,'account','JOBEND')[myGroup]
users = stats.Collect(thisGroup,'user')

print "--- Summary"
jobs=[(user,len(users[user]),sum(users[user]),stats.sumSU(users[user])) for user in users.keys()]
jobs.sort(key=lambda tup: tup[2])
for job in jobs:
  print "%10s: %5d jobs; %10.2f cpu-hours; %10.2f SU" % job
print "-----------------------------------------------------------"
print "%10s  %5d jobs; %10.2f cpu-hours; %10.2f SU" \
  % ("Total",len(thisGroup),sum(thisGroup),stats.sumSU(thisGroup))
print


queues = stats.Collect(thisGroup,'queue')
for queue in sorted(queues.keys()):
Exemple #2
0
#!/usr/bin/env python

import stats
import sys
import pylab

events=sys.argv[1]

jobs=stats.getJobs(['stats/events.'+events])

binwidth=1

Runtimes = list()
count=0
ThreeDay = 0
for job in jobs:
  try:
    if (job.status == "JOBEND"):
      count=count+1
      if(job.runtime>0.5 and job.runtime<168.0):
        Runtimes.append(job.runtime)
        if(job.runtime<72.5):
          ThreeDay = ThreeDay+1
  except:
    pass

print ThreeDay/count

Runtimes.sort()
pylab.title("All jobs")
pylab.xlabel("Run time (hours)")
Exemple #3
0
#!/usr/bin/env python

import stats
import sys

# Month must be given as three letters with the first capatilized
month = sys.argv[1]
year = sys.argv[2]
myGroup = sys.argv[3]


print "%%%%%%%% Report for " + myGroup + " group " + month + " " + year + " %%%%%%%%"
print

theJobs = stats.getJobs(["stats/*" + month + "*" + year])
thisGroup = stats.Collect(theJobs, "group", "JOBEND")[myGroup]
users = stats.Collect(thisGroup, "user")

print "--- Summary"
jobs = [(user, len(users[user]), sum(users[user])) for user in users.keys()]
jobs.sort(key=lambda tup: tup[2])
for job in jobs:
    print "%10s: %5d jobs; %10.2f cpu-hours" % job
print "--------------------------------------------"
print "%10s  %5d jobs; %10.2f cpu-hours" % ("Total", len(thisGroup), sum(thisGroup))
print


queues = stats.Collect(thisGroup, "queue")
for queue in sorted(queues.keys()):
    print "--- " + queue.upper()
Exemple #4
0
#!/usr/bin/env python

import stats
import sys

year = sys.argv[1]

theJobs = stats.getJobs(["stats/*" + year])
print "%%%%%%%% Report for " + year + " %%%%%%%%"
print


print "--- Summary"
groups = stats.Collect(theJobs, "group", "JOBEND")
jobs = [(group, len(groups[group]), sum(groups[group])) for group in groups.keys()]
jobs.sort(key=lambda tup: tup[2])
for job in jobs:
    print "%18s: %7d jobs; %12.2f cpu-hours" % job
print "--------------------------------------------------------"
# print "%10s  %5d jobs; %10.2f cpu-hours" % ("",len(groups.values()),sum(groups.values()))
print


queues = stats.Collect(theJobs, "queue", "JOBEND")
for queue in sorted(queues.keys()):
    groups = stats.Collect(queues[queue], "group")
    print "--- " + queue.upper()

    jobs = [(group, len(groups[group]), sum(groups[group])) for group in groups.keys()]
    jobs.sort(key=lambda tup: tup[2])
    for job in jobs: