VIRGOAccounting

From PDP/Grid Wiki
Revision as of 09:32, 10 April 2018 by Templon@nikhef.nl (talk | contribs) (Created page with "VIRGO want to have daily accounting. This page documents how it's set up. It's a bit of a hack, suggestions for improvement are welcome. The ingredients needed: # cpu time,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

VIRGO want to have daily accounting. This page documents how it's set up. It's a bit of a hack, suggestions for improvement are welcome.

The ingredients needed:

  1. cpu time, wall time, number of cores, and user name for each VIRGO job on day N
  2. mapping of usernames to "real person" names

Where do we get this:

  1. the torque accounting log files are already on alento (for the log monitoring script)
  2. the mappings are located on the CEs.

Mappings

For the mappings, there is already a little program gwhois2 located in ~templon/bin that will spit out the certificate subject associated; this is run in a script to find all VIRGO active mappings and spit out, for each username, the CN part of the certificate subject. Due to the permissions on the mappings, it has to be run as root.

 [root@juk ~]# ~templon/bin/virmap
 virgo000,username removed 1 skip@infn.it
 virgo001,username removed 2 charlie@infn.it
 virgo002,username removed 3 buffy@infn.it
 virgo003,username removed 4
 virgo075,pilot/osg-ligo-1.t2.ucsd.edu

The challenge is to have the script run as root, but show up somewhere in userland so that the information can be used for the mapping. We don't expect this information to change rapidly, so for the moment, the script is running as a cron job on juk, and the results are being mailed to JT, who can adapt the other bit of scriptology as needed if there are changes.

 [root@juk ~]# crontab -l
 MAILTO=templon@nikhef.nl
 33 11 * * * ~templon/bin/virmap