Simple shell script to log CPU (mpstats & sensors) and GPU (nvidia-smi) utilization and temperature into respective csv files. Also logs other device outputs from sensor. Logging is done periodically for every interval (30s default) and outputs are categorized based on dates.
sudo apt install sysstat lm-sensors
# Recommend to install nvidia-smi using Ubuntu's Software & Updates
cd ~
git clone https://github.com/luacghee/HWlogs.git
chmod +x ~/HWlogs/hwlogs_run.sh
cd ~/HWlogs
./hwlogs_run.sh
# Outputs are in ~/HWlogs/logs_run
chmod +x ~/HWlogs/hwlogs.sh
crontab -e
@reboot /home/user/HWLogs/hwlogs.sh
- Tested on Ubuntu 22.04 with AMD k10 driver (Ryzen 9 CPU).
- To include plotting in the future.