#!/bin/bash
sudo bash -c "gnome-terminal.real --tab -e 'iotop -oa' --tab -e 'watch -n 3 iostat' --tab -e 'nethogs' --tab -e 'watch -n 7 cat /proc/mdstat' --tab -e 'watch -n 11 mdadm --detail /dev/md0' --tab -e 'watch -n 17 lsblk -o NAME,FSTYPE,MODEL,SERIAL,STATE,UUID' --tab -e 'watch -n 13 sudo hddtemp /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg' --tab -e 'watch -n 5 sensors' --tab -e 'watch -n 4 cpufreq-info -c0 -mf & cpufreq-info -c1 -mf & cpufreq-info -c2 -mf & cpufreq-info -c3 -mf'"
The bash file calls up iotop, iostat, nethogs, mdadm, lsblk, hddtemp, sensors and cpufrequtils.
Ensure the above packages are installed using apt install.
Modify the relevant commands so that your system configuration matches the commands, i.e Have you a RAID system installed using mdadm? How many drives are installed and need the temperatures checked? How many cpu cores exist on your system?
Place the bash file on your Desktop, call it “monitor”, and use the following commands from the Terminal:
cd Desktop
./monitor
I found that executing the file from Home directory cause permission issues. Executing the file from Desktop resolved this. The bash file does run the commands as root, so password login is required when executing the file.