A lightweight, cross-platform system information CLI tool written in Go. Minimal external dependencies β reads directly from Linux virtual filesystems, macOS system utilities/syscalls, and Windows Win32 APIs.
Host: host.example.com
IP: 192.168.0.10
OS: Rocky Linux 10.1 (Red Quartz)
Kernel: 6.12.0-124.56.1.el10_1.x86_64
Arch: amd64
CPU: AMD Ryzen 7 3700X 8-Core Processor (16 cores)
Memory: 5.4 GB / 31.0 GB
Disk: 41.0 GB / 69.9 GB
Uptime: 10 days, 20 hours, 28 minutes
Load: 0.08, 0.13, 0.12 (1, 5, 15 min)
GPU: NVIDIA GeForce RTX 3080
- Go 1.22 or higher (when building from source)
- Linux, macOS, or Windows
Pre-built binaries are available on the Releases page.
| Binary | OS | Architecture |
|---|---|---|
sysinfo-linux-amd64 |
Linux | x86_64 (64-bit) |
sysinfo-linux-arm64 |
Linux | ARM64 (Raspberry Pi, etc) |
sysinfo-darwin-amd64 |
macOS | Intel (x86_64) |
sysinfo-darwin-arm64 |
macOS | Apple Silicon (M1/M2/M3/M4) |
sysinfo-windows-amd64.exe |
Windows | x86_64 (64-bit) |
sysinfo-windows-arm64.exe |
Windows | ARM64 |
go install github.com/zemation/sysinfo@latest# Download the binary for your OS and architecture (e.g., linux-amd64 or darwin-arm64)
curl -LO https://github.com/zemation/sysinfo/releases/latest/download/sysinfo-linux-amd64
# Make it executable
chmod +x sysinfo-linux-amd64
# Install system-wide
sudo mv sysinfo-linux-amd64 /usr/local/bin/sysinfo# Download the binary directly into WindowsApps (already on your user PATH)
Invoke-WebRequest -Uri https://github.com/zemation/sysinfo/releases/latest/download/sysinfo-windows-amd64.exe -OutFile "$env:LOCALAPPDATA\Microsoft\WindowsApps\sysinfo.exe"
# Run sysinfo from anywhere
sysinfogit clone https://github.com/zemation/sysinfo.git
cd sysinfo
go build -o sysinfo main.goOn Windows:
git clone https://github.com/zemation/sysinfo.git
cd sysinfo
go build -o sysinfo.exe main.go| Command | Description |
|---|---|
sysinfo |
System overview |
sysinfo all |
All information in one output |
sysinfo gpu |
GPU model, driver version, VRAM usage, and utilization |
sysinfo disk |
Disk usage per mount point / drive |
sysinfo processes cpu |
Top processes by CPU usage |
sysinfo processes memory |
Top processes by memory usage |
sysinfo network interfaces |
Network interfaces, IPs, RX/TX stats |
sysinfo network ports |
Listening ports and owning processes |
Available on all commands:
--json, -j Output as JSON
--watch, -w Continuously refresh output in real time
--interval, -i Refresh interval in seconds when using --watch (default 2)
sysinfo processes --count, -c Number of processes to show (default 5)
When running in a terminal, sysinfo color codes usage values automatically:
| Color | Meaning |
|---|---|
| π’ Green | Normal β below 70% |
| π‘ Yellow | Warning β 70% to 89% |
| π΄ Red | Critical β 90% and above |
Color applies to:
sysinfo diskβUSE%columnsysinfo gpuβUtilizationvaluesysinfo processes cpuβCPU%columnsysinfo processes memoryβMEM%columnsysinfo allβUSE%,Utilization,CPU%, andMEM%values
Color is automatically disabled when piping output or redirecting to a file so it does not interfere with tools like jq.
# System overview
sysinfo
# All info at once
sysinfo all
# GPU details, VRAM, and utilization
sysinfo gpu
# Live watch mode (refreshes every 2s by default, or custom interval with -i)
sysinfo --watch
sysinfo gpu -w -i 1
sysinfo processes cpu -w
# Disk usage per mount / drive
sysinfo disk
# Top processes (default 5)
sysinfo processes cpu
sysinfo processes memory
# Custom process count
sysinfo processes cpu --count 10
sysinfo processes memory -c 3
# Network
sysinfo network interfaces
sysinfo network ports
# Elevated privileges may be required for full port ownership output on Linux/macOS
sudo sysinfo network ports
# JSON output (color disabled automatically)
sysinfo --json
sysinfo all --json
sysinfo gpu --json
sysinfo disk --json
sysinfo processes cpu --count 10 --json
sysinfo network interfaces --json
# Pipe JSON to jq
sysinfo --json | jq '.cpu'
sysinfo gpu --json | jq '.utilization'
sysinfo processes memory --json | jq '.[0]'sysinfo/
βββ main.go # Entry point
βββ cmd/
β βββ root.go # Default sysinfo command & --watch loop
β βββ all.go # sysinfo all
β βββ gpu.go # sysinfo gpu
β βββ disk.go # sysinfo disk
β βββ processes.go # sysinfo processes
β βββ network.go # sysinfo network
βββ system/
βββ common.go # Shared cross-platform helpers
βββ types.go # Shared data structures & JSON tags
βββ color.go # ANSI color output & column padding helpers
βββ color_windows.go # Windows Virtual Terminal ANSI enablement
βββ info_{linux,darwin,windows}.go
βββ disk_{linux,darwin,windows}.go
βββ gpu_{linux,darwin,windows}.go
βββ processes_{linux,darwin,windows}.go
βββ network_{linux,darwin,windows}.go
| Field | Linux | macOS (darwin) |
Windows |
|---|---|---|---|
| Host | os.Hostname() |
os.Hostname() |
os.Hostname() |
| IP | net.InterfaceAddrs() |
net.InterfaceAddrs() |
net.InterfaceAddrs() |
| OS | /etc/os-release |
sw_vers |
Registry CurrentVersion |
| Kernel | /proc/version |
uname -r |
Registry CurrentBuildNumber / UBR |
| Arch | runtime.GOARCH |
runtime.GOARCH |
runtime.GOARCH |
| CPU | /proc/cpuinfo |
sysctl machdep.cpu |
Registry CentralProcessor\0 + runtime.NumCPU() |
| Memory | /proc/meminfo |
sysctl hw.memsize + vm_stat |
GlobalMemoryStatusEx (kernel32.dll) |
| Disk | syscall.Statfs & /proc/mounts |
syscall.Getfsstat |
GetLogicalDrives + GetDiskFreeSpaceExW |
| Uptime | /proc/uptime |
sysctl kern.boottime |
GetTickCount64 (kernel32.dll) |
| Load | /proc/loadavg |
sysctl vm.loadavg |
n/a (Windows) |
| GPU | nvidia-smi, rocm-smi, /sys/class/drm |
system_profiler SPDisplaysDataType |
nvidia-smi / Display Class Registry |
| Network stats | /sys/class/net/[iface]/statistics |
netstat -I [iface] -b |
GetIfEntry2 (iphlpapi.dll) |
| Listening ports | /proc/net/{tcp,tcp6,udp,udp6} + /proc/[pid]/fd |
lsof -nP |
GetExtendedTcpTable & GetExtendedUdpTable (iphlpapi.dll) |
| Process info | /proc/[pid]/stat, /proc/[pid]/comm |
ps axo pid=,%cpu=,%mem=,comm= |
CreateToolhelp32Snapshot, GetProcessMemoryInfo, GetProcessTimes |
- Linux (
amd64,arm64) β Direct/procand/sysvirtual filesystem readers - macOS (
amd64,arm64) β Nativesyscall.Getfsstatand system utilities (sysctl,vm_stat,lsof,ps) - Windows (
amd64,arm64) β Native Win32 API syscalls (kernel32.dll,iphlpapi.dll,psapi.dll) and Windows Registry
- Dedicated
sysinfo gpusubcommand exposing VRAM usage, driver version, and GPU utilization - Live watch / refresh mode (
--watch/-wand--interval/-i) - Native Win32
GetExtendedTcpTable/GetExtendedUdpTablefor Windows listening ports
- Real-Time Delta Sampling: Two-point snapshot sampling for instantaneous per-process CPU %, live network throughput rates (
MB/sorMbpsRX/TX), and real-time Windows CPU load % viaGetSystemTimes - Multi-GPU & Extended GPU Telemetry: Enumerate all adapters (
[]GPUInfofor iGPU + dGPU setups), add GPU temperature, power draw (Watts), fan speed %, and registry-based VRAM reporting for AMD/Intel GPUs on Windows - Hardware Sensors & Battery Health (
sysinfo sensors/sysinfo battery): CPU/system temperatures and fan speeds via Linuxhwmon/thermal_zone, macOSpmset/ioreg, and laptop battery health/runtime via WindowsGetSystemPowerStatus - Version Metadata & Self-Update (
sysinfo version/sysinfo upgrade): Build-time-ldflagsversion/commit injection, binary stripping (-s -w), and in-place binary upgrades from GitHub Releases - Package Manager Distribution & Checksums: Automated
checksums.txt(SHA256) release assets, Homebrew tap (brew install), Windows Scoop bucket, and Winget manifest (winget install) - Automated Unit & Cross-OS Integration Tests: Unit tests for
/proc,sysctl, and Win32 parsers plus live binary execution checks across Linux, macOS, and Windows GitHub Actions runners - Healthcheck & Threshold Alerting (
sysinfo check): Configurable warning/critical thresholds (e.g.,--disk 90 --mem 85 --cpu 90) returning non-zero exit codes for cron jobs, CI pipelines, and server monitoring scripts