ATLAS Offline Software
Loading...
Searching...
No Matches
checkJobs.py
Go to the documentation of this file.
1#! /usr/bin/env python
2
3# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4# Run beam spot determination on a set of ESD files using JobRunner
5#
6# Written by Juerg Beringer in July 2008.
7
8
9
10import sys
11import glob
12
13if len(sys.argv)!=3:
14 print ("Usage: checkJobs runnr name")
15 exit(1)
16runnr = sys.argv[1]
17name = sys.argv[2]
18prefix = runnr+'/'+name+'/'+'*/*-status.'
19prefixexit = runnr+'/'+name+'/'+'*/*-exit.'
20
21submitted = len(glob.glob(prefix+'SUBMITTED'))
22running = len(glob.glob(prefix+'RUNNING'))
23completed = len(glob.glob(prefix+'COMPLETED'))
24
25print ('%4i jobs SUBMITTED' % submitted)
26print ('%4i jobs RUNNING' % running)
27print ('%4i jobs COMPLETED' % completed)
28print ('%4i jobs with exit status 0' % len(glob.glob(prefixexit+'0')))