ShowSys
"What is this machine?" in one command. ShowSys prints the operating system, CPU, memory, swap,
network, disks, sensors, the busiest processes and NVIDIA GPUs, as text you can read or JSON your
scripts can use. It also has a live mode and a Python API. It works the same on Linux, Windows and
macOS, and when the OS doesn't report something, it says N/A instead of crashing.
Install
pip install showsys
Optional, for NVIDIA GPUs (--gpu):
pip install "showsys[gpu]"
ShowSys needs Python 3.7 or newer. The only dependencies are psutil
and py-cpuinfo; the gpu extra adds NVIDIA's
nvidia-ml-py.
Everything marked 1.1 below needs ShowSys 1.1.0 or newer (
pip install -U showsys).
Quick start
showsys # summary: system, memory and swap
showsys -d # details: adds boot time, CPU and network
showsys --all # everything, including disks, sensors, top processes and GPUs
showsys --json # the summary as JSON
showsys --watch # live CPU, memory, network and disk rates, every second (Ctrl+C to stop)
Command-line options
Pick one section. Without one, showsys prints the summary.
| Option | Shows |
|---|---|
| (none) | Summary: system, memory and swap |
-d, --details |
System, boot time, CPU, memory, swap and network |
-b, --boot_time |
Boot time |
-m, --memory |
Memory |
-s, --swap |
Swap |
-c, --cpu |
Cores, frequencies, and usage per core measured over one second |
-n, --network |
Network interfaces with their IPv4 and MAC addresses, and total traffic |
-a, --all 1.1 |
--details plus disks, sensors, top processes and GPUs |
--disk 1.1 |
Partitions with their usage, and bytes read and written since boot |
--sensors 1.1 |
Temperatures, fans and battery |
--top [N] 1.1 |
The N busiest processes (default 5), measured over one second |
--gpu 1.1 |
NVIDIA GPUs: memory, utilization, temperature, power (needs showsys[gpu]) |
If you pass several sections, the first one in this table wins, as it always has.
| Option | Does |
|---|---|
-j, --json 1.1 |
Print JSON instead of text. Works with every section and with --watch |
--sort {cpu,memory} 1.1 |
Order the processes of --top and --all (default cpu) |
-w, --watch [SECONDS] 1.1 |
Print a line of live readings every SECONDS (default 1) until Ctrl+C |
--count N 1.1 |
Stop --watch after N readings |
-V, --version 1.1 |
Print the version |
-h, --help |
List the options |
python -m showsys works like the showsys command, which helps when the scripts folder is not on PATH.
Live mode
--watch prints one line per reading. Each line covers the time since the previous one, so the rates
are per second over that window:
$ showsys --watch 1 --count 5
TIME CPU MEM SWAP NET SENT/s NET RECV/s DISK READ/s DISK WRITE/s
20:59:57 12.8% 7.8% 0.6% 1.12MB 36.24MB 0.00B 204.54MB
20:59:58 12.4% 7.8% 0.6% 1.06MB 35.93MB 0.00B 2.84GB
20:59:59 9.2% 7.8% 0.6% 1.27MB 33.57MB 0.00B 0.00B
21:00:00 9.0% 7.8% 0.6% 1.33MB 33.33MB 0.00B 0.00B
21:00:01 7.7% 7.8% 0.6% 1.31MB 32.52MB 0.00B 0.00B
With --json you get one JSON object per line (JSON Lines), ready to append
to a log file:
showsys --watch 1 --json >> metrics.jsonl
{"timestamp": "2026-11-03T21:00:02+08:00", "interval_seconds": 1.0, "cpu_percent": 9.3, "memory_percent": 7.8, "swap_percent": 0.6, "net_sent_per_sec": 1272933.6, "net_recv_per_sec": 36152602.1, "disk_read_per_sec": 0.0, "disk_write_per_sec": 0.0}
JSON output
--json prints the same sections as the text, with plain numbers instead of formatted strings:
$ showsys --memory --json
{
"timestamp": "2026-11-03T20:59:53+08:00",
"memory": {
"total": 32400801792,
"available": 29939556352,
"used": 2461245440,
"free": 13936041984,
"percent": 7.6
}
}
- Sizes are bytes, frequencies MHz, temperatures degrees Celsius, percentages 0 to 100.
- A value the OS doesn't report is
null. Insensors, an empty list means "supported here, but none found". timestampis the local time when the collection started.- The sections are
system,boot,cpu,memory,swap,network,disk,sensors,processesandgpu.showsys --all --jsonhas all of them. - If something goes wrong, the error goes to stderr, so stdout never holds half a document.
For example, the memory use in a shell script:
showsys -m --json | python -c "import json, sys; print(json.load(sys.stdin)['memory']['percent'])"
Python API
Numbers: collect() and the get_*() functions 1.1
collect() returns the same data as --json, as dicts:
import showsys
data = showsys.collect('cpu', 'memory') # no names: every section
print(data['cpu']['usage_percent'], data['memory']['percent'])
Each section also has a function that returns a typed record (a dataclass with to_dict()):
import showsys
cpu = showsys.get_cpu(interval=0.5) # measure usage over half a second
print(cpu.logical_cores, cpu.freq_current_mhz, cpu.usage_percent)
for process in showsys.get_processes(limit=3, sort_by='memory'):
print(process.pid, process.name, process.memory_rss)
for rates in showsys.watch(interval=1, count=3):
print(rates.cpu_percent, rates.net_recv_per_sec)
| Function | Returns |
|---|---|
get_system() |
OS, host name, CPU name, IP and MAC address, Python version |
get_boot() |
Boot time, as a timestamp and in ISO 8601, and the uptime |
get_cpu(interval=1.0) |
Core counts, frequencies, usage per core and in total, load average (Unix) |
get_memory(), get_swap() |
Totals and use, in bytes |
get_network() |
Interfaces with IPv4, IPv6 and MAC addresses, link state, speed and MTU; bytes sent and received |
get_disks() |
Partitions with their usage; bytes read and written |
get_sensors() |
Temperatures, fans and battery |
get_processes(limit=5, sort_by='cpu', interval=1.0) |
The busiest processes |
get_gpus() |
NVIDIA GPUs, or None without the gpu extra or an NVIDIA driver |
collect(*sections, interval=1.0, top=5, sort_by='cpu') |
Several sections as JSON-ready dicts |
watch(interval=1.0, count=None) |
A live reading every interval seconds |
The package ships type hints (py.typed), so your editor and mypy know every field.
Display strings: ShowSys
The original API is still here and prints exactly what it always did:
from showsys import ShowSys
sysinfo = ShowSys()
sysinfo.info()
info() prints a summary (system, memory and swap) and detail_info() prints everything that -d
shows. Both also return the text; pass show=False to get the text without printing it.
These methods return dicts of display strings: system_information(), boot_time(), cpu_info(),
memory_info(), swap_info(), network_info() and disk_info(). For example:
from showsys import ShowSys
sysinfo = ShowSys()
print(sysinfo.cpu_info())
{
'Physical cores': 12,
'Total cores': 20,
'Max Frequency': '2100.00Mhz',
'Min Frequency': '0.00Mhz',
'Current Frequency': '2100.00Mhz',
'CPU Usage Per Core': ['0.0%', '0.0%', '0.0%', '0.0%', '0.0%', '1.6%', '0.0%', '0.0%', '0.0%', '15.4%', '3.1%', '0.0%', '1.6%', '0.0%', '0.0%', '0.0%', '0.0%', '0.0%', '0.0%', '0.0%'],
'Total CPU Usage': '1.6%'
}
What N/A means
Not every OS reports everything. ShowSys shows N/A (null in JSON) for what's missing and carries on.
| Linux | Windows | macOS | |
|---|---|---|---|
| CPU frequency | Most machines; not some ARM boards and VMs | Yes | Intel Macs; not Apple Silicon |
Load average (get_cpu(), JSON) |
Yes | No | Yes |
| Temperatures | Yes, where the hardware has sensors | No | No |
| Fans | Yes, where the hardware has sensors | No | No |
| Battery | Laptops | Laptops | Laptops |
GPU (showsys[gpu]) |
NVIDIA driver | NVIDIA driver | No |
A few more cases:
- The IP address shows
N/Awhen the computer's host name can't be resolved (common on macOS). - Disk read and write totals are missing in some containers.
--topleaves out processes the OS won't let you inspect, or showsN/Afor their memory.
Development
git clone https://github.com/NatLee/show-system-info.git
cd show-system-info
pip install -e ".[test]"
pytest
tox -e pyalso checks that the source distribution contains every tracked file.pip install mypy types-psutiland thenmypy src/showsyschecks the type hints (strict; settings insetup.cfg).
How the code is laid out:
| File | Does |
|---|---|
src/showsys/models.py |
The records (dataclasses) and their units |
src/showsys/collectors.py |
Reads the system into records: get_*(), collect() |
src/showsys/render.py |
Turns records into text, including the original ShowSys format |
src/showsys/live.py |
watch() for --watch |
src/showsys/showsys.py |
The original ShowSys class |
src/showsys/cli.py |
The showsys command |
The tests replace every system call with a fake machine (tests/fakes.py), so they can compare
output character by character. tests/test_output_format.py pins the text of every option from
version 1.0; if it fails, a change would break someone's script.
License
Metadata
Release files for ShowSys 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| showsys-1.1.0.tar.gz | 38.5 kB | Without provenance | Details for showsys-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| showsys-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for showsys-1.1.0-py3-none-any.whl |
Total release size: 63.2 kB
Release files / showsys-1.1.0.tar.gz
| Download URL | showsys-1.1.0.tar.gz |
|---|---|
| Size | 38.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad65d9d533b27b01150e2608c535d343103b30430a9df0c5fdee61e3b7feca56
|
|
BLAKE2b-256 checksum How to use checksums |
5efa9bbe7ca945fa84b6d5c959ab1029ffe34ae4d756c8eda1c5e80db0b0d728
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Release files / showsys-1.1.0-py3-none-any.whl
| Download URL | showsys-1.1.0-py3-none-any.whl |
|---|---|
| Size | 24.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c094ae1934fc81db39498b33ccd16b51c7c58353dc4f8f6abb5cd26af1e3224
|
|
BLAKE2b-256 checksum How to use checksums |
dc311432ed83d54f1144c004c705ccd55d96de0ee49a51d0f99c3b8a4f3016d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.1
|
Security for ShowSys 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.