4 #include "KVGELogReader.h"
5 #include "TObjString.h"
24 if (line.Contains(
"Cputime limit exceeded")) {
30 else if (line.Contains(
"Filesize limit exceeded")) {
36 else if (line.Contains(
"File size limit exceeded")) {
42 else if (line.Contains(
"Job received KILL signal")) {
46 else if (line.BeginsWith(
"* Requested")) {
50 else if (line.BeginsWith(
"* Consumed")) {
51 fInRequested = kFALSE;
54 else if (line.BeginsWith(
"* CPU time:")) {
57 else if (line.Contains(
"CpuUser ="))
59 else if (fInConsumed && line.BeginsWith(
"* vmem:"))
61 else if (fStatus !=
"KILLED" && line.BeginsWith(
"* Exit status:"))
63 else if (line.Contains(
"Jobname:"))
65 else if (line.Contains(
"DISK_REQ") || line.Contains(
"MEM_REQ"))
83 if (token ==
"CpuUser") {
86 else if (token ==
"VirtMem") {
90 else if (token ==
"DiskUsed") {
154 Double_t mem_use = vmem.
Next().Atof();
170 static Int_t MB = 2 << 9;
171 static Int_t GB = 2 << 19;
172 return (unit.BeginsWith(
"K") ? KB : (unit.BeginsWith(
"M") ? MB : GB));
218 static KVString units[] = {
"K",
"M",
"G" };
219 Int_t i = 0, index = -1;
220 while ((index = stor.Index(units[i])) < 0 && i < 2)
Read GE (Grid Engine) log files to extract status of batch jobs.
virtual Double_t ReadStorage(const KVString &stor)
virtual Int_t GetByteMultiplier(const KVString &unit)
virtual void ReadCPU(const KVString &line)
virtual void ReadKVCPU(const KVString &line)
virtual void ReadStatus(const KVString &line)
virtual void ReadScratchUsed(const KVString &line)
virtual void ReadMemUsed(const KVString &line)
KVString fStatus
status string
virtual void ReadLine(const KVString &line, Bool_t &)
Bool_t fOK
job OK or not ?
Double_t fCPUused
normalized used CPU time in seconds
Bool_t fGotStatus
set true when end of job infos have been read
Double_t fMemKB
used memory in KB
Double_t fCPUreq
requested CPU time in seconds
Double_t fScratchKB
used disk space in KB
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
void Begin(TString delim) const
KVString Next(Bool_t strip_whitespace=kFALSE) const
Int_t GetNValues(TString delim) const