PerfCity: A System Monitor That Grows a City From Your PC
Every system monitor draws the same thing: sparklines, gauges, a wall of numbers that tells you what is happening right now and nothing about the last month. I wanted a monitor whose output was something I'd actually want to look at — so I built PerfCity, an open-source system monitor where the output is a city. Your CPU, RAM, disks, GPU and network each own a district, and sustained real usage raises buildings floor by floor over about a month. The skyline is the history.

Why a city, of all things
The point isn't the prettiest dashboard. It's a record you can glance at. A month of usage compressed into a skyline: the district that lights up when you compile, the one that crawls when you copy big files, the quiet stretch where the machine sat idle. It also has a side effect I didn't expect — leaving it running becomes slightly addictive, in the way city-builder games are. You check it to see what got built while you were working.
The first few days look empty on purpose. The city starts as a skeleton of plots and grows into itself; the growth ladder is calibrated so a month of typical use builds out a district, not an instant gratification spike. A nine-second burst does nothing. That's the design: the skyline is a record, not a demo.
How the growth works
Under the hood it's deliberately boring, which is the part I'm proud of:
- Python 3.11+, stdlib plus
psutilonly. No framework, no database server, no build step. The whole thing is a package you can read in an afternoon. - Real samples, not simulated ones. Each hardware component is a "device" with its own district, and the sampler reads live utilisation from the machine it's running on.
- A growth ladder, not a counter. Sustained usage earns points that convert to floors on a schedule tuned so a busy month produces a full district. The city persists to a local SQLite file (
%LOCALAPPDATA%\perfcity\city.dbon Windows), flushed every minute — kill it and restart, and the city keeps its shape. - Configuration is a TOML file at
%APPDATA%\perfcity\config.toml, withPC_*environment variables overriding anything in it.
The three views
The main event is the browser view: python -m perfcity.cli --serve and open http://127.0.0.1:9999. It's a <canvas> render of the same model — real polygons, gradients, bloom, fog, lit windows, suburbs, a river, a rail line, traffic moving on the roads. Python owns the model; the canvas only draws.
There are also terminal glyph views for when you're already in a shell (isometric overhead, plus a zoomed-in district elevation), and a stats page with per-component graphs and the city's development table:

Two things people ask about:
- Can I view it from another machine? Yes —
--bind 0.0.0.0(orPC_BIND=0.0.0.0) serves the UI on your LAN. The collector runs fine headless; only viewing needs a browser, so it works on a server you never sit in front of. - Can I leave it on a TV? There's a keep-screen-on toggle (Windows) for exactly that — a wall display showing your machine's city growing. It doesn't stop the system sleeping; it keeps the display awake.
Running it
git clone https://github.com/LukeKeam/perfcity
cd perfcity
pip install -e .
perfcity --serve
That's the whole install. There's a --page flag for saving a rendered frame to HTML, a --stats flag for the development table in your terminal, and --simulate-hours to preview what a mature city looks like without waiting a month (it never touches your real save).
Pitfalls I hit
- It's Windows-first. The screenkeep TV toggle is Win32 and no-ops gracefully elsewhere; everything else is portable. I run the full test suite in an Ubuntu 24.04 Docker container (51 tests, hermetic) so the Linux path stays honest — it caught two real bugs in environment-variable handling that only show up on a fresh install.
- A hard kill can lose a minute. The save flushes every minute; a clean exit flushes immediately, but
taskkill /Fon Windows can't be caught. Against a month-long build, losing sixty seconds is nothing — just don't expect the last hour of usage to appear if you force-quit. - Don't judge it in week one. The sparse skeleton is correct behaviour. If your city looks empty after a week of heavy use, that's a bug worth an issue on GitHub; if it looks empty after two days, that's the ladder doing its job.
Grab it
It's on GitHub under the MIT license — fork it, point it at your work machine, and come back in a month to see what your habits built. It started as an experiment in "what if a monitor's output was something you'd want to look at", and it turned into a small city I check more than my actual dashboards.
If this was useful, More hands-on tech guides at TechGeek. No pressure — read it whenever it's useful.