Open Lighting Architecture
Latest Git
|
System helper functions (Load Average).
Enumerations | |
enum | load_averages { LOAD_AVERAGE_1_MIN = 0, LOAD_AVERAGE_5_MINS = 1, LOAD_AVERAGE_15_MINS = 2 } |
Functions | |
bool | GetRLimit (int resource, struct rlimit *lim) |
Get the current values for an rlimit. More... | |
bool | SetRLimit (int resource, const struct rlimit &lim) |
Set the values for an rlimit. More... | |
bool | LoadAverage (load_averages average, double *value) |
Get the system load average. More... | |
Variables | |
static const uint8_t | NUMBER_LOAD_AVERAGES = 3 |
bool ola::system::GetRLimit | ( | int | resource, |
struct rlimit * | lim | ||
) |
Get the current values for an rlimit.
resource | the rlimit to fetch. |
lim | The rlimit struct to populate. |
bool ola::system::LoadAverage | ( | load_averages | average, |
double * | value | ||
) |
Get the system load average.
[in] | average | the load average to fetch |
[out] | value | a pointer to where the value will be stored |
bool ola::system::SetRLimit | ( | int | resource, |
const struct rlimit & | lim | ||
) |
Set the values for an rlimit.
resource | the rlimit to set. |
lim | The rlimit struct with the values to set. |