Monitoring

Here are some useful shell commands to monitor or get information about CPU, GPU, Memory, Network, Storage, etc.

CPU

  • lscpu - Display information about CPU architecture

  • /proc/stat - CPU Usage for each CPU

  • ps - CPU Usage by processes

  • htop - Similar to ps

  • top - Similar to ps

GPU

Assuming the use of an nvidia driver

  • nvidia-smi - Information about GPU Driver including gpu and memory utilisation and processes

  • glxinfo - Diagnose 3D acceleration setup

Memory

  • free - Monitor system's memory and SWAP usage.

  • ps - Mem usage by processes

Storage

Network

  • ifconfig - IP address for each network interface

  • ip addr - Similar to ifconfig

  • nethogs - Monitor rx/tx of each process

  • /sys/class/net/ - Gather info about each interface (eg, total rx/tx)

I have made use of these commands in my custom AwesomeWM widgets here.

Last updated

Was this helpful?