What do you use as a system monitor - Printable Version
+- nixers (
+-- Forum: Operating Systems & Administration (
+--- Forum: Servers Administration, Networking, & Virtualization (
+--- Thread: What do you use as a system monitor (/Thread-What-do-you-use-as-a-system-monitor)

What do you use as a system monitor - venam - 10-02-2022

Hello nixers,
Here's a simple thread: What do you use as a system monitor and do you have recommendations.

I normally go for htop and top but I'm looking to broaden my horizons.

Be sure to mention the OS it runs on (if only a particular one), and provide a link.

RE: What do you use as a system monitor - neeasade - 10-02-2022

I use htop. as far as "finding out when shit is whack", I monitor--

- temp and battery in a systemd user service:

- disk space via a section on my panel that pops up:

I guess it might also be nice to be alerted when there's high IO or cpu usage or something (over some time period/non-bursty)

RE: What do you use as a system monitor - movq - 12-02-2022

htop here, too. It can usually answer all of my questions.

One of the things it can't do is show network usage. For my Linux desktop/laptop, I just have a widget in my status bar (along with CPU usage and such). It's surprisingly rare that I need to show network usage on a server in real time (we have long-term statistics using influx/telegraf). When I do, I usually went for iftop. I just found bmon which has a slightly nicer UI and doesn't need root.

(10-02-2022, 10:08 PM)neeasade Wrote: temp

That's interesting. Why do you need an alert when CPU temp goes up? Cooling issues?

RE: What do you use as a system monitor - neeasade - 12-02-2022

> Why do you need an alert when CPU temp goes up? Cooling issues?

It was for an old thin thinkpad I had that probably needed thermal paste re-applied -- Positioning and a cooler could matter a lot, and so I needed something to nudge me to keep that in mind

edit: I was also QUITE mobile at the time for context. coffee shops, conference rooms, a friends living room, different every day.

RE: What do you use as a system monitor - seninha - 12-02-2022

On my OpenBSD desktop, I configured apmd to log every minute at /var/log. I also configured sensorsd.conf to set a high temperature value that, when passed, a message should be logged.
Then, I run an awk script at X login that reads apmd log (from tail -f) and writes a notification to xnotify's fifo when a interesting line is read.
It currently only greps for lines reporting low battery and high temperature (see the image below, at top right).

For my dock/bar I use WindowMaker-style dockapps, in particular wmbubble, which compiles some CPU and memory info as a duck swimming on a pool of bubbling water. When a mouse is over it, wmbubble shows the load average graph.

[Image: mon.png]

RE: What do you use as a system monitor - venam - 13-02-2022

On that note, I also forgot I have a script for battery status that pops up at certain intervals.
It's running as a systemd user timer (~/.config/systemd/user/
The timer unit
Description=Timer to run battery-notify


and service unit:



And the actual script that gets called check-batt, which is very similar to what neeasade is doing but with threshold values:
#!/usr/bin/env bash

BATTPERC=$(cat /sys/class/power_supply/BAT${BAT_NUM}/capacity)
BATTSTATUS=$(cat /sys/class/power_supply/BAT${BAT_NUM}/status)

if [ -e $STATUS_FILE ] ; then

save_status() {

notify() {
    DISPLAY=:0 /usr/bin/notify-send -t 3500 -u "$level" "POWER" "$msg"

# Battery status changed
if [[ "$BATTSTATUS" != "$LAST_STATUS" ]] ; then
    notify "normal" "battery is now $BATTSTATUS, Capacity: $BATTPERC"

if [ "$BATTSTATUS" = Discharging ] && [ "$BATTPERC" -le 10 ]; then
    notify "critical" "battery is less than 10% - Connect charger, going to sleep in 10s"
    sleep 10
    BATTSTATUS=$(cat /sys/class/power_supply/BAT${BAT_NUM}/status)
    if [ "$BATTSTATUS" = Discharging ]; then
        notify "critical" "going to suspend now"
        sleep 3
        logger "Critical battery threshold, suspending"
        systemctl suspend
        notify "normal" "battery is now charging, cancelling suspend"

if [[ $BATTPERC -le 20 ]] ; then
    notify "critical" "battery $BATTSTATUS is less than 20%"
elif [[ $BATTPERC -le 30 ]] ; then
    if [ "$NOTIF_LEVEL" != "$LAST_NOTIF_LEVEL" ]; then
        notify "normal" "battery $BATTSTATUS is at 30%"
elif [[ $BATTPERC -le 50 ]] ; then
    if [ "$NOTIF_LEVEL" != "$LAST_NOTIF_LEVEL" ] ; then
        notify "low" "battery $BATTSTATUS is at 50%"
elif [[ $BATTPERC -le 60 ]] ; then
    if [ "$NOTIF_LEVEL" != "$LAST_NOTIF_LEVEL" ] ; then
        notify "normal" "battery $BATTSTATUS is at 60%"

RE: What do you use as a system monitor - pfr - 14-02-2022

(12-02-2022, 09:36 PM)seninha Wrote: On my OpenBSD desktop

Man, I love your desktop. Everytime I see it I'm intrigued. I wish you would just fork a distro or release a pre-configured live image. It's so polished and consistant. Harmonious even.

Anyway, I keep saying I'm going to use shod once I have a desktop setup (with a mouse). Eventually!

Back to the topic at hand, I quite like nmon as a system monitor.

RE: What do you use as a system monitor - VMS - 15-02-2022

(13-02-2022, 05:49 AM)venam Wrote: On that note, I also forgot I have a script for battery status that pops up at certain intervals.

I do have one too on NetBSD, and the concept is somehow similar:

    CHARGE=$(/usr/sbin/envstat | grep charge: | sed 's/.*(\(.*\))/\1/')
    BATT=$(echo $CHARGE | awk '{print $1}')

if envstat | grep -Eiq 'charging.*true'; then
notify-send "$(echo -e "battery = $BATT \nstatus  = $STATUS")"

It relies on envsys(4) (Environmental Systems framework), which was written by the creator of Void's XBPS and can print a lot of useful info from monitor devices and sensors in quite a fancy and human-readable fashion.

Usually I bind this to something like Mod4 + b in CTWM.
Similarly, I bind Mod4 + v to:

VOL=$(mixerctl -n outputs.master | cut -d , -f 1 | \
     awk '{print $1/254*100}' | cut -d . -f 1)
notify-send "volume: $VOL %"

In my ~/.profile I have this little function to monitor power-management related events. I usually have a sticky term running it in foreground.

             ( tail -f -n0 /var/log/messages & ) | sed -n -e 's/^.*sensor_battery: //p'

As a pseudo graphical resource monitor, I really love systat; the interface might look a bit ugly by modern standards, as it relies on the native curses library, which is more limited compared to ncurses, but it does its job and does it well. systat can display various statistics at the same time including cpu load, virtual memory, processes, swap usage, disk i/o, open sockets, established connections, network traffic...for example `systat iostat` looks like that:

[Image: systat.png]

To quickly display the number of total used buffers in megabytes, I also use this script; useful on server and public access BSD systems like SDF or GREX.

vmstat -s | awk '
/ bytes per page$/ { bpp = $1 }
/ cached file pages$/ { cfp = $1 }
/ cached executable pages$/ { cep = $1 }
END { print((cfp + cep) * bpp / 1024 / 1024); }'

As for graphical tools, I really like a tool ported from old versions of SPARC32 Solaris and called xmeter. I was unable to find a description to link here, but, from the man page:

Quote: Xmeter displays a periodically updating histogram of the system
statistics gathered by rstat(3) for the specified hosts. Meters can be
displayed in a vertical, horizontal or rectangular arrangement. As
statistics range between 4 user defineable levels (OK, WARN, ERROR or
FATAL), the background, foreground, highlight, border and internal
border colors, and the background bitmap of each meter can be changed.

rstat is a daemon capable of returning performance statistics obtained from the kernel. These can be read using the rup(1) command. rstat is a Sun RPC protocol, and I suppose that's why I was unable to find a port of xmeter for Linux.

RE: What do you use as a system monitor - pyratebeard - 18-02-2022

I use the same battery script as venam, and I also use htop(1).

Another tool that I quite like is glances.

RE: What do you use as a system monitor - jkl - 21-02-2022

Iā€™m perfectly fine with the built-in tools. I noticed that the additional overhead is just not worth it.

RE: What do you use as a system monitor - prx* - 24-02-2022

On OpenBSD, I use this little script to output in tmux status or dwm's bar various info : mpd current song, battery remaining, audio volume, date. There are also functions for disk usage, cpu and ram that I actually don't use (top/vmstat/systat are good for this)

[Image: oKVt.png]

    df -h $1 | awk 'NR==2 {print $5}'

    sndioctl output.level | awk -F = '{printf "%d\n",$2*100}'

ram() {
    top | awk '/Memory/ { print $3 }'

    #uptime | awk -F'[a-z]:' '{print $2}' | tr -d ' '
    sysctl -n vm.loadavg

    apm | awk 'NR==1 && !/absent/ {printf "%s", $4}'
    #test $(apm -a) -eq 0 && printf "āš”%s%%" $(apm -l)

mpc | awk '
(NR == 1) {
    status = $0
    if (length(status) > 42) {
        status = substr($0, 1, 42) "..."
(NR == 2) && /playing/ {
    isplaying = 1
END { if (isplaying) { printf "[%s]", status } }

    sysctl hw.sensors | awk -F"=" '{print $2; exit}'

printf "%s / āš” %s / šŸ”ˆ %s / %s" \
     "$(bat)" \
     "$(get_vol)%" \
     "$(date "+šŸ“… %Y-%m-%d / šŸ•“ %H:%M")"

RE: What do you use as a system monitor - akoizumi - 17-04-2022

I'm usually using htop and relying on conky for the rest, which is mainly CPU load, RAM usage, assigned IP address, battery charge[*], uptime[*] and date/time[*]
  • Also handled by tmux via apm(8), (a script I wrote), and the default date/time setting

RE: What do you use as a system monitor - maksim - 29-09-2022

I use Btop, it is an awesome TUI utility with a good UI. I also made an Everforest theme for it, which is already inside of Btop.