On Linux, Tokenmeter has four parts:
- The
tokenmeterservice watches the servers, counts tokens and answers onhttp://127.0.0.1:7733. It runs as a systemd user unit and starts at login. - The app, a window with the Monitor, Usage, Performance, Gizmo, Engines and Settings pages. It wears the Machine Room's colours on every desktop.
- The notification area icon, the gauge in the system tray, with a menu of the servers and their speed. It starts at login and works on any desktop with a StatusNotifierItem tray, not only Plasma (see Other desktops).
- The Plasma 6 widget, a gauge for the system tray or a panel, with a fuller popup (charts, GPU and memory, Gizmo).
There are two ways to install: the Flatpak (simplest, brings its own Qt) or the install script (from a release tarball or a clone). Neither needs root; both install for your user only.
Download Tokenmeter-<version>-linux-x86_64.flatpak from Releases and open it in Discover, or from a terminal:
flatpak install --user Tokenmeter-*-linux-x86_64.flatpak
flatpak run io.github.tokenmeter1.tokenmeterFlatpak fetches the KDE runtime from Flathub the first time.
Why it asks to talk to org.freedesktop.Flatpak: the service finds servers by their processes, which a sandboxed app can't see. So the first time the window opens, Tokenmeter sets up the service outside the sandbox (a systemd user unit at ~/.config/systemd/user/tokenmeter.service running the binary the Flatpak carries) and installs the Plasma widget. Both follow Flatpak updates the next time the window opens. If you already installed with install.sh, that service is used and left alone.
| Distribution | Command |
|---|---|
| Fedora | sudo dnf install qt6-qtdeclarative-devel |
| Arch, Manjaro | sudo pacman -S qt6-declarative |
| Debian, Ubuntu, KDE neon | sudo apt install qml-qt6 qml6-module-qtquick qml6-module-qtquick-controls qml6-module-qtquick-layouts qml6-module-qtquick-templates qml6-module-qtquick-window qml6-module-qtqml-workerscript qml6-module-qtcore qml6-module-qt-labs-settings |
| openSUSE | sudo zypper install qt6-declarative-tools qt6-declarative-imports |
Plasma has most of this already; other desktops usually have none of it. Debian and Ubuntu split Qt into a package for each part, which is why their line is long. If you're not sure what your system has, ask the installer, which installs nothing with --check:
Linux/install.sh --checkIt names the parts of Qt that are missing with the command that installs them, and says whether your desktop shows app icons in its notification area. After a normal install it says the same when the window couldn't open yet.
For Tokenmeter's icon in the task bar, also install CMake and a C++ compiler (cmake gcc-c++ on Fedora, cmake gcc on Arch, cmake g++ qt6-declarative-dev qt6-base-dev on Debian and Ubuntu). install.sh then compiles a small Qt window that names itself after Tokenmeter's menu entry. Without them the window opens with Qt's qml tool, which works the same but shows a generic icon in the task bar.
For alerts you also need notify-send (libnotify on Fedora and Arch, libnotify-bin on Debian and Ubuntu; Plasma usually has it).
tar -xzf Tokenmeter-*-linux-x86_64.tar.gz
cd Tokenmeter-*-linux-x86_64
./install.shBuilding needs the Swift toolchain (6.x).
git clone https://github.com/tokenmeter1/Tokenmeter.git
cd Tokenmeter
Linux/install.shFedora. swift may already be a different program: the OpenStack client (python-swiftclient) uses the same name. swift --version tells them apart (the compiler answers Swift version …). Install the compiler with either:
sudo dnf install swift-lang # Fedora's package, where your release has it
# or swift.org's installer, which keeps the toolchain in ~/.local/share/swiftly:
sudo dnf install binutils gcc git unzip glibc-static libstdc++-static libcurl-devel libedit-devel \
libicu-devel libuuid-devel libxml2-devel sqlite-devel python3-devel
curl -O https://download.swift.org/swiftly/linux/swiftly-$(uname -m).tar.gz
tar -zxf swiftly-$(uname -m).tar.gz && ./swiftly initThe installer looks past a swift that isn't the compiler, so the OpenStack client can stay. If your toolchain is somewhere unusual: SWIFT=/path/to/swift Linux/install.sh.
Arch. Install Swift with swift.org's swiftly installer as above (Arch's own dependencies: sudo pacman -S base-devel git unzip curl libedit icu libxml2 sqlite python), or from the AUR (swift-bin).
tokenmeterandtokenmeter-appin~/.local/bin- the service as a systemd user unit, started now and at login
- Tokenmeter in the application menu
- the Plasma widget
Run it again to update. To remove it, see Uninstall.
On a machine you watch from another computer, such as an NVIDIA DGX Spark or a GPU server without KDE, install the service alone:
Linux/install.sh --service-onlyOr take the service package from Releases, tokenmeter-service-<version>-linux-x86_64.tar.gz (or -aarch64), which holds the service and this installer and nothing else; its install.sh installs the service without being told to.
It keeps running after you log out, and other machines can read it right away (--local-only keeps it to itself). Then add the machine on the Mesh page of your Mac or desktop, or run tokenmeter join <address of one of your machines> on it and allow it there (see The mesh). Release downloads come for x86_64 and aarch64. A machine that already runs Tokenmeter can also do all of this for you over SSH: see Installing on another machine.
Tokenmeter is built on Plasma, but only the widget belongs to it. The service, the window and the notification area icon are plain Qt, so they run on other desktops with the packages above.
- The window looks the same everywhere: it brings its own colours and controls.
- The notification area icon takes the widget's place. Xfce, Cinnamon, MATE, LXQt, Budgie and COSMIC show it once their panel has a tray (most do from the start). GNOME shows app icons in its top bar only with the AppIndicator and KStatusNotifierItem Support extension: Ubuntu has it switched on, while on Fedora, Debian and Arch you install
gnome-shell-extension-appindicator, log out and in, and switch it on in the Extensions app. Then runtokenmeter-app --tray. The installer tells you when nothing shows the icon yet. - The Plasma widget is not installed where there is no Plasma.
- Alerts arrive as the desktop's own notifications through
notify-send.
How far this has been tried: on Ubuntu 24.04 without Plasma, every page of the window opens with the packages above and Qt has no complaints. On a real GNOME, Xfce or COSMIC session nothing has been tried yet, so if something looks wrong there, open an issue with what Linux/install.sh --check says.
- Open the app from the application menu, or run
tokenmeter-app. - The notification area icon shows up by itself. Hover it for the speed; click it to open the window (clicking again brings the same window back); right-click it for each server with its speed, what Insights noticed, today's tokens, the pages, Copy API Address, Show Icon at Login and Hide Icon. An amber dot on the gauge means Insights has a high-priority finding. To bring it back after hiding it, run
tokenmeter-app --tray. The install script needs CMake, a C++ compiler and Qt 6's development files for it (it says which packages when they're missing); the Flatpak has it built in.
- Add the widget (optional, if you'd like its popup instead of or as well as the icon): right-click the system tray › Configure System Tray… › switch on Tokenmeter under Entries. Or right-click a panel › Add Widgets… and drag Tokenmeter onto it. After updating, log out and back in so Plasma loads the new widget.
- Check the service:
systemctl --user status tokenmeter
systemctl --user restart tokenmeter
journalctl --user -u tokenmeterUsage history lives in ~/.local/share/Tokenmeter (since 0.9.0 the logged requests and the agents' replies are in the database tokenmeter.db there; see Where the history is kept). Tokens are counted while the service runs. The history is written once a minute and when the service stops; in between, each finished request is a line in usage.journal there, so a crash loses nothing and the next start adds those lines back.
- GPU: NVIDIA through its driver's library (
libnvidia-ml) ornvidia-smi; AMD through/sys/class/drm. Each card's power limit, slot, memory activity, memory errors and what holds it back come from the same places (NVIDIA's library gives the most;nvidia-smigives no slot traffic or memory errors; AMD's are read from the card'shwmonsensors and its PCI entry, and "held back" there means at its power limit or within two degrees of the temperature it slows down at). None of it needs root. Intel's Arc cards and the Arc graphics inside Core Ultra processors are read from their drivers' files (see Intel Arc). When the computer has an NVIDIA card or a discrete AMD or Intel card, the processor's integrated graphics are left out. Other cards show no GPU load. A chip that shares the computer's memory, such as the DGX Spark's GB10, shows its memory as Memory in Use by the GPU (shared), as on a Mac. - Memory:
/proc/meminfo, with pressure from/proc/pressure/memory. - Paging and waiting: swap traffic and hard page faults from
/proc/vmstat; the waits from/proc/pressure/memory,cpuandio(kernels built with pressure stall information, which most distributions are). - Processor clock: each core's
cpufreqfolder under/sys/devices/system/cpu(scaling_cur_freq,cpuinfo_max_freq,scaling_driver,scaling_governor,energy_performance_preference). A virtual machine usually has none. - Disks:
/proc/diskstatsfor each whole disk; the temperature from the kernel's NVMe sensor, or for SATA disks thedrivetempmodule (sudo modprobe drivetempif a SATA disk shows no temperature). Disks under 1 GB are left out. - Fans: the motherboard's sensor chips under
/sys/class/hwmon. Many boards need their sensor module loaded first (sudo sensors-detectfrom lm_sensors finds it). A header with no fan on it is left out. - Error counts: memory from the kernel's EDAC drivers (
/sys/devices/system/edac, machines with ECC memory), the graphics cards' link errors from theiraer_dev_*files, network errors and drops from/sys/class/net/*/statistics, TCP resends from/proc/net/snmp, fast-link errors from/sys/class/infiniband. Since 0.8.32 the bytes and resends of this machine's open connections to the other machines Tokenmeter already calls (its mesh members and remote engines) come fromss -tin(the iproute2 package), at most every 5 seconds. All are the kernel's own counts of what already happened; Tokenmeter sends nothing to measure the network. - Processes:
/proc(statusfor memory in swap,iofor what a process reads from disk). Only your own processes are visible, so a server run by another user or in a container shows without its CPU and RAM line. - Power: see Power readings.
The Linux app has every page and card the Mac app has. Two things work differently: starting at login is set up by the installer rather than a switch in Settings (systemctl --user disable tokenmeter turns it off), and showing the speed next to the tray icon is in the widget's own settings (right-click the widget › Configure Tokenmeter…).
- Engines: servers on other ports, and Kapitsa, oMLX, MTPLX or Splash running on a Mac
- Status endpoint: let other machines read this one
- Other machines: show another computer's Tokenmeter on the Monitor


