Ever since expanding my homelab, software and hardware faults seemed to occur more often. It is really no wonder, as the expected value of faults is directly correlated to the number of machines on which faults can occur.

As I am not constantly tending to the machines (I also do other stuff, I promise), knowing whether problems arise at a glance became more important to me. This motivated me to write a tool I call inspector -- it inspects machines and tells me if something seems off:

$ ./inspector/main.sh
CPU Load
[OK]   1-minute load average is normal: 0.57 (< 8 CPUs)
[OK]   5-minute load average is normal: 0.62 (< 8 CPUs)

Filesystem Usage
[OK]   /dev/nvme0n1p2 mounted at / is 6% full
[OK]   efivarfs mounted at /sys/firmware/efi/efivars is 66% full
[OK]   /dev/nvme0n1p1 mounted at /boot is 6% full

Filesystem Inode Usage
[OK]   /dev/nvme0n1p2 mounted at / has 2% inode usage

Memory Health
not available because this module requires command memtester

Memory Usage
[OK]   Memory usage is at 16%

Packages
[OK]   pacman has been updated 5d ago (< 14d)

Services
[OK]   Service avahi-daemon.service is running
[.. several lines omitted ..]
[OK]   Service user@1000.service is running

SMART Disk Health Check
[OK]   Device /dev/nvme0 passed SMART health check

Temperatures
[OK]   B0D4: 42°C
[OK]   x86_pkg_temp: 42°C
[OK]   acpitz: 32°C
[OK]   pch_cannonlake: 34°C

One goal of it was to make it work with minimal installation effort, as I simply want to copy it onto a new machine and run it every so often. For this reason it is written in (mostly) POSIX compliant sh. If some module requires a specific command to work, it tells you.

It is available at https://codeberg.org/pingu/inspector. If you can think of more checks to add to the ones that are already implemented, please consider contributing :-)