I’m curious is there a way to access the output from the L5 Usage app in the shell? I’m interested in the temp and sensor data. Running usage seems to consume a lot of resources. I installed lm-sensors which I’ve used on my desktop linux. But, it seems like the Usage app doesn’t use lm-sensors. So, I’m wondering what it uses to pull Temp data. I’d like to be able to access that from command line.
Try the command sensors.
is the command that becomes available when lm-sensors is installed. lm-sensors is not part of the default OS image for the L5. So I wondered what app is used by Usage to read sensor readings?
All the info is available under /sys somewhere
e.g. I have these aliases in my $HOME/.bash_aliases file to quickly see the battery and temp status:
alias batt='cat /sys/class/power_supply/max170xx_battery/capacity'
alias temp='cat /sys/class/thermal/thermal_zone*/temp'
Temperature is expressed in milli-degrees I suppose, but I didn’t bother adding anything to divide the values by 1000. I’m also not checking which thermal zones are the CPU cores, which is the battery, just dumping the values.
Example output:
$ batt
91
$ temp
45000
46000
46000
35500
43600
Thanks @pajuky ! I am not familiar with alias. Good to learn about it and that is a nice quick way to check!
Hmmm… I must have acquired lm-sensors when I installed GNOME System Monitor. (I have both Usage and System Monitor installed.)
The command works on my laptops, where I have System Monitor installed as well.
I hadn’t thought about system monitor on the L5. Does that work well for you? Do you like it?
Yes; here’s a demo on the L5.
I actually like both apps for different purposes.
I suppose if you install it, you could create a desktop “app” to simply run the sensors command with a tap of a launcher. I’ve made several such apps.