Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Haptein/powerplan
/ functions
Functions
116 in github.com/Haptein/powerplan
⨍
Functions
116
◇
Types & classes
16
↓ 25 callers
Function
read
Reads first line of path (str or Path), strips and converts to dtype.
src/shell.py:13
↓ 11 callers
Method
update
Stream value into deque
src/systemstatus.py:52
↓ 10 callers
Method
_check_value_in_range
(self, value_name, value, allowed_range)
src/config.py:160
↓ 9 callers
Method
_read
Reads data from path and parses as dtype Returns None if OS raises ENODEV (errno 19)
src/powersupply.py:43
↓ 8 callers
Function
list_cores
list coreid's with status: offline, online, present
src/cpu.py:34
↓ 6 callers
Method
_available
Check if path exists and returns values properly
src/powersupply.py:63
↓ 6 callers
Method
_check_value_order
(self, range_name, minimum, maximum)
src/config.py:166
↓ 5 callers
Function
is_root
()
src/shell.py:10
↓ 5 callers
Function
read_profiles
returns a dict of PowerProfile objects, sorted by ascending priority
src/config.py:290
↓ 4 callers
Method
__init__
(self, cpu: Cpu, powersupply)
src/systemstatus.py:18
↓ 4 callers
Method
delta
Returns the difference between the last and first value
src/systemstatus.py:60
↓ 4 callers
Function
shell
(command: str, return_stdout: bool = True)
src/shell.py:5
↓ 3 callers
Method
apply
Applies profile configuration
src/config.py:121
↓ 3 callers
Method
changed
Returns true if field's last value is different from the second last one
src/systemstatus.py:67
↓ 3 callers
Method
update
(self)
src/process.py:21
↓ 2 callers
Method
list_cores
list coreid's with status: offline, online, present
src/cpu.py:295
↓ 2 callers
Method
partial_update
Updates specified fields' values if fields==None, updates all the fields that haven't been partially updated
src/systemstatus.py:170
↓ 2 callers
Function
preferred_available
Returns the first element in preference of available
src/config.py:14
↓ 2 callers
Method
read_current_freq
Returns dict of core_id:cur_freq
src/cpu.py:377
↓ 2 callers
Method
read_freq_range
(self, core_id: int = 0)
src/cpu.py:385
↓ 2 callers
Method
read_time_energy
(self)
src/cpu.py:226
↓ 2 callers
Function
set_core_status
(core_list: list, online: int)
src/cpu.py:43
↓ 2 callers
Method
set_freq_range
(self, min_freq: int, max_freq: int)
src/cpu.py:390
↓ 2 callers
Method
set_governor
(self, governor)
src/cpu.py:358
↓ 2 callers
Method
set_perf_range
(self, min_perf_pct: int, max_perf_pct: int)
src/cpu.py:405
↓ 2 callers
Method
set_physical_cores_online
Sets the number of online physical cores, turns off the rest
src/cpu.py:310
↓ 2 callers
Method
set_policy
(self, policy)
src/cpu.py:370
↓ 2 callers
Method
set_tdp_limits
Set PL1 and PL2 power limits (intel_pstate) If PL1 or PL2 is zero, this does nothing.
src/cpu.py:437
↓ 2 callers
Method
set_turbo_state
(self, turbo_state: bool)
src/cpu.py:422
↓ 2 callers
Method
sleep
(self, iteration_start, status)
src/config.py:147
↓ 1 callers
Method
__init__
(self, profiles=None)
src/process.py:13
↓ 1 callers
Method
_available_power_methods
Returns dict of available power draw estimation name:callable
src/powersupply.py:139
↓ 1 callers
Method
_available_temp_sensor
Returns first available sensor in allowed_sensors, or None
src/cpu.py:157
↓ 1 callers
Method
_check_custom_fields
check that custom fields are correct
src/systemstatus.py:103
↓ 1 callers
Method
_description
(self)
src/config.py:115
↓ 1 callers
Method
_get_field_methods
(self, fields: list, custom_fields: dict)
src/systemstatus.py:118
↓ 1 callers
Method
_get_triggerapps
(self, profiles=None)
src/process.py:56
↓ 1 callers
Method
_read_crit_temp
Read critical temperature, default to 100 if unavailable
src/cpu.py:173
↓ 1 callers
Method
_set_freqs_to_khz
(self)
src/config.py:154
↓ 1 callers
Method
_set_paths
Sets up needed sysfs interfaces on init
src/powersupply.py:25
↓ 1 callers
Method
_set_power_draw_method
Sets power_draw method to the one specified
src/powersupply.py:155
↓ 1 callers
Method
_set_supplying_power_method
Sets supplying_power method on init
src/powersupply.py:36
↓ 1 callers
Method
_set_turbo_variables
Sets: turbo_allowed, turbo_file, turbo_inverse
src/cpu.py:184
↓ 1 callers
Method
_thread_siblings
(self)
src/cpu.py:142
↓ 1 callers
Method
_validate
(self)
src/config.py:171
↓ 1 callers
Function
check_config_keys
Checks config keys present
src/config.py:247
↓ 1 callers
Function
cpu_ranges_to_list
Parses virtual cpu's (offline,online,present) files formatting
src/cpu.py:23
↓ 1 callers
Function
error
(message)
src/log.py:8
↓ 1 callers
Function
generate_default_profile
Generates a defaul profile depending on system specifications
src/config.py:11
↓ 1 callers
Method
get_rapl
Returns an instance of appropriate Rapl Class
src/cpu.py:429
↓ 1 callers
Function
main_loop
(monitor_mode: bool, system: systemstatus.System)
src/powerplan.py:46
↓ 1 callers
Function
path_is_writable
(path)
src/shell.py:19
↓ 1 callers
Method
power_supply_detection
Returns tuple of ACAdapter, Battery
src/powersupply.py:240
↓ 1 callers
Function
read_config
Reads config file, checks values and returns config dict
src/config.py:268
↓ 1 callers
Method
read_cpu_utilization
CPU utilization mode : str = ['avg', 'max', 'all'] for mode in ['avg', 'max'] returns : float, in range [0.0-100
src/cpu.py:328
↓ 1 callers
Method
read_governor
(self, core_id: int = 0)
src/cpu.py:355
↓ 1 callers
Method
read_perf_range
(self)
src/cpu.py:401
↓ 1 callers
Method
read_physical_core_status
(self, core_num: int)
src/cpu.py:299
↓ 1 callers
Method
read_policy
(self, core_id: int = 0)
src/cpu.py:364
↓ 1 callers
Method
read_power
(self)
src/cpu.py:229
↓ 1 callers
Function
read_process_cpu_mem
(running_process)
src/monitor.py:70
↓ 1 callers
Method
read_turbo_state
Read existing turbo file and invert value if appropriate (intel_pstate/no_turbo).
src/cpu.py:415
↓ 1 callers
Method
reset
Updates self.triggerapps and clears self.pids_last useful for hot-reloading profiles
src/process.py:49
↓ 1 callers
Function
single_activation
(profile: str, system: systemstatus.System)
src/powerplan.py:33
↓ 1 callers
Method
system_info
Generate system info string
src/systemstatus.py:23
↓ 1 callers
Function
tree
()
src/powersupply.py:287
↓ 1 callers
Method
triggerapp_present
(self, procs: set)
src/config.py:141
↓ 1 callers
Function
write_default_config
(default_profile)
src/config.py:281
Method
__getitem__
Get latest value of field
src/systemstatus.py:98
Method
__init__
(self, name: str, section: configparser.SectionProxy, system)
src/config.py:68
Method
__init__
(self)
src/cpu.py:56
Method
__init__
(self, layer_path: Path)
src/cpu.py:216
Method
__init__
If exists and enabled, create RaplLayer objs for each layer found.
src/cpu.py:255
Method
__init__
(self)
src/cpu.py:290
Method
__init__
path: device's dir Path
src/powersupply.py:12
Method
__init__
(self, path)
src/powersupply.py:93
Method
__init__
(self)
src/powersupply.py:236
Method
__init__
(self, maxlen=2)
src/systemstatus.py:49
Method
__init__
Initializes dict of deques of length history_len
src/systemstatus.py:77
Method
__init__
(self, system: System, profiles: dict)
src/systemstatus.py:230
Method
__init__
(self, system: System, profiles: dict)
src/systemstatus.py:235
Method
__init__
(self, system: System, profiles: dict)
src/systemstatus.py:250
Method
_absent_supplying_power
(self)
src/powersupply.py:33
Method
_power_charge_delta_voltage
(self)
src/powersupply.py:215
Method
_power_current_voltage
(self)
src/powersupply.py:207
Method
_power_energy_delta
(self)
src/powersupply.py:190
Method
_power_read
(self)
src/powersupply.py:183
Method
_power_unavailable
(self)
src/powersupply.py:180
Method
_present_supplying_power
(self)
src/powersupply.py:30
Method
_present_supplying_power
(self)
src/powersupply.py:76
Method
_present_supplying_power
(self)
src/powersupply.py:102
Method
_set_paths
(self)
src/powersupply.py:73
Method
_set_paths
(self)
src/powersupply.py:115
Method
ac_power
Is system AC_powered/charging? Deals with unavailable Battery/ACAdapter
src/powersupply.py:270
Function
already_running
(name: str = 'powerplan')
src/process.py:80
Method
battery_draw
Return battery power draw
src/powersupply.py:282
Method
changed
Returns true if at least one field's last value is different from the second last one
src/systemstatus.py:199
Method
charge_left
Returns charge left (mAh)
src/powersupply.py:124
Function
debug_runtime_info
(process, profile, iteration_start)
src/monitor.py:73
Function
enable_daemon
()
src/shell.py:37
next →
1–100 of 116, ranked by callers