Skip to content

okaybeydanol/sensors-clean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sensors-clean.sh

A clean Bash hardware dashboard for Linux laptops/workstations with CPU temps, per-core usage, NVIDIA GPU/VRAM, NVMe temps, fans, battery, RAM/swap, load average, and uptime.

Preview

sensors-clean preview top sensors-clean preview bottom

Features

  • CPU package temperature
  • Per-core CPU temperature and usage
  • NVIDIA GPU temperature, power draw, P-State, clocks, utilization, and VRAM
  • NVMe temperatures
  • Fan RPM
  • Battery voltage/current
  • RAM and swap usage
  • Load average and uptime
  • Clean ANSI color output
  • Local LLM friendly monitoring layout

Requirements

Ubuntu/Debian/Lubuntu:

sudo apt update
sudo apt install -y lm-sensors procps pciutils

For NVIDIA GPU metrics, nvidia-smi must be available. It usually comes with the installed NVIDIA proprietary driver / NVIDIA utils package.

Check:

nvidia-smi
sensors

Optional first-time sensor setup:

sudo sensors-detect
sudo sensors -s

Run directly

chmod +x sensors-clean.sh
./sensors-clean.sh

Optional sampling interval for CPU usage calculation:

./sensors-clean.sh 0.5

Default interval is 0.3 seconds.

The optional argument only controls the CPU usage sampling interval. It does not control the screen refresh rate; use watch -n for refresh timing.

Install locally

mkdir -p ~/.local/bin
cp sensors-clean.sh ~/.local/bin/sensors-clean
chmod +x ~/.local/bin/sensors-clean

Make sure ~/.local/bin is in your PATH:

echo $PATH | grep -o "$HOME/.local/bin"

If it is missing, add this to ~/.bashrc or ~/.zshrc:

export PATH="$HOME/.local/bin:$PATH"

Then reload your shell:

source ~/.bashrc
# or
source ~/.zshrc

Run:

sensors-clean

Watch mode

Refresh every second:

In watch -c -n 1 sensors-clean, -c keeps ANSI colors enabled and -n 1 sets the refresh interval to 1 second.

watch -c -n 1 sensors-clean

With custom CPU sampling interval:

watch -c -n 1 'sensors-clean 0.5'

Faster refresh:

watch -c -n 0.5 sensors-clean

Install from GitHub

After publishing the repository:

git clone https://github.com/okaybeydanol/sensors-clean.git
cd sensors-clean

chmod +x sensors-clean.sh
./sensors-clean.sh

Install as a local command:

mkdir -p ~/.local/bin
cp sensors-clean.sh ~/.local/bin/sensors-clean
chmod +x ~/.local/bin/sensors-clean

sensors-clean

Optional profile helpers

The extras/ directory includes optional helper scripts for Linux + NVIDIA systems.

These helpers change CPU power profile and NVIDIA PowerMizer mode, then launch sensors-clean.

They do not control fans.

chmod +x extras/daily-mode.sh extras/llm-mode.sh

Daily mode:

./extras/daily-mode.sh

Daily mode sets:

  • CPU profile: balanced
  • NVIDIA PowerMizer: Auto

LLM mode:

./extras/llm-mode.sh

LLM mode sets:

  • CPU profile: performance
  • NVIDIA PowerMizer: maximum performance

Notes:

  • powerprofilesctl is required for CPU power profile switching.
  • nvidia-settings is required for NVIDIA PowerMizer switching.
  • nvidia-settings usually requires an active graphical session.
  • These scripts are optional convenience wrappers, not required for sensors-clean.sh.

Optional lm-sensors label config

The configs/ directory may include optional example configs for improving sensors labels on specific machines.

Example:

configs/semruk-s8.conf.example

This file is hardware-specific and should be reviewed before installing.

To use it:

sudo cp configs/semruk-s8.conf.example /etc/sensors.d/semruk-s8.conf
sudo sensors -s
sensors-clean

Do not blindly install hardware-specific label configs on a different laptop/workstation. Sensor chip names, NVMe PCI paths, fan labels, and thermal zones may differ between systems.

Notes

  • RAM Free uses Linux MemAvailable, not raw MemFree.
  • Mem Controller is NVIDIA memory-controller activity, not VRAM fill amount.
  • VRAM Used is the value to watch for local LLM model memory usage.
  • Load Avg is 1m / 5m / 15m runnable/waiting task load, not a percentage.
  • Red does not always mean danger. For P-State, clocks, fan RPM, and GPU power, red means high load / high performance state.

License

MIT

About

Clean Bash hardware dashboard for Linux laptops/workstations: CPU temps, NVIDIA GPU/VRAM, NVMe, fans, battery, RAM/swap, load average, uptime.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages