Created
February 23, 2011 20:34
-
-
Save djw8605/841129 to your computer and use it in GitHub Desktop.
SQL Query to get number of jobs running on glidein
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from JobUsageRecord limit 100; | |
select * from JobUsageRecord where ResourceType = 'Batch' limit 100; | |
Probe name | |
condor-glidein:glidein.unl.edu | |
Get userids: | |
select distinct LocalUserId from JobUsageRecord where ResourceType = 'Batch' limit 200; | |
Get submit hosts: | |
select distinct SubmitHost from JobUsageRecord where ResourceType = 'Batch' limit 100; | |
select * from JobUsageRecord where ResourceType = 'Batch' and GlobalJobId like '*glidein.unl.edu*' limit 100; | |
select ProbeName, SUM(Njobs) as TotalJobs, SUM(WallDuration) as TotalWallDuration from ProbeSummary WHERE EndTime >= '2010-01-01' AND ProbeName LIKE '%glidein%' Group by ProbeName | |
select ProbeName, SUM(Njobs) as TotalJobs, SUM(WallDuration/3600) as TotalWallDuration from ProbeSummary WHERE EndTime >= '2010-01-01' AND ProbeName LIKE '%glidein%' Group by ProbeName | |
select * from ProbeSummary WHERE ProbeName LIKE '%glidein%' order by EndTime DESC limit 0,100 | |
# ProbeName TotalJobs TotalWallDuration | |
1 condor-glidein:glidein.unl.edu 8025030 8,954,799 | |
Number of records = 1 | |
# ProbeName TotalJobs TotalWallDuration | |
1 condor:cpass.unl.edu 126577 67,856 | |
Number of records = 1 | |
Number of Jobs: | |
8025030 + 126577 = 8151607 | |
CPUHours: | |
8,954,799 + 67,856 = 9022655 | |
Get VO data: | |
select * from VOProbeSummary limit 10 | |
select * from VOProbeSummary where ProbeName = condor-glidein:glidein.unl.edu; | |
select * from VOProbeSummary where ProbeName = 'condor-glidein:glidein.unl.edu' limit 100; | |
select * from VOProbeSummary where ProbeName = 'condor-glidein:glidein.unl.edu' and VOName = 'bockelman' order by EndTime desc limit 100; | |
select SUM(WallDuration) SUM(NJobs) from VOProbeSummary where ProbeName = 'condor-glidein:glidein.unl.edu' and VOName = 'bockelman' order by EndTime group by CommonName desc limit 100; | |
select CommonName, SUM(WallDuration/3600) as TotalWallTime, SUM(Njobs) as TotalJobs from VOProbeSummary where ProbeName = 'condor-glidein:glidein.unl.edu' and VOName = 'bockelman' Group by CommonName; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment