Feel++ 0.91.0
|
#include <pslogger.hpp>
Public Member Functions | |
PsLogger (std::string fileName, std::string format="rss pcpu") | |
void | log (std::string logMessage) |
Writes output of the system command ps to a logfile.
PsLogger::PsLogger | ( | std::string | fileName, |
std::string | format = "rss pcpu" |
||
) |
Constructor.
fileName | name of the logfile |
format | the 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. |
void PsLogger::log | ( | std::string | logMessage | ) |
writes the log message and the output of ps to the logfile.
logMessage | the log message to write into the logfile |