System Stats / docs

statsd installation and CLI documentation

Get your machine connected, configure what it collects, and find every statsd command in one place.

Jump to a command

Quick start

statsd is the System Stats monitoring agent for Linux, macOS and Windows. It collects machine metrics and publishes them to your dashboard. It is unrelated to the StatsD metrics aggregation protocol.

  1. Create a System Stats account or sign in to your existing account.
  2. Follow the installation instructions for Linux, macOS, Windows or Docker.
  3. Follow the installer's login instructions. Open the authorization link in a browser and approve the machine.
  4. Run statsd status using the same configuration directory and permissions as the installation, then open the dashboard to confirm that metrics are arriving.

On macOS, you can use Stats instead of statsd if you prefer a menu bar app.

Installation

The native installers download the appropriate binary, register a background service and start it. A manual statsd install only registers the service; follow it with statsd start.

Installation: Linux

Requires systemd, root or sudo access, and a supported architecture: x86_64, arm64, or 32-bit ARM (armv6/armv7).

Terminal
curl -fsSL https://linux-stats.com/install.sh | sh

The installer places the binary in /usr/local/bin and registers the statsd systemd service. Then authorize the machine:

Terminal
sudo statsd login
sudo statsd status

Open the printed link in a browser. Omit sudo if you are already root. Use the same invoking user as the installation so the service and CLI share a configuration directory. If systemd is unavailable, use a foreground run or a container.

Installation: macOS

Supports Apple silicon and Intel Macs. Administrator access is required to install the launchd service.

Terminal
curl -fsSL https://mac-stats.com/install.sh | sh

The installer places the binary in /usr/local/bin and registers a system LaunchDaemon. It runs independently of your desktop session and starts at boot.

Terminal
sudo statsd login
sudo statsd status

Open the printed link and approve the machine. Use the same invoking user as the installation. For a desktop app, follow Stats on macOS.

Installation: Windows

Supports x86_64 and arm64. Open PowerShell as Administrator:

PowerShell
irm https://windows-stats.com/install.ps1 | iex

The installer places statsd.exe in %ProgramFiles%\statsd, adds it to PATH, and registers and starts the Windows service. In the same Administrator PowerShell session:

PowerShell
statsd login
statsd status

Open the printed link and approve the machine. Keep using the same configuration directory, especially when switching Windows accounts. NVIDIA GPU metrics require nvidia-smi; AMD and Intel live GPU metrics are currently unavailable on Windows.

Installation: Docker

Create a compose.yaml file:

YAML
services:
  statsd:
    image: exelban/statsd:latest
    restart: unless-stopped
    volumes:
      - statsd-data:/root/.statsd

volumes:
  statsd-data:

Start the container and read the authorization link from its logs:

Terminal
docker compose up -d
docker compose logs -f statsd

Open the link in a browser and approve the machine. Preserve the statsd-data volume when recreating the container: it stores credentials and the device identity.

Metrics reflect the resources visible inside the container. This example does not expose host GPU devices, the host filesystem or the Docker socket. Use a native installation when you need direct access to host metrics.

For optional Docker metrics on a Linux host, add this socket mount under the service's volumes:

YAML
      - /var/run/docker.sock:/var/run/docker.sock:ro

Socket access allows Docker API operations, including container control; the :ro mount does not make that API read-only. See remote control for disabling dashboard commands. Docker Desktop runs containers inside a VM, so container metrics do not represent the macOS or Windows host.

Update the container by pulling the image and recreating it with the same volume:

Terminal
docker compose pull
docker compose up -d

Manual installation

Place the binary for your operating system and architecture in its permanent location and make it executable on Linux/macOS. Run statsd version to check it, then authorize with statsd login.

To run it in your terminal:

Terminal
statsd run

To register a background service on Linux/macOS:

Terminal
sudo statsd install
sudo statsd start

On Windows, run statsd install and statsd start from Administrator PowerShell. If the executable is not on PATH, use its full path (or ./statsd.exe from its directory).

For a source build, use the Go version specified in statsd's go.mod. macOS builds also require CGO and the Xcode command-line tools. From the statsd source directory:

Terminal
go build -o statsd .
./statsd login
./statsd run

On Windows, build with go build -o statsd.exe . and invoke ./statsd.exe.

Stats on macOS

Stats is the macOS menu bar alternative to statsd. Use it to view metrics locally and connect your Mac to the same System Stats dashboard.

  1. Download Stats, open the disk image, and move Stats to Applications.
  2. Launch Stats and open its settings.
  3. Find the System Stats section and choose Sign in under Authorization. Complete authorization in your browser.
  4. Enable Monitoring in that section and check your machine in the dashboard.
  5. Enable launch at login if you want Stats to start with your desktop session.

Stats uses its own settings. The statsd commands and configuration below apply to the CLI agent. For monitoring independently of a signed-in desktop session, use statsd's launchd service.

Authorization

Run statsd login on the machine you want to monitor. Use the privileges and configuration directory printed by the installer. The command prints a device authorization URL and waits for approval.

Open that URL in a browser, sign in to your System Stats account, and approve the machine. On a headless server, you can open the URL on another computer or phone. Leave the command running until it confirms registration. If a code expires, the CLI requests a fresh one; use the latest printed URL.

Credentials are stored in the configuration directory and the daemon refreshes access tokens as needed. The CLI and daemon must use the same directory. A successful login authorizes the device; it does not start a manually installed service.

Terminal
statsd status

status reports the daemon lock and stored authorization state. Confirm delivery by checking the dashboard; local status alone does not prove metrics reached it.

Sign out or change accounts

statsd logout revokes authorization. statsd deregister releases the device from its account and revokes authorization. To move a device to another account, deregister while it is still authorized, then log in again:

Terminal
statsd deregister
statsd login

For containers, the daemon starts the authorization flow automatically when credentials are missing. Read the URL with docker compose logs -f statsd.

Module configuration

statsd collects CPU, RAM, GPU, disk, network, Docker and Proxmox metrics. Optional readers depend on available hardware, local tools and permissions. Collection intervals are configurable; there are no per-module enable/disable CLI switches.

Module: CPU

Processor usage, load and frequency. Default interval: 1s.

Available metrics depend on the operating system and hardware.

Module: RAM

Memory usage, available memory and swap. Default interval: 1s.

Memory pressure is available on macOS.

Module: GPU

GPU activity, memory and supported sensors. Default interval: 5s.

NVIDIA requires nvidia-smi. AMD and Intel live metrics are not supported on Windows.

Module: Disk

Storage capacity and disk I/O. Default interval: 1s.

Devices and filesystems must be visible to the agent.

Module: Network

Interface addresses and transfer rates. Default interval: 1s.

Only interfaces visible to the agent are reported.

Module: Docker

Container state, resource usage and health. Default interval: 3s.

Requires a local Unix socket at /var/run/docker.sock or /run/docker.sock and Docker API 1.44 or newer.

Module: Proxmox

Virtual machines and LXC containers. Default interval: 5s.

Requires the local Proxmox tools on a Proxmox node.

Persistent intervals

Show saved intervals (or built-in defaults), inspect one module, change its interval, or restore its default:

Terminal
statsd interval
statsd interval gpu
statsd interval gpu 2s
statsd interval gpu default

Changes are saved and apply to the running daemon without a restart, unless that module has a flag or environment override. Use the service's configuration directory and sufficient permissions to write it. Module names are case-insensitive.

Intervals must be positive durations with units, such as 500ms, 2s or 1m. Zero and negative values are rejected. default removes the saved override; it does not override an explicit flag or environment variable.

Temporary intervals

Override a module for a foreground run:

Terminal
statsd run --gpu-interval 500ms

Or use an environment variable in a POSIX shell:

Terminal
STATSD_GPU_INTERVAL=2s statsd run

In PowerShell:

PowerShell
$env:STATSD_GPU_INTERVAL = '2s'
statsd run

Runtime overrides are not saved. statsd interval shows saved values or defaults, not the effective flag/environment overrides of another process. Stop an installed service before running a second daemon with the same configuration directory.

Intervals schedule read starts. Slow reads skip missed ticks instead of overlapping. Each read receives a 15-second context deadline, though native calls that cannot be interrupted may take longer.

Configuration

The default file is ~/.statsd/config.json (%USERPROFILE%\.statsd\config.json on Windows). Choose another directory with --config-dir or STATSD_CONFIG_DIR:

Terminal
statsd --config-dir /path/to/statsd login
statsd --config-dir /path/to/statsd status

On Windows, use a Windows path, for example statsd --config-dir "C:\ProgramData\statsd" status.

Under sudo, the default follows the invoking user's home. Service installation pins the resolved directory, so continue using it for login, status and configuration changes. An explicit directory flag takes precedence over STATSD_CONFIG_DIR.

Interval precedence: command-line flag → environment variable → saved setting → built-in default.

The file also contains credentials and device identity. Prefer CLI commands for changes and remove credentials before sharing diagnostics. Saved intervals use interval_cpu, interval_ram, interval_gpu, interval_disk, interval_network, interval_docker and interval_proxmox, with duration strings as values.

The saved control setting defaults to enabled; manage it with enable-control and disable-control. The saved update setting also defaults to enabled and controls remote update availability; the string "false" disables it. There is no dedicated CLI switch for that setting.

Flags passed to statsd install are not automatically forwarded to the service. Use saved intervals for persistent service configuration. For runtime environment overrides, configure the environment in the service manager and restart the service.

API, MQTT and authorization hosts are fixed in the build. There are no runtime host overrides.

Service management

Running statsd without a command is equivalent to statsd run: it runs the daemon in the current process. Use start and stop for an installed system service.

Command Behavior
statsd install Register the executable at its current location as a service
statsd start Start the installed service
statsd stop Stop the installed service
statsd restart Restart the installed service
statsd uninstall Stop and remove the service registration
statsd update Update a native installation
statsd logs Read logs using the platform's log mechanism

Use root/sudo on Linux and macOS, or Administrator PowerShell on Windows, for service management. Keep the executable in its installed location and use the pinned configuration directory.

Logs

On Linux, statsd logs follows the systemd journal. On macOS and Windows, it prints statsd.log.old and statsd.log from the configuration directory when present; it does not follow new lines. Foreground runs log to stderr. For containers, use docker compose logs -f statsd.

Updates and removal

Use statsd update for native installations, with permission to replace the installed executable and manage its service. For containers, pull or rebuild the image and recreate the container with the same configuration volume.

statsd uninstall removes the service registration, not the executable or configuration. To release the device from your account, run statsd deregister before removing the installation. You can then remove the installed binary and configuration if you no longer need them.

Remote control

Remote control is enabled by default. It allows supported dashboard commands, including agent restarts, machine reboots, container operations and container log streaming. Disable it locally with:

Terminal
statsd disable-control

Re-enable it with:

Terminal
statsd enable-control

These commands persist the setting in the configuration directory. The running agent reconciles changes with the backend. Metric collection continues when remote control is disabled. Remote updates have a separate update setting described under Configuration; disable-control does not disable remote updates.

Troubleshooting

Start with the daemon status, local diagnostics and logs. Use the same configuration directory as the service:

Terminal
statsd status
statsd doctor
statsd doctor gpu
statsd doctor --json gpu
statsd logs

doctor collects local samples without logging in, creating configuration or publishing telemetry. Missing optional hardware is reported as unavailable, separately from collection errors. A single sample may not contain rates that need a previous measurement. Exit code 1 indicates collection errors.

Symptom What to check
Authorized, but no metrics in the dashboard Confirm the service is running, check its logs and network access, and verify that login and the service share a configuration directory
Login succeeded, but status says unauthorized Check the invoking user, sudo context, --config-dir and STATSD_CONFIG_DIR
Changed interval has no effect Check for a command-line or environment override in the running process
NVIDIA GPU metrics missing Confirm nvidia-smi is installed and accessible to the service
AMD/Intel GPU metrics missing on Windows These live metrics are not currently supported
Linux GPU sensors unavailable Run statsd doctor gpu to inspect DRM devices, driver links and sensor paths
Docker module unavailable Check local Unix socket access and Docker API version; Docker Desktop's Windows named pipe is not a supported socket
Proxmox module unavailable Run the agent on the node with the local Proxmox tools available
Container needs authorization after recreation Restore or reuse its persistent configuration volume

Linux GPU diagnostics show raw temperatures in millidegrees Celsius and power in microwatts. Normalized metric samples use Celsius and watts. Successful diagnostics confirm local collection, not delivery to the dashboard.

CLI reference

The following reference lists statsd's commands, flags, arguments, environment variables and defaults.

Use statsd --help (or -h) for general help and statsd <command> --help for command-specific help. statsd help <command> (alias h) is also supported. --version, -v, version and v print the version.

Legacy command spellings such as --login and -login are accepted for compatibility; use the subcommand form statsd login in new scripts. Invalid usage exits with code 2; operational failures generally exit with code 1.

Shell completion

statsd completion <shell> prints a completion script. Supported shells are bash, zsh, fish and pwsh (PowerShell). For example, enable completion in the current zsh session:

Terminal
source <(statsd completion zsh)

Use bash in place of zsh for a bash session. For fish or PowerShell, save the output of statsd completion fish or statsd completion pwsh and load it through your shell's configuration. The hidden --generate-shell-completion flag is used by those scripts to request completion candidates.

Usage and global flags

Run without a command to start the daemon. Use start/stop to control an installed service.

Collect and publish machine metrics.

Usage:

CLI usage
statsd [GLOBAL FLAGS] [COMMAND] [COMMAND FLAGS] [ARGUMENTS...]

Global flags:

Name Description Type Default value Environment variables
--config-dir="…" Configuration directory (default: ~/.statsd) string STATSD_CONFIG_DIR
--debug Enable debug logging bool false DEBUG
--version (-v) Print the version bool false none
--cpu-interval="…" Override cpu interval for this run duration saved value or 1s STATSD_CPU_INTERVAL
--ram-interval="…" Override ram interval for this run duration saved value or 1s STATSD_RAM_INTERVAL
--gpu-interval="…" Override gpu interval for this run duration saved value or 5s STATSD_GPU_INTERVAL
--disk-interval="…" Override disk interval for this run duration saved value or 1s STATSD_DISK_INTERVAL
--network-interval="…" Override network interval for this run duration saved value or 1s STATSD_NETWORK_INTERVAL
--docker-interval="…" Override docker interval for this run duration saved value or 3s STATSD_DOCKER_INTERVAL
--proxmox-interval="…" Override proxmox interval for this run duration saved value or 5s STATSD_PROXMOX_INTERVAL

doctor command

Check local metric readers and GPU sensor access.

Collect one local sample per module without logging in or publishing. Counter-based rates need a previous sample and may be absent or zero. Missing optional hardware is reported as unavailable. Linux sensor values use raw sysfs units; normalized samples report temperature in Celsius and power in watts. Exit code 1 indicates collection errors.

Usage:

CLI usage
statsd [GLOBAL FLAGS] doctor [COMMAND FLAGS] [module]

The following flags are supported:

Name Description Type Default value Environment variables
--json Print the diagnostic report as JSON bool false none

run command

Run the daemon in this process.

Intervals schedule read starts; slow reads skip missed ticks without overlapping. Reads receive a 15-second deadline. Saved interval changes apply live unless overridden by a flag or environment variable.

Usage:

CLI usage
statsd [GLOBAL FLAGS] run [ARGUMENTS...]

login command

Authorize this device.

Usage:

CLI usage
statsd [GLOBAL FLAGS] login [ARGUMENTS...]

logout command

Revoke authorization.

Usage:

CLI usage
statsd [GLOBAL FLAGS] logout [ARGUMENTS...]

deregister command

Release this device from its account.

Usage:

CLI usage
statsd [GLOBAL FLAGS] deregister [ARGUMENTS...]

status command

Show daemon and authorization status.

Usage:

CLI usage
statsd [GLOBAL FLAGS] status [ARGUMENTS...]

system command

Show system hardware information.

Usage:

CLI usage
statsd [GLOBAL FLAGS] system [ARGUMENTS...]

update command

Update statsd to the latest version.

Usage:

CLI usage
statsd [GLOBAL FLAGS] update [ARGUMENTS...]

logs command

Show daemon logs.

Usage:

CLI usage
statsd [GLOBAL FLAGS] logs [ARGUMENTS...]

enable-control command

Enable remote control.

Usage:

CLI usage
statsd [GLOBAL FLAGS] enable-control [ARGUMENTS...]

disable-control command

Disable remote control.

Usage:

CLI usage
statsd [GLOBAL FLAGS] disable-control [ARGUMENTS...]

version command (aliases: v)

Print the version.

Usage:

CLI usage
statsd [GLOBAL FLAGS] version [ARGUMENTS...]

interval command

Show or persist a module collection interval.

Modules: cpu, ram, gpu, disk, network, docker, proxmox. Example: statsd interval gpu 2s Changes apply live unless overridden by a flag or environment variable. Use 'default' to reset an interval.

Usage:

CLI usage
statsd [GLOBAL FLAGS] interval [module] [duration|default]

install command

Install the system service.

Usage:

CLI usage
statsd [GLOBAL FLAGS] install [ARGUMENTS...]

uninstall command

Uninstall the system service.

Usage:

CLI usage
statsd [GLOBAL FLAGS] uninstall [ARGUMENTS...]

start command

Start the system service.

Usage:

CLI usage
statsd [GLOBAL FLAGS] start [ARGUMENTS...]

stop command

Stop the system service.

Usage:

CLI usage
statsd [GLOBAL FLAGS] stop [ARGUMENTS...]

restart command

Restart the system service.

Usage:

CLI usage
statsd [GLOBAL FLAGS] restart [ARGUMENTS...]
Need a hand? Contact us →