newtop — A Lean Terminal System Monitor Written in Go

top ships on every Linux system. htop is better. But both carry more history than features — ncurses dependencies, config files, compiled C that assumes things about your system. I wanted something simpler: a single binary, no external packages, reads /proc and /sys directly, renders to the terminal and gets out of the way.
That’s newtop.
Download
Linux, x86-64.
curl -L https://bensantora.com/downloads/newtop-linux-amd64 -o newtop
chmod +x newtop
./newtop
Source: newtop-source.tar.gz | newtop-source.zip
How Do You Build newtop?
Requires Go 1.21+. Four files, no external dependencies. Build from source:
go build -o newtop .
./newtop
No apt install, no shared libraries, no daemon running in the background. The binary is self-contained.
What Does newtop Display?
newtop shows six things, refreshed every second:
CPU — per-thread utilization bars, per-thread frequency in MHz, and package temperature. Each bar is color-coded: green below 50%, yellow 50–80%, red above 80%. The display automatically adjusts to one, two, or four columns depending on your thread count and terminal width.
MEM — used, total, available, and cached — with the same bar and color thresholds.
DISK — read and write rates in KB/s for every physical disk. Partitions are filtered out; only whole disks show.
NET — RX/TX rates per interface. Rates above 1 MB/s are displayed as MB/s automatically. Loopback is excluded.
PROCESSES — top processes by CPU usage, sorted descending. The list scales to your terminal height — it fills exactly the rows available after the fixed sections. On wide terminals (≥120 columns) it switches to a two-column layout.
Header and footer — CPU model, thread count, total RAM, and the current time. All of it fits to whatever width your terminal reports.
How Does newtop Adapt to Different Hardware?
At startup, newtop detects your hardware rather than assuming it:
- CPU model and thread count from
/proc/cpuinfoand/proc/stat - Terminal dimensions via
TIOCGWINSZioctl, re-queried every tick so resize works - CPU temperature from the
x86_pkg_tempthermal zone, with a fallback tothermal_zone0if that’s not present - Per-core frequency from
/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq
There are no hardcoded paths to specific hardware, no assumptions about core count, no expected screen width. A 4-core machine and a 32-core machine both get a sensible layout.
How Is CPU% Calculated?
Per-process CPU percentage is:
cpu% = (delta_ticks / (elapsed_seconds × 100)) × 100
delta_ticks is the change in utime + stime from /proc/[pid]/stat between two samples taken one second apart. 100 is CLK_TCK — jiffies per second, standard on x86 Linux. This is the same method top and htop use.
Per-thread aggregate CPU percentage comes from /proc/stat — the same delta approach, comparing idle vs. active jiffies across the sample interval.
Does newtop Have Any External Dependencies?
The go.mod lists one module: the standard library. Nothing from pkg.go.dev, no vendored packages. The whole thing is four files:
main.go — startup, main loop, signal handling
sys.go — hardware detection, temperature, frequency, disk and network I/O
proc.go — process sampling and CPU% calculation
render.go — terminal rendering: bars, colors, layout
If you can read Go, you can read all of newtop in an afternoon. Every number on screen traces back to a specific /proc or /sys read.
Why Not Just Use htop?
htop is fine. If it’s already on your system and does what you need, use it. The point of newtop isn’t to replace it — it’s to have something I fully understand, that I can modify without touching ncurses, and that compiles to a single binary I can drop on any Linux box. Sometimes the right tool is the one you built yourself.
For network socket monitoring on the same machine, see netsock — the companion tool that covers open sockets, exposure scope, and /proc/net.
FAQ
Q: What is newtop?
A terminal-based Linux system monitor written in Go with zero external dependencies. It reads /proc and /sys directly and renders CPU, memory, disk, network, and process data to the terminal, updated every second.
Q: How is newtop different from htop or top? newtop is a single self-contained binary with no ncurses dependency, no config files, and no assumptions about your hardware. It auto-detects CPU topology, terminal width, and thermal zones at startup. It also shows per-thread CPU frequency alongside utilization, which neither top nor htop does by default.
Q: Does newtop require root or sudo?
No. It reads from /proc and /sys, which are readable by any user on a standard Linux system.
Q: What does newtop read from /proc and /sys?
/proc/stat for per-thread CPU jiffies, /proc/[pid]/stat for per-process CPU time, /proc/meminfo for memory, /proc/diskstats for disk I/O, /proc/net/dev for network rates, /proc/cpuinfo for CPU model, and /sys/devices/system/cpu/*/cpufreq/scaling_cur_freq for per-core frequency.
Q: Does newtop work on any Linux hardware configuration?
Yes, within x86 Linux. It handles any core count and terminal width, with layout automatically adjusting to available columns and rows. Temperature reads from x86_pkg_temp with a fallback to thermal_zone0 for systems where the primary zone isn’t present.
Tested on Debian/CrunchBang++. Go 1.21+. Linux only — reads /proc and /sys directly.