Skip to main content

sgtop

Linux macOS Usage PyPI Python License Contributors

A btop-style terminal dashboard for a live SGLang deployment. Not affiliated with the SGLang project — just a small, read-only sidecar that never touches your inference traffic.

sgtop screenshot

nvtop will tell you a GPU is at 98% utilization. It won't tell you whether your sglang server can actually take more concurrent requests, whether one data-parallel replica is sitting idle while another is drowning, or what your real time-to-first-token looks like. That's what this is for: concurrency vs. the capacity sglang actually computed at startup, KV-cache headroom per replica, and (if you turn on --enable-metrics) rolling TTFT/E2E/queue-time percentiles.

Install

pipx install sgtop

Pure standard library, no dependencies, Python ≥ 3.9. pip install --user sgtop works too if you don't have pipx.

Quick start

sgtop is just a client — it needs sgtop-server running somewhere with access to your sglang process:

# launch sglang, redirecting its output to a file
python -m sglang.launch_server --model-path ... --dp-size 2 --enable-metrics > server.log 2>&1 &

# point the sidecar at that log
sgtop-server --log server.log --service-port 30000 --port 30001 &

# watch it
sgtop --port 30001

Run sgtop-server on the sglang box, then sgtop --host <that box> from wherever you actually work. There's also a plain HTML version of the same data at http://<host>:30001/ if you'd rather glance at it in a browser.

About --enable-metrics

Skip it and you still get concurrency, KV-cache usage, throughput, and GPU stats — all parsed straight from sglang's log lines. Add it and the LATENCY panel starts showing TTFT / end-to-end / queue-time / cache-hit-rate, pulled from sglang's Prometheus endpoint. Prometheus histograms are cumulative counters, so sgtop-server diffs consecutive scrapes itself to give you an actual rolling 5-minute p50/p90/p99 instead of a number that just drifts toward whatever your first few requests looked like.

q quits. That's the whole interface.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sgtop-0.1.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sgtop-0.1.1-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file sgtop-0.1.1.tar.gz.

File metadata

  • Download URL: sgtop-0.1.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sgtop-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5772d8c56b6f61af0854889483671a3ce4d84643e99f1aeb0a562c02af429baa
MD5 1157bf958d52fccae40833f6431e1c5f
BLAKE2b-256 24cfb13d47ed7f2fe5dbaaa5d9c3f366c0321ea8dea93d274795456064ab182e

See more details on using hashes here.

Provenance

The following attestation bundles were made for sgtop-0.1.1.tar.gz:

Publisher: publish.yml on HarrytheOrange/sgtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sgtop-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sgtop-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sgtop-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b67e36d56b2f903fdbecc9b92a8b7e98ccd13529aba4d294a361555d73243a5d
MD5 8202e50d3f578d74d09524dd42b1981e
BLAKE2b-256 f7c296ab28eac24e00be9eafc8083c93047bf04bb1ad398d47c3e710f4c6db5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for sgtop-0.1.1-py3-none-any.whl:

Publisher: publish.yml on HarrytheOrange/sgtop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page