hostat
Host + Status = hostat
A simple CLI tool to print out host status in one line. Support slurm status also.
$ hostat
hostname | CPUs | 1m | 5m | 15m | memory % | disk % | UpTime |
cluster01 | 8 | 0.9 | 1.1 | 1.4 | 40 % | 19 % | 4 d |
Install
Fetch the latest release for your platform:
# Linux
sudo wget https://github.com/SSARCandy/hostat/releases/download/v1.0.0/hostat-linux -O /usr/local/bin/hostat
sudo chmod +x /usr/local/bin/hostat
# Windows
wget https://github.com/SSARCandy/hostat/releases/download/v1.0.0/hostat-win10.exe -O hostat.exe
.\hostat.exe
Options
$ hostat --help
Usage of hostat:
-header
Print Header or not (default true)
-thres_disk int
Threshold for Disk. Render red color if >= thres (default 80)
-thres_load int
Threshold for Load. Render red color if >= thres (default 8)
-thres_mem int
Threshold for Memory. Render red color if >= thres (default 80)
Fetch multiple nodes status
You can use pdsh to fetch multiple nodes status:
$ pdsh -w 'cluster[01-05]' -N -R ssh '/usr/local/bin/hostat --header=false' | sort
cluster01 | 8 | 1.3 | 1.2 | 1.4 | 40 % | 19 % | 4 d | drain |
cluster02 | 8 | 8.0 | 8.0 | 8.0 | 8 % | 83 % | 77 d | idle |
cluster03 | 8 | 8.0 | 8.1 | 8.0 | 7 % | 84 % | 77 d | alloc | ssarcandy(8)
cluster04 | 8 | 8.1 | 8.0 | 8.0 | 7 % | 82 % | 77 d | alloc | ssarcandy(8)
cluster05 | 8 | 8.2 | 8.1 | 8.1 | 7 % | 81 % | 77 d | alloc | ssarcandy(8)