Skip to content

feature: more system variables #45

@NotAShelf

Description

@NotAShelf

In v1 the Watt configuration manager has been revamped to be a "rule evaluator" daemon. This system does not allow users to fetch data on their own, so it's good to expose some variables in the DSL.

Things I want to add, in no particular order:

Current Software Frequency Limits

  • $cpu-scaling-maximum - current software max frequency (from scaling_max_freq)
  • $cpu-scaling-minimum - current software min frequency (from scaling_min_freq) obsolete but maybe good for consistency

CPU Core Count

  • $cpu-count - total CPU cores (probably not useful on single-node configs, but might allow sharing configs)

Load Averages

  • $load-average-1m - 1-minute load average
  • $load-average-5m - 5-minute load average
  • $load-average-15m - 15-minute load average

Kind of redundant, possibly.

Battery Health

  • %battery-health - battery health percentage (eh)
  • $battery-cycles - battery charge cycles (eh)

Laptop State

  • ?lid-closed - boolean for laptop lid state, can be used to aggressively slow down a system while the lid is down to save power in your bag or whatever

Time-of-day

  • $hour-of-day - current hour (0-23), only useful if we want to allow scripting and would be obsoleted by a DBus interface

Metadata

Metadata

Assignees

Labels

v1Base requirements for the v1 release

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions