Skip to content
View in the app

A better way to browse. Learn more.

Mopar1973Man.Com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Pillar Pod: gauges for the Server Room

(0 reviews)

image.png

Pillar Pod: gauges for the Server Room

I've got a new set of gauges on my Linux desktop, and I'm calling it the Pillar Pod. Like a pod on a truck's A-pillar, it stacks what I need to watch in one narrow column off to the side.

Too many gauges, not enough windshield

My old setup used Conky panels parked in all four corners of the screen. The information was great, but it ate the desktop. I tried a tighter layout and then banners across the top and bottom. Neither one cut the clutter.

One clean column

So we started over with a single sidebar down the right edge, and I approved a mock picture before anything got built. Here's what it gives me:

  • Status for Mopar1973Man.Com and the other things I keep an eye on

  • Simple bars and big numbers instead of walls of text

  • An alerts area at the bottom that speaks up when something needs attention

  • Reserved space, so a maximized window stops at its edge instead of covering it

Then it quit showing up

The first version still ran on Conky, and it worked, until it didn't. The program was running and reported that it had painted the panel, but my screen showed nothing. Restarts, a log out and a full reboot didn't fix it, and we never found the cause.

The fix was to rebuild it as a small GNOME Shell extension, so the desktop itself draws the sidebar. It came right up, and it loads by itself at login.

Under the hood

Three layers do the work. Small scripts gather the readings, a Python program decides what to show and what counts as an alert, and a bit of JavaScript puts it on screen. I built it with help from Claude, Anthropic's AI.

The lesson is one every mechanic knows: a part saying it works isn't the same as watching it work. Check it with your own eyes.

Build your own

Here's a trimmed-down Pillar Pod for anyone who wants PC stats on screen. It shows CPU, GPU (NVIDIA or AMD), RAM, disks, network speed and alerts. If you run a server or two, it can also show whether they're answering.

You need Linux with GNOME 45 or newer and Python 3. I tested this version on GNOME 46. It's provided as is, so read the code before you run it.

  1. Download pillar-pod.zip and unzip it.

  2. Open a terminal in the pillar-pod folder.

  3. Run bash pillar-pod.sh install

  4. Log out and back in.

To take it off again, run bash pillar-pod.sh remove and log out and back in.

Settings and servers

Settings live in ~/.config/pillar-pod.json, and changes show within about 30 seconds. Set celsius to true for Celsius, and list up to 4 folders under disks.

Servers are optional. Add up to 6 like this, using your own names and addresses:

{
  "celsius": false,
  "disks": ["/", "/home"],
  "servers": [
    {"name": "Web", "host": "example.com", "port": 443},
    {"name": "NAS", "host": "192.0.2.10", "port": 22}
  ]
}

A server counts as up if that port accepts a connection. No logins or passwords are used.

The code

The download has these files, plus a settings file, a short README and the license (LICENSE.txt). Pillar Pod is Copyright (C) 2026 Titanium, https://mopar1973man.com, and is free software under the GNU General Public License, version 3 or later, with no warranty. Copy from the download rather than the page, so nothing gets mangled.

pod.py: reads the numbers

#!/usr/bin/env python3
# Pillar Pod
# Copyright (C) 2026 Titanium - https://mopar1973man.com
# SPDX-License-Identifier: GPL-3.0-or-later
# Free software under the GNU GPL version 3 or later, with NO WARRANTY.
# See LICENSE.txt.
"""Pillar Pod: reads this PC (and optional servers) and prints what to draw."""
import glob, json, os, shutil, socket, subprocess, time

CONFIG = os.path.expanduser('~/.config/pillar-pod.json')
STATE = os.path.join(os.environ.get('XDG_RUNTIME_DIR', '/tmp'), 'pillar-pod.state')
WHITE, GREY, GREEN, AMBER, RED, BLUE = 'ecf0f3', '91a0aa', '6ecd87', 'ffba54', 'ef5350', '58c4f6'
W, L, R = 360, 18, 342

def load(path):
    try:
        with open(path) as f:
            return json.load(f)
    except (OSError, ValueError):
        return {}

cfg, prev = load(CONFIG), load(STATE)
now = time.time()
alerts = []
if os.path.exists(CONFIG) and not cfg:
    alerts.append((AMBER, 'Settings file has a typo'))

def text(x, y, s, size=15, colour=WHITE, bold=0, anchor='l'):
    print('T', x, y, size, bold, anchor, colour, ' '.join(str(s).split()), sep='\t')

def box(x, y, w, h, r, colour, alpha=1.0):
    print('R', x, y, w, h, r, colour, alpha, sep='\t')

def title(y, name):
    text(L, y, name, 18, BLUE, 1)
    return y + 30

def meter(y, label, pct, value):
    colour = RED if pct >= 90 else AMBER if pct >= 75 else GREEN
    text(L, y, label[:8], 14, GREY)
    box(L + 70, y + 4, 110, 9, 4, 'ffffff', 0.12)
    if pct > 0:
        box(L + 70, y + 4, max(9, int(110 * min(pct, 100) / 100)), 9, 4, colour)
    text(R, y, value, 14, WHITE, 0, 'r')
    return y + 25

def temp(c):
    return f'{c:.0f}°C' if cfg.get('celsius') else f'{c * 9 / 5 + 32:.0f}°F'

def read(path):
    with open(path) as f:
        return f.read().strip()

def cpu_temp():
    for hw in glob.glob('/sys/class/hwmon/hwmon*'):
        try:
            if read(hw + '/name') in ('k10temp', 'coretemp', 'zenpower', 'cpu_thermal'):
                return int(read(hw + '/temp1_input')) / 1000
        except (OSError, ValueError):
            pass
    return None

def gpu():
    """(percent busy, temperature C) for NVIDIA or AMD, else None"""
    try:
        out = subprocess.run(['nvidia-smi', '--query-gpu=utilization.gpu,temperature.gpu',
                              '--format=csv,noheader,nounits'],
                             capture_output=True, text=True, timeout=3).stdout
        busy, deg = out.splitlines()[0].split(',')
        return float(busy), float(deg)
    except Exception:
        pass
    for dev in glob.glob('/sys/class/drm/card?/device'):
        try:
            busy = float(read(dev + '/gpu_busy_percent'))
            deg = int(read(glob.glob(dev + '/hwmon/hwmon*/temp1_input')[0])) / 1000
            return busy, deg
        except (OSError, ValueError, IndexError):
            pass
    return None

def size(b):
    return f'{b / 1024**4:.1f} TB' if b >= 1024**4 else f'{b / 1024**3:.0f} GB'

def speed(b):
    return f'{b / 1048576:.1f} MB/s' if b >= 1048576 else f'{b / 1024:.1f} KB/s'

def this_pc(y):
    y = title(y, socket.gethostname()[:24])
    up = float(read('/proc/uptime').split()[0])
    d, h, m = int(up // 86400), int(up % 86400 // 3600), int(up % 3600 // 60)
    text(L, y - 6, f'up {d}d {h}h' if d else f'up {h}h {m}m', 12, GREY)
    y += 18

    with open('/proc/stat') as f:
        v = [int(x) for x in f.readline().split()[1:9]]
    total, idle = sum(v), v[3] + v[4]
    cpu = 100 * (1 - (idle - prev.get('idle', 0)) / max(1, total - prev.get('total', 0)))
    t = cpu_temp()
    y = meter(y, 'CPU', cpu, f'{cpu:.0f}%' + (f'  {temp(t)}' if t else ''))
    if t and t >= 85:
        alerts.append((AMBER, f'CPU is hot: {temp(t)}'))

    g = gpu()
    if g:
        y = meter(y, 'GPU', g[0], f'{g[0]:.0f}%  {temp(g[1])}')
        if g[1] >= 85:
            alerts.append((AMBER, f'GPU is hot: {temp(g[1])}'))

    with open('/proc/meminfo') as f:
        mem = {line.split(':')[0]: int(line.split()[1]) * 1024 for line in f}
    used = mem['MemTotal'] - mem['MemAvailable']
    y = meter(y, 'RAM', 100 * used / mem['MemTotal'],
              f'{used / 1024**3:.1f} / {mem["MemTotal"] / 1024**3:.1f} GB')

    for path in cfg.get('disks', ['/', '/home'])[:4]:
        try:
            u = shutil.disk_usage(path)
        except OSError:
            alerts.append((RED, f'Disk not found: {path}'))
            continue
        pct = 100 * u.used / u.total
        y = meter(y, path if len(path) <= 8 else os.path.basename(path), pct,
                  f'{size(u.used)} / {size(u.total)}')
        if pct >= 90:
            alerts.append((AMBER, f'{path} is {pct:.0f}% full'))

    iface = ''
    with open('/proc/net/route') as f:
        for line in f.readlines()[1:]:
            if line.split()[1] == '00000000':
                iface = line.split()[0]
                break
    rx = tx = 0
    if iface:
        rx, tx = (int(read(f'/sys/class/net/{iface}/statistics/{k}_bytes')) for k in ('rx', 'tx'))
    else:
        alerts.append((RED, 'No network connection'))
    dt = max(now - prev.get('t', 0), 0.1)
    down = max(0, rx - prev.get('rx', rx)) / dt
    upload = max(0, tx - prev.get('tx', tx)) / dt
    text(L, y + 4, 'Down', 14, GREY)
    text(L + 160, y + 4, speed(down), 14, WHITE, 0, 'r')
    text(L + 180, y + 4, 'Up', 14, GREY)
    text(R, y + 4, speed(upload), 14, WHITE, 0, 'r')
    prev.update(t=now, total=total, idle=idle, rx=rx, tx=tx)
    return y + 40

def check(server):
    """milliseconds to open a connection, or None if it did not answer"""
    start = time.time()
    try:
        with socket.create_connection((server['host'], int(server.get('port', 22))), timeout=1.5):
            return (time.time() - start) * 1000
    except (OSError, KeyError, ValueError):
        return None

def servers(y):
    wanted = cfg.get('servers', [])[:6]
    if not wanted:
        return y
    # asked every 30 seconds, not every redraw
    if now - prev.get('checked', 0) >= 30 or prev.get('asked') != wanted:
        prev.update(checked=now, asked=wanted, results=[check(s) for s in wanted])
    box(L, y - 12, R - L, 1, 0, 'ffffff', 0.14)
    y = title(y, 'Servers')
    for s, ms in zip(wanted, prev['results']):
        name = str(s.get('name') or s.get('host', '?'))[:24]
        box(L, y + 4, 10, 10, 5, RED if ms is None else GREEN)
        text(L + 20, y, name, 14)
        text(R, y, 'DOWN' if ms is None else f'{ms:.0f} ms', 14, RED if ms is None else GREY, 0, 'r')
        if ms is None:
            alerts.append((RED, f'{name} is not answering'))
        y += 25
    return y + 15

box(0, 0, W, 1000, 16, '0a0e12', 0.9)
y = this_pc(18)
y = servers(y)
box(L, y - 12, R - L, 1, 0, 'ffffff', 0.14)
y = title(y, 'Alerts')
for colour, message in (alerts or [(GREEN, 'All good.')])[:8]:
    box(L, y + 4, 10, 10, 5, colour)
    text(L + 20, y, message[:38], 14)
    y += 25

with open(STATE, 'w') as f:
    json.dump(prev, f)

extension.js: draws the sidebar

// Pillar Pod
// Copyright (C) 2026 Titanium - https://mopar1973man.com
// SPDX-License-Identifier: GPL-3.0-or-later
// Free software under the GNU GPL version 3 or later, with NO WARRANTY.
// See LICENSE.txt.
// Pillar Pod: a narrow status sidebar drawn by GNOME Shell itself.
import GLib from 'gi://GLib';
import Gio from 'gi://Gio';
import St from 'gi://St';
import Pango from 'gi://Pango';
import PangoCairo from 'gi://PangoCairo';
import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';

const W = 360, H = 1000;    // size pod.py draws for; scaled to your screen

export default class PillarPod extends Extension {
    enable() {
        this._ops = [];
        this._busy = false;
        this._area = new St.DrawingArea({reactive: false});
        this._area.connect('repaint', area => this._paint(area));
        // affectsStruts: maximized windows stop at the sidebar's edge
        Main.layoutManager.addChrome(this._area, {affectsStruts: true, trackFullscreen: true});
        this._monitors = Main.layoutManager.connect('monitors-changed', () => this._place());
        this._place();
        this._update();
        this._timer = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 2, () => {
            this._update();
            return GLib.SOURCE_CONTINUE;
        });
    }

    disable() {
        if (this._timer)
            GLib.source_remove(this._timer);
        if (this._monitors)
            Main.layoutManager.disconnect(this._monitors);
        if (this._area) {
            Main.layoutManager.removeChrome(this._area);
            this._area.destroy();
        }
        this._timer = this._monitors = this._area = null;
        this._ops = [];
    }

    _place() {
        const m = Main.layoutManager.primaryMonitor;
        if (!m)
            return;
        const scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;
        const h = m.height - Main.panel.height;
        const w = Math.round(W * Math.min(h / H, scale));
        this._area.set_position(m.x + m.width - w, m.y + Main.panel.height);
        this._area.set_size(w, h);
        this._area.queue_repaint();
    }

    _update() {
        if (this._busy)
            return;
        try {
            const proc = Gio.Subprocess.new(['timeout', '20', 'python3', `${this.path}/pod.py`],
                Gio.SubprocessFlags.STDOUT_PIPE);
            this._busy = true;
            proc.communicate_utf8_async(null, null, (p, result) => {
                this._busy = false;
                try {
                    const [, out] = p.communicate_utf8_finish(result);
                    if (this._area && p.get_successful()) {
                        this._ops = out.split('\n').map(line => line.split('\t'));
                        this._area.queue_repaint();
                    }
                } catch (e) {
                    console.error(`pillar-pod: ${e.message}`);
                }
            });
        } catch (e) {
            console.error(`pillar-pod: ${e.message}`);
        }
    }

    _paint(area) {
        const cr = area.get_context();
        const [width, height] = area.get_surface_size();
        const k = Math.min(width / W, height / H);
        cr.scale(k, k);
        const colour = (hex, a = 1) => cr.setSourceRGBA(
            parseInt(hex.slice(0, 2), 16) / 255,
            parseInt(hex.slice(2, 4), 16) / 255,
            parseInt(hex.slice(4, 6), 16) / 255, a);
        const layout = PangoCairo.create_layout(cr);
        const font = Pango.FontDescription.from_string('Sans');
        colour('0a0e12', 0.92);
        cr.rectangle(0, 0, width / k, height / k);
        cr.fill();

        for (const p of this._ops) {
            if (p[0] === 'R') {
                const [x, y, w, h] = p.slice(1, 5).map(Number);
                const r = Math.min(Number(p[5]), w / 2, h / 2);
                colour(p[6], Number(p[7]));
                if (r > 0) {
                    cr.newSubPath();
                    cr.arc(x + w - r, y + r, r, -Math.PI / 2, 0);
                    cr.arc(x + w - r, y + h - r, r, 0, Math.PI / 2);
                    cr.arc(x + r, y + h - r, r, Math.PI / 2, Math.PI);
                    cr.arc(x + r, y + r, r, Math.PI, 3 * Math.PI / 2);
                    cr.closePath();
                } else {
                    cr.rectangle(x, y, w, h);
                }
                cr.fill();
            } else if (p[0] === 'T' && p[7]) {
                let x = Number(p[1]);
                const y = Number(p[2]), size = Number(p[3]);
                font.set_weight(p[4] === '1' ? Pango.Weight.BOLD : Pango.Weight.NORMAL);
                font.set_absolute_size(size * Pango.SCALE);
                layout.set_font_description(font);
                layout.set_text(p[7], -1);
                if (p[5] === 'r')
                    x -= layout.get_pixel_size()[0];
                colour(p[6]);
                cr.moveTo(x, y + size * 0.93 - layout.get_baseline() / Pango.SCALE);
                PangoCairo.show_layout(cr, layout);
            }
        }
        cr.$dispose();
    }
}

#!/bin/bash
# Pillar Pod
# Copyright (C) 2026 Titanium - https://mopar1973man.com
# SPDX-License-Identifier: GPL-3.0-or-later
# Free software under the GNU GPL version 3 or later, with NO WARRANTY.
# See LICENSE.txt.
# Pillar Pod installer.
#   bash pillar-pod.sh install     then log out and back in
#   bash pillar-pod.sh remove      then log out and back in
UUID=pillar-pod@mopar1973man.com
SRC="$(cd "$(dirname "$0")" && pwd)"
DEST="$HOME/.local/share/gnome-shell/extensions/$UUID"
CONFIG="$HOME/.config/pillar-pod.json"

enabled_list() {   # add or remove Pillar Pod in GNOME's list of enabled extensions
    python3 - "$1" "$UUID" <<'PY'
import ast, subprocess, sys
action, uuid = sys.argv[1:]
key = ['org.gnome.shell', 'enabled-extensions']
raw = subprocess.check_output(['gsettings', 'get', *key], text=True).strip()
items = [x for x in ast.literal_eval(raw.removeprefix('@as ')) if x != uuid]
if action == 'add':
    items.append(uuid)
    subprocess.check_call(['gsettings', 'set', 'org.gnome.shell', 'disable-user-extensions', 'false'])
    # if it was ever switched off by hand, GNOME keeps it on a "disabled" list
    off = ['org.gnome.shell', 'disabled-extensions']
    raw_off = subprocess.check_output(['gsettings', 'get', *off], text=True).strip()
    rest = [x for x in ast.literal_eval(raw_off.removeprefix('@as ')) if x != uuid]
    subprocess.check_call(['gsettings', 'set', *off, str(rest) if rest else '@as []'])
subprocess.check_call(['gsettings', 'set', *key, str(items) if items else '@as []'])
PY
}

case "$1" in
install)
    [ "$(id -u)" -ne 0 ] || { echo "Run this as yourself, without sudo."; exit 1; }
    major=$(gnome-shell --version 2>/dev/null | grep -oE '[0-9]+' | head -1)
    if [ -z "$major" ] || [ "$major" -lt 45 ]; then
        echo "Pillar Pod needs GNOME 45 or newer (found: ${major:-no GNOME}). Nothing changed."; exit 1
    fi
    mkdir -p "$DEST" "$HOME/.config"
    cp "$SRC/extension.js" "$SRC/pod.py" "$SRC/LICENSE.txt" "$DEST/" || exit 1
    printf '{"uuid": "%s", "name": "Pillar Pod", "description": "PC status sidebar", "shell-version": ["%s"]}\n' \
        "$UUID" "$major" > "$DEST/metadata.json"
    [ -f "$CONFIG" ] || cp "$SRC/pillar-pod.json" "$CONFIG"
    enabled_list add || { echo "Could not enable it."; exit 1; }
    echo "Installed. Log out and back in to see it."
    echo "Settings: $CONFIG"
    ;;
remove)
    enabled_list remove
    rm -rf "$DEST"
    echo "Removed. Log out and back in to finish. Your settings file was kept."
    ;;
*)
    echo "Use: bash pillar-pod.sh install | remove"
    ;;
esac

Edited by Titanium

0 Comments

Recommended Comments

There are no comments to display.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.