Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Public Member Functions | Private Attributes
PsLogger Class Reference

Writes output of the system command ps to a logfile. More...

#include <pslogger.hh>

Collaboration diagram for PsLogger:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void log (std::string logMessage)
 writes the log message and the output of ps to the logfile.
 PsLogger (std::string fileName, std::string format="rss pcpu")
 Constructor.

Private Attributes

std::string command_
std::string fileName_

Detailed Description

Writes output of the system command ps to a logfile.

Author:
Christoph Winkelmann, 2002

Definition at line 9 of file pslogger.hh.


Constructor & Destructor Documentation

PsLogger::PsLogger ( std::string  fileName,
std::string  format = "rss pcpu" 
)

Constructor.

Parameters:
fileNamename of the logfile
formatthe format of the output of ps. By default, memory consumption (rss) and cpu load (pcpu) are logged. See man ps for more information about format specifiers.

Member Function Documentation

void PsLogger::log ( std::string  logMessage)

writes the log message and the output of ps to the logfile.

Parameters:
logMessagethe log message to write into the logfile

Member Data Documentation

std::string PsLogger::command_ [private]

Definition at line 24 of file pslogger.hh.

std::string PsLogger::fileName_ [private]

Definition at line 23 of file pslogger.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)