/[pdpsoft]/nl.nikhef.ndpf.groupviews/trunk/cores-torq2.awk
ViewVC logotype

Annotation of /nl.nikhef.ndpf.groupviews/trunk/cores-torq2.awk

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3112 - (hide annotations) (download)
Tue Sep 20 09:56:24 2016 UTC (5 years, 9 months ago) by templon
File size: 380 byte(s)
Summary: new file ... torque 2 format parsing of jobs line (for stoomboot)

1 templon 3112 BEGIN { tcores = 0; ocores = 0 }
2     $1 ~ /state/ { state = $3 ; njobs = 0}
3     $1 ~ /np/ { ncores = $3 }
4     $1 ~ /jobs/ {
5     njobs = NF - 2
6     }
7     $1 ~ /status/ {
8     tcores += ncores
9     if (state ~ /offline/) {
10     ocores += ncores - njobs
11     }
12     }
13    
14     END {
15     print tcores > "nslots.tmp"
16     system("mv nslots.tmp nslots")
17     print ocores > "oslots.tmp"
18     system("mv oslots.tmp oslots")
19     }

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