csensors’s data description¶
- Default field’s separator is TAB (\t 011 0x9)
- Each data description file should hold all data for particular logical or physical device e.g Core 0 or BAT0
- Main purpose of csensors’s data files is to create place, where errors and non-senses generated by csensors-scan can be fixed and extended by hand or by better tools than csensors-scan .
- Csensors data files are located in directory /usr/etc/csensors/data.d/ .
- When you create/edit some csensors’s data file, no other action is needed ( no kill -1 daemon_pid )
- Non pars-able files are ignored.
- There are no requirements for individual file names.
Data format¶
Each file is plain text file with traditional LF as end of line .
BNF format description :¶
input ::= line "\n" line ::= type node type_dependent_part type ::= "name" | "constant" | "text" | "variable" | "@variable" | "@constant" node ::= "/full/path/to/node" type_dependent_part ::= Unit_SI Flag Description
Sample file¶
$ cat /usr/etc/csensors/data.d/BAT0
name BAT0
constant /sys/class/power_supply/BAT0/present none 0 no description
text /sys/class/power_supply/BAT0/manufacturer
variable /sys/class/power_supply/BAT0/capacity % 37 Capacity
variable /sys/class/power_supply/BAT0/voltage_now μV 2053 Voltage
constant /sys/class/power_supply/BAT0/cycle_count none 0 no description
constant /sys/class/power_supply/BAT0/voltage_min_design μV 2 Voltage min. design
constant /sys/class/power_supply/BAT0/energy_full_design μWh 4 Energy full design
text /sys/class/power_supply/BAT0/model_name
text /sys/class/power_supply/BAT0/status
variable /sys/class/power_supply/BAT0/energy_now μWh 37 Energy
text /sys/class/power_supply/BAT0/type
text /sys/class/power_supply/BAT0/capacity_level
alarm /sys/class/power_supply/BAT0/alarm
text /sys/class/power_supply/BAT0/serial_number
text /sys/class/power_supply/BAT0/technology
variable /sys/class/power_supply/BAT0/power_now μW 1 Charge
constant /sys/class/power_supply/BAT0/energy_full μWh 4 Energy full
$ cat /usr/etc/csensors/data.d/Core_0
name Core 0
alarm /sys/class/hwmon/hwmon0/temp2_crit_alarm
text /sys/class/hwmon/hwmon0/temp2_label
constant /sys/class/hwmon/hwmon0/temp2_max m˚C 68 Temperature max value.
variable /sys/class/hwmon/hwmon0/temp2_input m˚C 67 Temperature measured on the chip pin.
constant /sys/class/hwmon/hwmon0/temp2_crit m˚C 68 Temperature critical max value