Functions | |
| void | sleepMillis (double millis) |
| string | executeSystemCommand (const string &cmd, int *outExitCode=nullptr) |
| Executes a shell command and returns its output as a string. More... | |
| string | getOSDistribution () |
| string | getCpuArchitecture () |
| void | deleteFilesOlderThan (const string &directoryPath, const string &fileNamePattern, int days) |
| vector< string > | getIPV4Addresses () |
| vector< string > | getReachableIPV4Networks () |
| size_t | getProcessMemoryUsageMB () |
| void conscience_utils::systemutils::deleteFilesOlderThan | ( | const string & | directoryPath, |
| const string & | fileNamePattern, | ||
| int | days | ||
| ) |
Not compatible with windows at the moment
| string conscience_utils::systemutils::executeSystemCommand | ( | const string & | cmd, |
| int * | outExitCode = nullptr |
||
| ) |
Executes a shell command and returns its output as a string.
| cmd | The shell command to be executed. |
| outExitCode | if not null, will be set to exit code |
| std::runtime_error | if popen() fails. |
| string conscience_utils::systemutils::getCpuArchitecture | ( | ) |
return the CPU architecture of this entity (aarch64, armv7l, ..)
| vector< string > conscience_utils::systemutils::getIPV4Addresses | ( | ) |
| string conscience_utils::systemutils::getOSDistribution | ( | ) |
return the distribution of the current OS
| size_t conscience_utils::systemutils::getProcessMemoryUsageMB | ( | ) |
| vector< string > conscience_utils::systemutils::getReachableIPV4Networks | ( | ) |
| void conscience_utils::systemutils::sleepMillis | ( | double | millis | ) |