4#include "KVGELogReader.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")) {
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") {
141 if (
line.GetNValues(
":(") < 3) {
170 static Int_t MB = 2 << 9;
171 static Int_t GB = 2 << 19;
218 static KVString units[] = {
"K",
"M",
"G" };
220 while ((
index = stor.
Index(units[i])) < 0 && i < 2)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
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
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(EStripType s, char c)
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const