powerd++  0.4.4
constants.hpp
Go to the documentation of this file.
1 
7 #include "types.hpp"
8 
9 #ifndef _POWERDXX_CONSTANTS_HPP_
10 #define _POWERDXX_CONSTANTS_HPP_
11 
15 namespace constants {
16 
17 /*
18  * Sysctl symbolic MIB representations.
19  */
20 
24 char const * const CP_TIMES = "kern.cp_times";
25 
29 char const * const ACLINE = "hw.acpi.acline";
30 
34 char const * const FREQ = "dev.cpu.%d.freq";
35 
39 char const * const FREQ_LEVELS = "dev.cpu.%d.freq_levels";
40 
44 char const * const TEMPERATURE = "dev.cpu.%d.temperature";
45 
49 char const * const TJMAX_SOURCES[]{
50  "dev.cpu.%d.coretemp.tjmax"
51 };
52 
56 char const * const FREQ_DRIVER = "dev.cpufreq.%d.freq_driver";
57 
62 char const * const FREQ_DRIVER_BLACKLIST[]{
63  "hwpstate_"
64 };
65 
66 /*
67  * Default values.
68  */
69 
74 
79 
83 types::mhz_t const FREQ_UNSET{1000001};
84 
88 char const * const POWERD_PIDFILE = "/var/run/powerd.pid";
89 
93 types::cptime_t const ADP{512};
94 
98 types::cptime_t const HADP{384};
99 
104 
105 } /* namespace constants */
106 
107 #endif /* _POWERDXX_CONSTANTS_HPP_ */
constants::FREQ
const char *const FREQ
The MIB name for CPU frequencies.
Definition: constants.hpp:34
types::mhz_t
unsigned int mhz_t
Type for CPU frequencies in MHz.
Definition: types.hpp:40
constants::FREQ_LEVELS
const char *const FREQ_LEVELS
The MIB name for CPU frequency levels.
Definition: constants.hpp:39
types.hpp
A collection of type aliases.
constants::ACLINE
const char *const ACLINE
The MIB name for the AC line state.
Definition: constants.hpp:29
constants::FREQ_UNSET
const types::mhz_t FREQ_UNSET
Clock frequency representing an uninitialised value.
Definition: constants.hpp:83
types::decikelvin_t
int decikelvin_t
Type for temperatures in dK.
Definition: types.hpp:45
constants::FREQ_DRIVER
const char *const FREQ_DRIVER
The MIB name for the CPU frequency drivers.
Definition: constants.hpp:56
constants::POWERD_PIDFILE
const char *const POWERD_PIDFILE
The default pidfile name of powerd.
Definition: constants.hpp:88
constants::TJMAX_SOURCES
const char *const TJMAX_SOURCES[]
An array of maximum temperature sources.
Definition: constants.hpp:49
constants::HITEMP_OFFSET
const types::decikelvin_t HITEMP_OFFSET
The default temperautre offset between high and critical temperature.
Definition: constants.hpp:103
constants::HADP
const types::cptime_t HADP
The load target for hiadaptive mode, equals 37.5% load.
Definition: constants.hpp:98
types::cptime_t
unsigned long cptime_t
Type for load counting.
Definition: types.hpp:35
constants::CP_TIMES
const char *const CP_TIMES
The MIB name for per-CPU time statistics.
Definition: constants.hpp:24
constants::TEMPERATURE
const char *const TEMPERATURE
The MIB name for CPU temperatures.
Definition: constants.hpp:44
constants::FREQ_DEFAULT_MAX
const types::mhz_t FREQ_DEFAULT_MAX
Default maximum clock frequency value.
Definition: constants.hpp:73
constants
A collection of constants.
Definition: constants.hpp:15
constants::FREQ_DEFAULT_MIN
const types::mhz_t FREQ_DEFAULT_MIN
Default minimum clock frequency value.
Definition: constants.hpp:78
constants::FREQ_DRIVER_BLACKLIST
const char *const FREQ_DRIVER_BLACKLIST[]
A list of driver prefixes, that are known not to allow manual frequency control.
Definition: constants.hpp:62
constants::ADP
const types::cptime_t ADP
The load target for adaptive mode, equals 50% load.
Definition: constants.hpp:93