0
I want to create a script that logs the battery level and CPU load on a laptop, however I still want to log the battery level whilst in sleep mode. Is there any way to do this in Linux?
OS: LM 18.04 LTS
DE: Xfce
Computer specs: 10-12 year old laptop, it's pretty bad but fine for casual use: Celeron 900 2.2GHz, integrated graphics, 1366x768 display, 120GiB SSD; the model is something like Compaq Presario CQ56.
EDIT: I have a working script for logging battery level already which is this command:
upower -i $(upower -e | grep 'BAT') | grep -E "percentage" | awk -F: '{ print $2 }' | tr -d ' %'