sgtop
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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sgtop-0.1.2.tar.gz.
File metadata
- Download URL: sgtop-0.1.2.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb30b3fabbcac05c97eaac96c916130f349ff962c26e7dc4d951db78760ee4e9
|
|
| MD5 |
cfc43326066b84596ced1160a0ee6486
|
|
| BLAKE2b-256 |
464992063b1be3ef2c052539dd434fb963920f46601c4971bf6fdaac73ec040e
|
Provenance
The following attestation bundles were made for sgtop-0.1.2.tar.gz:
Publisher:
publish.yml on HarrytheOrange/sgtop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sgtop-0.1.2.tar.gz -
Subject digest:
cb30b3fabbcac05c97eaac96c916130f349ff962c26e7dc4d951db78760ee4e9 - Sigstore transparency entry: 2708227721
- Sigstore integration time:
-
Permalink:
HarrytheOrange/sgtop@6a83d01e454346e812a722278c72d7178cf77a7c -
Branch / Tag:
refs/tags/v1.2 - Owner: https://github.com/HarrytheOrange
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a83d01e454346e812a722278c72d7178cf77a7c -
Trigger Event:
release
-
Statement type:
File details
Details for the file sgtop-0.1.2-py3-none-any.whl.
File metadata
- Download URL: sgtop-0.1.2-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4342da46d7e4bb6b68d42021f530d81c2ff982224634309ea17527b8666301a1
|
|
| MD5 |
65c2e0aa2bb050b326db49d456a18a60
|
|
| BLAKE2b-256 |
742020210f9555d782ed3befa630fab796d3c61737ede182a021c2ce1024aeca
|
Provenance
The following attestation bundles were made for sgtop-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on HarrytheOrange/sgtop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sgtop-0.1.2-py3-none-any.whl -
Subject digest:
4342da46d7e4bb6b68d42021f530d81c2ff982224634309ea17527b8666301a1 - Sigstore transparency entry: 2708227777
- Sigstore integration time:
-
Permalink:
HarrytheOrange/sgtop@6a83d01e454346e812a722278c72d7178cf77a7c -
Branch / Tag:
refs/tags/v1.2 - Owner: https://github.com/HarrytheOrange
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6a83d01e454346e812a722278c72d7178cf77a7c -
Trigger Event:
release
-
Statement type: