Feel++  0.91.4
Public Member Functions | List of all members
PsLogger Class Reference

#include <pslogger.hpp>

Public Member Functions

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

Detailed Description

Writes output of the system command ps to a logfile.

Author
Christoph Winkelmann, 2002

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