Skip to content

arjunkomath/whatami

Repository files navigation

whatami

A tiny Go web server that exposes detailed machine and system information over HTTP. Inspired by traefik/whoami, but focused on what the machine is rather than who's calling it.

What it shows

  • OS: name, version, kernel, architecture
  • CPU: model, cores, usage percentage, frequency
  • Memory: total, used, available, swap
  • Disk: mounted filesystems and usage
  • Network: interfaces, IPs, MACs
  • Load: 1/5/15 minute averages
  • Processes: count
  • Container: Docker/containerd/podman detection, Kubernetes awareness
  • Runtime: virtualization detection (KVM, VMware, VirtualBox, Hyper-V, Xen), microVM detection (Firecracker, Cloud Hypervisor, QEMU microvm), cloud provider (AWS, GCP, Azure, Oracle, Hetzner)
  • Hardware: system manufacturer, product name, BIOS vendor/version, board name (via DMI on Linux, sysctl on macOS)
  • GPU: NVIDIA GPU info (when available)

Quick start

go install github.com/arjunkomath/whatami@latest
whatami

Or with Docker:

docker run -p 8080:8080 whatami

Then visit http://localhost:8080 for a human-readable summary, or http://localhost:8080/api for JSON.

Endpoints

Endpoint Description
GET / Plain-text human-readable summary
GET /api Full system info as JSON
GET /api/os OS info
GET /api/cpu CPU info
GET /api/memory Memory info
GET /api/disk Disk info
GET /api/network Network interfaces
GET /api/load Load averages
GET /api/container Container detection
GET /api/runtime Virtualization, cloud provider, hardware
GET /api/gpu GPU info
GET /health Health check

Flags

--port, -p     Listen port          (default: 8080, env: WHATAMI_PORT)
--name         Instance name        (env: WHATAMI_NAME)
--verbose      Log requests         (default: false)
--cert         TLS certificate file
--key          TLS key file

Build

make build
make run
make test
make docker
make docker-run

About

Tiny Go server that prints system information

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors