/[pdpsoft]/nl.nikhef.ndpf.3maand/trunk/3maand.py
ViewVC logotype

Diff of /nl.nikhef.ndpf.3maand/trunk/3maand.py

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

revision 2447 by templon, Fri Nov 4 13:06:45 2011 UTC revision 2448 by templon, Fri Nov 4 13:28:59 2011 UTC
# Line 1  Line 1 
1  #!/usr/bin/env python  #!/usr/bin/env python
2  # $Id: ndpf-gv-mkplots 2429 2011-09-09 19:27:11Z templon $  # $Id$
3  # Source: $URL: svn+ssh://svn@ndpfsvn.nikhef.nl/repos/pdpsoft/nl.nikhef.ndpf.groupviews/branches/RB-2.1.1/ndpf-gv-mkplots $  # Source: $URL$
4  # J. A. Templon, NIKHEF/PDP 2011  # J. A. Templon, NIKHEF/PDP 2011
5    
6  # script to do yearly WLCG accounting and format it like I want.  # script to do yearly WLCG accounting and format it like I want.
7  # note : sorting logic is based on a by-month grouping; if you change that,  # note : sorting logic is based on a by-month grouping; if you change that,
8  #        you'll need to change some of the python code.  #        you'll need to change some of the python code.
9    
10    # constants to be changed each year
11    
12    pledges = {          # pledges in HS06 units
13        'alice' : 1844,
14        'atlas' : 17580,
15        'lhcb'  : 8827
16        }
17    total_cap = 39671
18    
19  import optparse  import optparse
20    
21  p = optparse.OptionParser(description="Program to generate a CSV dump of computing usage " + \  p = optparse.OptionParser(description="Program to generate a CSV dump of computing usage " + \
# Line 82  groups = { Line 91  groups = {
91      'lhcb' : ['lhcb', 'lhcbpil', 'lhcbprd', 'lhcbsgm']      'lhcb' : ['lhcb', 'lhcbpil', 'lhcbprd', 'lhcbsgm']
92      }      }
93    
 pledges = {          # pledges in HS06 units  
     'alice' : 1844,  
     'atlas' : 17580,  
     'lhcb'  : 8827  
     }  
   
94  ACCBASECMD = ['/usr/local/bin/accuse']  ACCBASECMD = ['/usr/local/bin/accuse']
95  ACCBASEARG = ('--byendtime -dbpasswd ' + opts.dbpassw + ' -f lcg -m').split()  ACCBASEARG = ('--byendtime -dbpasswd ' + opts.dbpassw + ' -f lcg -m').split()
96    
# Line 250  while monthstart < EDATE: Line 253  while monthstart < EDATE:
253      monthstart = monthend + ONEDAY      monthstart = monthend + ONEDAY
254    
255  writer.writerow([' ',' '])  writer.writerow([' ',' '])
256    
257    writer.writerow(["Pledges and capacties (HS06)"])
258    writer.writerow(["Group",   "power"])
259    writer.writerow(["ATLAS",   pledges["atlas"]])
260    writer.writerow(["LHCb",    pledges["lhcb"] ])
261    writer.writerow(["ALICE",   pledges["alice"]])
262    writer.writerow(["farmcap", total_cap])
263    

Legend:
Removed from v.2447  
changed lines
  Added in v.2448

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