MCPcopy Create free account

hub / github.com/Haptein/powerplan / functions

Functions116 in github.com/Haptein/powerplan

↓ 25 callersFunctionread
Reads first line of path (str or Path), strips and converts to dtype.
src/shell.py:13
↓ 11 callersMethodupdate
Stream value into deque
src/systemstatus.py:52
↓ 10 callersMethod_check_value_in_range
(self, value_name, value, allowed_range)
src/config.py:160
↓ 9 callersMethod_read
Reads data from path and parses as dtype Returns None if OS raises ENODEV (errno 19)
src/powersupply.py:43
↓ 8 callersFunctionlist_cores
list coreid's with status: offline, online, present
src/cpu.py:34
↓ 6 callersMethod_available
Check if path exists and returns values properly
src/powersupply.py:63
↓ 6 callersMethod_check_value_order
(self, range_name, minimum, maximum)
src/config.py:166
↓ 5 callersFunctionis_root
()
src/shell.py:10
↓ 5 callersFunctionread_profiles
returns a dict of PowerProfile objects, sorted by ascending priority
src/config.py:290
↓ 4 callersMethod__init__
(self, cpu: Cpu, powersupply)
src/systemstatus.py:18
↓ 4 callersMethoddelta
Returns the difference between the last and first value
src/systemstatus.py:60
↓ 4 callersFunctionshell
(command: str, return_stdout: bool = True)
src/shell.py:5
↓ 3 callersMethodapply
Applies profile configuration
src/config.py:121
↓ 3 callersMethodchanged
Returns true if field's last value is different from the second last one
src/systemstatus.py:67
↓ 3 callersMethodupdate
(self)
src/process.py:21
↓ 2 callersMethodlist_cores
list coreid's with status: offline, online, present
src/cpu.py:295
↓ 2 callersMethodpartial_update
Updates specified fields' values if fields==None, updates all the fields that haven't been partially updated
src/systemstatus.py:170
↓ 2 callersFunctionpreferred_available
Returns the first element in preference of available
src/config.py:14
↓ 2 callersMethodread_current_freq
Returns dict of core_id:cur_freq
src/cpu.py:377
↓ 2 callersMethodread_freq_range
(self, core_id: int = 0)
src/cpu.py:385
↓ 2 callersMethodread_time_energy
(self)
src/cpu.py:226
↓ 2 callersFunctionset_core_status
(core_list: list, online: int)
src/cpu.py:43
↓ 2 callersMethodset_freq_range
(self, min_freq: int, max_freq: int)
src/cpu.py:390
↓ 2 callersMethodset_governor
(self, governor)
src/cpu.py:358
↓ 2 callersMethodset_perf_range
(self, min_perf_pct: int, max_perf_pct: int)
src/cpu.py:405
↓ 2 callersMethodset_physical_cores_online
Sets the number of online physical cores, turns off the rest
src/cpu.py:310
↓ 2 callersMethodset_policy
(self, policy)
src/cpu.py:370
↓ 2 callersMethodset_tdp_limits
Set PL1 and PL2 power limits (intel_pstate) If PL1 or PL2 is zero, this does nothing.
src/cpu.py:437
↓ 2 callersMethodset_turbo_state
(self, turbo_state: bool)
src/cpu.py:422
↓ 2 callersMethodsleep
(self, iteration_start, status)
src/config.py:147
↓ 1 callersMethod__init__
(self, profiles=None)
src/process.py:13
↓ 1 callersMethod_available_power_methods
Returns dict of available power draw estimation name:callable
src/powersupply.py:139
↓ 1 callersMethod_available_temp_sensor
Returns first available sensor in allowed_sensors, or None
src/cpu.py:157
↓ 1 callersMethod_check_custom_fields
check that custom fields are correct
src/systemstatus.py:103
↓ 1 callersMethod_description
(self)
src/config.py:115
↓ 1 callersMethod_get_field_methods
(self, fields: list, custom_fields: dict)
src/systemstatus.py:118
↓ 1 callersMethod_get_triggerapps
(self, profiles=None)
src/process.py:56
↓ 1 callersMethod_read_crit_temp
Read critical temperature, default to 100 if unavailable
src/cpu.py:173
↓ 1 callersMethod_set_freqs_to_khz
(self)
src/config.py:154
↓ 1 callersMethod_set_paths
Sets up needed sysfs interfaces on init
src/powersupply.py:25
↓ 1 callersMethod_set_power_draw_method
Sets power_draw method to the one specified
src/powersupply.py:155
↓ 1 callersMethod_set_supplying_power_method
Sets supplying_power method on init
src/powersupply.py:36
↓ 1 callersMethod_set_turbo_variables
Sets: turbo_allowed, turbo_file, turbo_inverse
src/cpu.py:184
↓ 1 callersMethod_thread_siblings
(self)
src/cpu.py:142
↓ 1 callersMethod_validate
(self)
src/config.py:171
↓ 1 callersFunctioncheck_config_keys
Checks config keys present
src/config.py:247
↓ 1 callersFunctioncpu_ranges_to_list
Parses virtual cpu's (offline,online,present) files formatting
src/cpu.py:23
↓ 1 callersFunctionerror
(message)
src/log.py:8
↓ 1 callersFunctiongenerate_default_profile
Generates a defaul profile depending on system specifications
src/config.py:11
↓ 1 callersMethodget_rapl
Returns an instance of appropriate Rapl Class
src/cpu.py:429
↓ 1 callersFunctionmain_loop
(monitor_mode: bool, system: systemstatus.System)
src/powerplan.py:46
↓ 1 callersFunctionpath_is_writable
(path)
src/shell.py:19
↓ 1 callersMethodpower_supply_detection
Returns tuple of ACAdapter, Battery
src/powersupply.py:240
↓ 1 callersFunctionread_config
Reads config file, checks values and returns config dict
src/config.py:268
↓ 1 callersMethodread_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 callersMethodread_governor
(self, core_id: int = 0)
src/cpu.py:355
↓ 1 callersMethodread_perf_range
(self)
src/cpu.py:401
↓ 1 callersMethodread_physical_core_status
(self, core_num: int)
src/cpu.py:299
↓ 1 callersMethodread_policy
(self, core_id: int = 0)
src/cpu.py:364
↓ 1 callersMethodread_power
(self)
src/cpu.py:229
↓ 1 callersFunctionread_process_cpu_mem
(running_process)
src/monitor.py:70
↓ 1 callersMethodread_turbo_state
Read existing turbo file and invert value if appropriate (intel_pstate/no_turbo).
src/cpu.py:415
↓ 1 callersMethodreset
Updates self.triggerapps and clears self.pids_last useful for hot-reloading profiles
src/process.py:49
↓ 1 callersFunctionsingle_activation
(profile: str, system: systemstatus.System)
src/powerplan.py:33
↓ 1 callersMethodsystem_info
Generate system info string
src/systemstatus.py:23
↓ 1 callersFunctiontree
()
src/powersupply.py:287
↓ 1 callersMethodtriggerapp_present
(self, procs: set)
src/config.py:141
↓ 1 callersFunctionwrite_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
Methodac_power
Is system AC_powered/charging? Deals with unavailable Battery/ACAdapter
src/powersupply.py:270
Functionalready_running
(name: str = 'powerplan')
src/process.py:80
Methodbattery_draw
Return battery power draw
src/powersupply.py:282
Methodchanged
Returns true if at least one field's last value is different from the second last one
src/systemstatus.py:199
Methodcharge_left
Returns charge left (mAh)
src/powersupply.py:124
Functiondebug_runtime_info
(process, profile, iteration_start)
src/monitor.py:73
Functionenable_daemon
()
src/shell.py:37
next →1–100 of 116, ranked by callers