tosview is a terminal system resource monitor written in C, inspired by SGI IRIX gr_osview and xosview. Its main visual model is resource composition: several native resource states share one horizontal stacked bar. It is not a top clone and will not include a process list or process sorting.
OpenBSD, FreeBSD, NetBSD ports: tosview-ports
WIP!
Build with a C99-capable compiler cc(1), make(1), libc and the system curses(3) headers and library. Works with BSD make and GNU make.
Build:
makecc and -lcurses are the default, clean and use build vars to override:
make clean
make CC=clang CFLAGS='-std=c99 -O2' LDLIBS=-lncursesDragonFly's live image has ncurses under /usr/local:
make CPPFLAGS='-I/usr/local/include -I/usr/local/include/ncurses' \
LDFLAGS=-L/usr/local/lib LDLIBS=-lncursesOpenIndiana's GCC package provides gcc, so use make CC=gcc.
| Variable | Default | Purpose |
|---|---|---|
| CC | cc | C compiler |
| CFLAGS | -O | Compiler flags |
| CPPFLAGS | empty | Preprocessor flags |
| LDFLAGS | empty | Linker flags |
| LDLIBS | -lcurses | Application link libraries |
| OSLIBS | detected | Native libraries; override when cross-compiling |
| PLATFORM | auto | Collector source; auto chooses the native OS |
| PREFIX | /usr/local | Installation prefix |
| DESTDIR | empty | Staging dir prepended to the prefix |
Collectors: openbsd, freebsd, netbsd, dragonfly, linux, sunos, irix,
hpux and none. SunOS uses the system libkstat library.
Install into a writable personal prefix:
make install PREFIX="$HOME/.local"For packaging, stage the default prefix into a writable directory:
make install DESTDIR=/path/to/stagingThe executable goes into PREFIX/bin and the manual into
PREFIX/share/man/man1. Use doas(1) to install into a non-home prefix.
./tosview- Refreshes once per second by default;
qquits. - Space pauses or resumes sampling. Resume takes a fresh counter baseline.
- Press
rto reset rate scales on the next sample. - Use
j/kto scroll, Ctrl-F/Ctrl-B for pages, andg/Gfor the start/end. - Press
?for help;?or Escape closes it. Sampling continues unless paused. - Colour bars use the terminal palette. Without colour, numbered segments match the legend;
-mforces this mode.
Legends show CPU percentages and memory/swap sizes, including total capacity. They wrap to fit the terminal; scroll to reach the remaining lines and meters. The top line shows the visible meter range.
| Option | Action |
|---|---|
| -i interval | Seconds between samples |
| -m | Force monochrome |
| -h | Print usage and exit |
| -V | Print version and exit |
The interval accepts fractions, from 0.1 to 86400 seconds.
See tosview.1 or man ./tosview.1.
make testRun ./tests/ui -t in a terminal to check drawing, controls and terminal
restoration. It needs at least 20 columns and 4 rows.
| OS | Architecture | Compiler | Curses | Skeleton | Native collectors |
|---|---|---|---|---|---|
| OpenBSD 8.0 GENERIC.MP#32 | amd64 | Clang 22.1.6 | System ncurses 6.4 | Runtime tested | CPU/memory/swap/load/disk/net |
| FreeBSD 15.1-RELEASE-p3 | amd64 | Clang 19.1.7 | System ncurses 6.6 | Runtime tested | CPU/memory/swap/load/disk/net |
| NetBSD 10.1 | amd64 | GCC 10.5.0 | System curses | Runtime tested | CPU/memory/swap/load/disk/net |
| DragonFly 6.4.2 | x86_64 | GCC 8.3 | ncurses 6.5 | Runtime tested | CPU/memory/swap/load/disk/net |
| OpenIndiana 2026.04 | amd64 | GCC 14.3.0 | System curses | Runtime tested | CPU/memory/swap/load/disk/net |
| Linux 7.0.0-31-generic | x86_64 | GCC 15.2.0, Clang 21.1.8 | ncurses 6.6 | Runtime tested | CPU/memory/swap/load/disk/net |
| UnixWare 7.1.4 D2M1 | i386 | OUDK 8.0.2f | System curses | UI tested | Planned |
UnixWare passes make test PLATFORM=none CFLAGS='-O -v' as an ordinary user
with CCS 4.2 (27 March 2014). Terminal tests cover drawing, scrolling, help,
pause/resume, resize, quit and signal cleanup. The native headers need the
SCO compiler's default namespace.
The UnixWare guest uses QEMU 10.2.1 with KVM and a Pentium III CPU. Its clock
runs fast: sleep 10 took about two host seconds. Timing remains unverified.
The MAS probe requires access to /dev/kmem, denied to the test user.
UnixWare has no collector or release package.
tosview is independently implemented under the ISC licence.
