Writes output of the system command ps to a logfile. More...
Collaboration diagram for Feel::PsLogger:Public Member Functions | |
| std::string | fileName () const |
| void | log (std::string logMessage, bool all_procs=true) |
| writes the log message and the output of ps to the logfile. More... | |
| PsLogger (std::string fileName, WorldComm const &worldComm=Environment::worldComm(), std::string format="rss pmem pcpu", bool all_procs=true) | |
| Constructor. More... | |
| WorldComm const & | worldComm () const |
Writes output of the system command ps to a logfile.
| Feel::PsLogger::PsLogger | ( | std::string | fileName, |
| WorldComm const & | worldComm = Environment::worldComm(), |
||
| std::string | format = "rss pmem pcpu", |
||
| bool | all_procs = true |
||
| ) |
Constructor.
| fileName | name of the logfile |
| format | the format of the output of ps. By default, memory consumption (rss), the percentage of real memory used by this process (pmem) and cpu load (pcpu) are logged. See man ps for more information about format specifiers. |
| all_procs | : write on all processors if true |
| void Feel::PsLogger::log | ( | std::string | logMessage, |
| bool | all_procs = true |
||
| ) |
writes the log message and the output of ps to the logfile.
| logMessage | the log message to write into the logfile |
| all_procs | : write on all processors if true |
References Feel::WorldComm::globalRank(), Feel::Environment::logMemoryUsage(), Feel::WorldComm::masterRank(), and Feel::Environment::worldComm().