KaliVeda  1.13/01
Heavy-Ion Analysis Toolkit
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
KVGELogReader Class Reference

Read GE (Grid Engine) log files to extract status of batch jobs.

Created by KVClassFactory on Fri Nov 25 09:53:18 2011 Author: John Frankland

Updated to handle correctly new format of end-of-job informations:

Submitted on: Tue Apr 14 11:27:31 CEST 2020 *
Started on: Tue Apr 14 11:27:42 CEST 2020 *
Ended on: Tue Apr 14 12:02:19 CEST 2020 *
Exit status: 0 *
Requested *
CPU cores: 1 core(s) *
CPU time: 00:33:20 (2000 seconds) *
Consumed *
wallclock: 00:34:37 (2077 seconds) *
CPU time: 00:32:14 (1934 seconds) *
CPU scaling factor: 10.430000 *
normalized CPU time: 05:36:18 (20178 HS06 seconds) *
CPU efficiency: 93 % (1) *
vmem: 1.284 GB (2) *
maxvmem: 1.284 GB (2) *
maxrss: 407.348 MB (2) *
const long double s
Definition: KVUnits.h:94

Definition at line 39 of file KVGELogReader.h.

Public Member Functions

 KVGELogReader ()
 
virtual ~KVGELogReader ()
 
virtual Bool_t Incomplete () const
 
virtual void Reset ()
 reset informations read from file More...
 
- Public Member Functions inherited from KVLogReader
 KVLogReader ()
 
virtual ~ KVLogReader ()
 
Double_t GetCPUratio () const
 calculate ratio of used CPU to requested CPU More...
 
Double_t GetCPUrequest () const
 
Double_t GetCPUused () const
 
const Char_tGetJobname () const
 
Double_t GetMEMrequest () const
 
Double_t GetMEMused () const
 
Int_t GetRunNumber () const
 try to get run number from jobname using format string fFMT More...
 
Double_t GetSCRATCHrequest () const
 
Double_t GetSCRATCHused () const
 
const Char_tGetStatus () const
 
Bool_t JobOK () const
 
Bool_t Killed () const
 
void ReadFile (const Char_t *fname)
 Open file 'fname' and read contents. More...
 
Bool_t SegFault () const
 
void SetNameFormat (const Char_t *fmt)
 

Private Member Functions

virtual Int_t GetByteMultiplier (const KVString &unit)
 
virtual void ReadCPU (const KVString &line)
 
virtual void ReadKVCPU (const KVString &line)
 
virtual void ReadLine (const KVString &line, Bool_t &)
 analyse contents of line read from log file More...
 
virtual void ReadMemUsed (const KVString &line)
 
virtual void ReadScratchUsed (const KVString &line)
 
virtual void ReadStatus (const KVString &line)
 
virtual Double_t ReadStorage (const KVString &stor)
 

Private Attributes

Bool_t fInConsumed
 
Bool_t fInRequested
 

Additional Inherited Members

- Protected Member Functions inherited from KVLogReader
void ReadJobname (const KVString &line)
 
void ReadStorageReq (const KVString &line)
 
- Protected Attributes inherited from KVLogReader
Double_t fCPUreq
 requested CPU time in seconds More...
 
Double_t fCPUused
 normalized used CPU time in seconds More...
 
KVString fFMT
 format string used to extract run number from job name More...
 
Bool_t fGotRequests
 set true when disk & memory request has been read More...
 
Bool_t fGotStatus
 set true when end of job infos have been read More...
 
KVString fJobname
 name of job More...
 
Double_t fMemKB
 used memory in KB More...
 
Double_t fMEMreq
 requested memory (VIRTUAL STORAGE) in KB More...
 
Bool_t fOK
 job OK or not ? More...
 
Double_t fScratchKB
 used disk space in KB More...
 
Double_t fSCRreq
 requested scratch disk space in KB More...
 
KVString fStatus
 status string More...
 

#include <KVGELogReader.h>

Inheritance diagram for KVGELogReader:
Inheritance graph
[legend]

Constructor & Destructor Documentation

◆ KVGELogReader()

KVGELogReader::KVGELogReader ( )
inline

Definition at line 53 of file KVGELogReader.h.

◆ ~KVGELogReader()

virtual KVGELogReader::~KVGELogReader ( )
inlinevirtual

Definition at line 56 of file KVGELogReader.h.

Member Function Documentation

◆ GetByteMultiplier()

Int_t KVGELogReader::GetByteMultiplier ( const KVString unit)
privatevirtual

unit = "K", "M" or "G" value returned is 1, 2**10 or 2**20, respectively

Implements KVLogReader.

Definition at line 165 of file KVGELogReader.cpp.

◆ Incomplete()

virtual Bool_t KVGELogReader::Incomplete ( ) const
inlinevirtual

job considered incomplete if

  • it was not 'killed'
  • it did not end in segmentation fault/violation AND
  • the end of job status report was not found
  • OR the disk & memory requests were not found
  • OR the status indicates the job was incomplete

Reimplemented from KVLogReader.

Definition at line 63 of file KVGELogReader.h.

◆ ReadCPU()

void KVGELogReader::ReadCPU ( const KVString line)
privatevirtual

read line of type "* CPU time: 00:32:14 (1934 seconds) *" which is either the requested CPU time or the consumed CPU time, depending on where we are in the file

Implements KVLogReader.

Definition at line 103 of file KVGELogReader.cpp.

◆ ReadKVCPU()

void KVGELogReader::ReadKVCPU ( const KVString line)
privatevirtual

update infos on CPU time, memoire & disk from lines such as "CpuSys = 7.044505 s. CpuUser = 846.259888 s. ResMem = 338.109375 MB VirtMem = 1039.921875 MB DiskUsed = 5678742 KB"

Definition at line 75 of file KVGELogReader.cpp.

◆ ReadLine()

void KVGELogReader::ReadLine ( const KVString line,
Bool_t ok 
)
privatevirtual

analyse contents of line read from log file

Reimplemented from KVLogReader.

Definition at line 16 of file KVGELogReader.cpp.

◆ ReadMemUsed()

void KVGELogReader::ReadMemUsed ( const KVString line)
privatevirtual

read line of type "* vmem: 1.284 GB (2) *" corresponding to memory used by job

Implements KVLogReader.

Definition at line 136 of file KVGELogReader.cpp.

◆ ReadScratchUsed()

void KVGELogReader::ReadScratchUsed ( const KVString line)
privatevirtual

this just sets fScratcKB=0 because there is no information on scratch disk usage in the GE logfiles

Implements KVLogReader.

Definition at line 123 of file KVGELogReader.cpp.

◆ ReadStatus()

void KVGELogReader::ReadStatus ( const KVString line)
privatevirtual

read line of type

"* Exit status: 0 *"

with final status of job.

if status = "0" then JobOK() will return kTRUE otherwise, JobOK() will be kFALSE.

Implements KVLogReader.

Definition at line 187 of file KVGELogReader.cpp.

◆ ReadStorage()

Double_t KVGELogReader::ReadStorage ( const KVString stor)
privatevirtual

'stor' is a string such as "200MB", "3GB" etc. value returned is corresponding storage space in KB if no units symbol found, we assume MB

Implements KVLogReader.

Definition at line 212 of file KVGELogReader.cpp.

◆ Reset()

virtual void KVGELogReader::Reset ( void  )
inlinevirtual

reset informations read from file

Reimplemented from KVLogReader.

Definition at line 57 of file KVGELogReader.h.

Member Data Documentation

◆ fInConsumed

Bool_t KVGELogReader::fInConsumed
private

Definition at line 50 of file KVGELogReader.h.

◆ fInRequested

Bool_t KVGELogReader::fInRequested
private

Definition at line 49 of file KVGELogReader.h.


The documentation for this class was generated from the following files: