powerd++
0.4.4
|
A collection of all the gloabl, mutable states. More...
Classes | |
struct | ACSet |
Per AC line state settings. More... | |
Public Member Functions | |
Global () | |
Perform initialisations that cannot fail/throw. | |
Public Attributes | |
volatile sig_atomic_t | signal {0} |
The last signal received, used for terminating. | |
size_t | samples {4} |
The number of load samples to take. | |
ms | interval {500} |
The polling interval. | |
size_t | sample {0} |
The current sample. | |
const SysctlOnce< coreid_t, 2 > | ncpu {1, {CTL_HW, HW_NCPU}} |
The number of CPU cores or threads. | |
ACSet | acstates [3] |
The power states. More... | |
Sysctl< 0 > | acline_ctl |
The hw.acpi.acline ctl. | |
bool | verbose {false} |
Verbose mode. | |
bool | foreground {false} |
Foreground mode. | |
bool | idleStates [CPUSTATES] {} |
The list of states considered idle. | |
bool | temp_throttling {false} |
Temperature throttling mode. | |
decikelvin_t | temp_crit {0} |
User set critical core temperature in dK. | |
decikelvin_t | temp_high {0} |
User set high core temperature in dK. | |
const char * | pidfilename {POWERD_PIDFILE} |
Name of an alternative pidfile. More... | |
Sysctl< 0 > | cp_times_ctl |
The kern.cp_times sysctl. | |
const char * | tempctl_name {TEMPERATURE} |
The sysctl name pattern for the temperature sysctl. More... | |
std::unique_ptr< cptime_t[][CPUSTATES]> | cp_times |
The kern.cp_times buffer for all cores. | |
std::unique_ptr< Core[]> | cores {new Core[this->ncpu]} |
This buffer is to be allocated with ncpu instances of the Core struct to store the management information of every core. | |
coreid_t | ngroups {0} |
The number of frequency controlling core groups. | |
std::unique_ptr< CoreGroup[]> | groups {nullptr} |
This buffer is to be allocated with the number of core groups. More... | |
A collection of all the gloabl, mutable states.
This is mostly for semantic clarity.
struct anonymous_namespace{powerd++.cpp}::Global::ACSet |
Per AC line state settings.
ACSet anonymous_namespace{powerd++.cpp}::Global::acstates[3] |
The power states.
std::unique_ptr<CoreGroup[]> anonymous_namespace{powerd++.cpp}::Global::groups {nullptr} |
This buffer is to be allocated with the number of core groups.
A core group is created by init() for each core that has a dev.cpu.d.freq handle.
const char* anonymous_namespace{powerd++.cpp}::Global::pidfilename {POWERD_PIDFILE} |
Name of an alternative pidfile.
If not given pidfile_open() uses a default name.
const char* anonymous_namespace{powerd++.cpp}::Global::tempctl_name {TEMPERATURE} |
The sysctl name pattern for the temperature sysctl.
May contain a single d
.