In [1]:
import htcondor
import classad
In [2]:
import time
now = time.mktime(time.localtime())
In [3]:
schedd = htcondor.Schedd()
shist=schedd.history(
constraint='CompletionDate > %d' % (now - 24*3600),
projection=['ProcId', 'ClusterId', 'JobStatus', "AccountingGroup", "Owner", "CompletionDate", 'CpusProvisioned',
'CpusUsage', 'JobCurrentStartDate'],
match=2048,
)
In [4]:
import pandas as pd
import numpy as np
import matplotlib as plot
In [5]:
cpusul = list()
for ad in shist:
if 'CpusUsage' in ad.keys():
cpusul.append(ad['CpusUsage'])
In [6]:
c = pd.Series(cpusul)
c.hist(bins=64, range=(0.98, 1.02))
Out[6]:
<Axes: >
In [ ]: