Feel++ 0.91.0
Public Member Functions
PsLogger Class Reference

#include <pslogger.hpp>

List of all members.

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