dltop 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dltop-0.2.0/LICENSE +21 -0
- dltop-0.2.0/PKG-INFO +172 -0
- dltop-0.2.0/README.md +136 -0
- dltop-0.2.0/dltop/__init__.py +22 -0
- dltop-0.2.0/dltop/__main__.py +6 -0
- dltop-0.2.0/dltop/_version.py +8 -0
- dltop-0.2.0/dltop/app.py +549 -0
- dltop-0.2.0/dltop/cli.py +43 -0
- dltop-0.2.0/dltop/clipboard.py +97 -0
- dltop-0.2.0/dltop/export.py +131 -0
- dltop-0.2.0/dltop/metrics.py +92 -0
- dltop-0.2.0/dltop/models.py +243 -0
- dltop-0.2.0/dltop/sources/__init__.py +1 -0
- dltop-0.2.0/dltop/sources/dcgm.py +147 -0
- dltop-0.2.0/dltop/sources/demo.py +93 -0
- dltop-0.2.0/dltop/sources/nvml.py +149 -0
- dltop-0.2.0/dltop/sources/prometheus.py +202 -0
- dltop-0.2.0/dltop/sources/system.py +75 -0
- dltop-0.2.0/dltop/widgets/__init__.py +1 -0
- dltop-0.2.0/dltop/widgets/cards.py +40 -0
- dltop-0.2.0/dltop/widgets/plot.py +268 -0
- dltop-0.2.0/dltop/widgets/scroll.py +82 -0
- dltop-0.2.0/dltop/widgets/stats_table.py +121 -0
- dltop-0.2.0/dltop/widgets/toggles.py +140 -0
- dltop-0.2.0/dltop.egg-info/PKG-INFO +172 -0
- dltop-0.2.0/dltop.egg-info/SOURCES.txt +40 -0
- dltop-0.2.0/dltop.egg-info/dependency_links.txt +1 -0
- dltop-0.2.0/dltop.egg-info/entry_points.txt +2 -0
- dltop-0.2.0/dltop.egg-info/requires.txt +12 -0
- dltop-0.2.0/dltop.egg-info/top_level.txt +1 -0
- dltop-0.2.0/pyproject.toml +92 -0
- dltop-0.2.0/setup.cfg +4 -0
- dltop-0.2.0/tests/test_clipboard.py +128 -0
- dltop-0.2.0/tests/test_demo.py +37 -0
- dltop-0.2.0/tests/test_export.py +68 -0
- dltop-0.2.0/tests/test_layout.py +104 -0
- dltop-0.2.0/tests/test_metrics.py +55 -0
- dltop-0.2.0/tests/test_plot.py +46 -0
- dltop-0.2.0/tests/test_prometheus.py +118 -0
- dltop-0.2.0/tests/test_smoke.py +198 -0
- dltop-0.2.0/tests/test_stats_table.py +78 -0
- dltop-0.2.0/tests/test_toggles.py +41 -0
dltop-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Nikhil
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
dltop-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dltop
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: top/htop-style GPU monitor for CV and AI workloads -- splits CUDA/Tensor/FP* compute from NVENC/NVDEC media engines
|
|
5
|
+
Author-email: Nikhil <nikhil@detecttechnologies.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/rsnk96/dltop
|
|
7
|
+
Project-URL: Repository, https://github.com/rsnk96/dltop
|
|
8
|
+
Project-URL: Issues, https://github.com/rsnk96/dltop/issues
|
|
9
|
+
Keywords: gpu,monitoring,nvidia,cuda,tui,dcgm,nvml,computer-vision,deep-learning
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Environment :: GPU :: NVIDIA CUDA
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: System :: Monitoring
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: loguru>=0.7
|
|
26
|
+
Requires-Dist: nvidia-ml-py>=12.0
|
|
27
|
+
Requires-Dist: psutil>=5.9
|
|
28
|
+
Requires-Dist: rich>=13.0
|
|
29
|
+
Requires-Dist: textual>=0.60
|
|
30
|
+
Provides-Extra: test
|
|
31
|
+
Requires-Dist: pytest>=8.0; extra == "test"
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "test"
|
|
33
|
+
Provides-Extra: screenshots
|
|
34
|
+
Requires-Dist: cairosvg>=2.7; extra == "screenshots"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# dltop
|
|
38
|
+
|
|
39
|
+
A `htop`/`nvitop`-style GPU monitor, tailored for computer-vision and deep-learning workloads.
|
|
40
|
+
|
|
41
|
+
Where `nvitop` gives you one uniform compute-utilization bar, `dltop` splits live GPU utilization into the two things an AI/CV engineer actually cares about on the same GPU:
|
|
42
|
+
|
|
43
|
+
- **Compute utilization** — CUDA Streaming Multiprocessor / Tensor / FP32 / FP16 / FP64 activity (via DCGM)
|
|
44
|
+
- **Media engines** — NVENC (encode) and NVDEC (decode) throughput (via NVML)
|
|
45
|
+
|
|
46
|
+
This helps identify the choke point for different scales of load on a streaming-analytics pipeline. Many metrics share **one interleaved chart** instead of stacking into tall bars: overlapping series alternate colour cell-by-cell, so no line is ever hidden behind another while each keeps its true value.
|
|
47
|
+
|
|
48
|
+
When DCGM is unavailable (consumer GeForce cards, or DCGM not installed), `dltop` falls back to NVML's single lumped SM% (the aggregate compute-utilization proxy shown by `nvidia-smi`) and prints a footer telling you how to enable the full split on a data-center GPU.
|
|
49
|
+
|
|
50
|
+
### Multi-GPU
|
|
51
|
+
|
|
52
|
+
Every chart is grouped **one domain per GPU** — never mixed onto a shared axis. On a box with more than one GPU, `dltop` adds a host chart plus one chart per GPU per tab (so a 2-GPU box shows 3 stacked charts on the Compute tab: Host, GPU 0, GPU 1), an info card row per GPU, and a toggle bar to show/hide individual GPUs across every chart at once.
|
|
53
|
+
|
|
54
|
+
## Screenshots
|
|
55
|
+
|
|
56
|
+
Captured in `--demo` mode (synthetic 2-GPU telemetry — see [Demo mode](#demo-mode-no-gpu-needed)). Five tabs, all on one shared time-series axis.
|
|
57
|
+
|
|
58
|
+
### All
|
|
59
|
+
The default overview — every metric on one axis, with **CPU, RAM, GPU SM and GPU VRAM** on by default. Glance once: is anything busy?
|
|
60
|
+
|
|
61
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/all.png" alt="dltop — All tab" width="100%">
|
|
62
|
+
|
|
63
|
+
### Compute
|
|
64
|
+
Host CPU plus the GPU compute engines. On data-center GPUs the DCGM split breaks SM into **Tensor, FP32, FP16 and FP64** — see exactly which math your model is doing.
|
|
65
|
+
|
|
66
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/compute.png" alt="dltop — Compute tab" width="100%">
|
|
67
|
+
|
|
68
|
+
### Memory
|
|
69
|
+
Host **RAM**, GPU **VRAM** and **VRAM bandwidth** — watch memory fill as a model loads and catch bandwidth saturation.
|
|
70
|
+
|
|
71
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/memory.png" alt="dltop — Memory tab" width="100%">
|
|
72
|
+
|
|
73
|
+
### System
|
|
74
|
+
**PCIe** in/out, GPU **power** draw, **disk** and **network** — the plumbing around the GPU.
|
|
75
|
+
|
|
76
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/system.png" alt="dltop — System tab" width="100%">
|
|
77
|
+
|
|
78
|
+
### Table
|
|
79
|
+
Every series — host, per-GPU, and any auto-discovered Prometheus metric — as a row of rolling-window stats (**Now, Mean, Median, Stddev**) over the last `--window` seconds. Four buttons copy the current snapshot straight to the clipboard: **Markdown**, **web table (HTML)**, **Excel (TSV)**, or a **capture-metadata** block (timestamp, dltop version, hostname, OS, CPU, RAM, GPU(s), driver/CUDA versions, and any Prometheus endpoints) — handy for pasting into a bug report or a training-run log.
|
|
80
|
+
|
|
81
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/table.png" alt="dltop — Table tab" width="100%">
|
|
82
|
+
|
|
83
|
+
> The screenshots above are stored via [Git LFS](https://git-lfs.com), so a plain clone (or a `pip install` from Git) only pulls tiny pointer files unless you explicitly fetch the LFS objects. Regenerate them anytime with `pip install -e ".[screenshots]"` then `python scripts/capture_screenshots.py`.
|
|
84
|
+
|
|
85
|
+
## Installation
|
|
86
|
+
|
|
87
|
+
### From PyPI (recommended)
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pipx install dltop
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
[`pipx`](https://pipx.pypa.io) installs `dltop` into its own isolated environment while still putting the `dltop` command on your `PATH` — the right way to install a standalone CLI tool. A plain `pip install` works too:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install dltop
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### For development
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git clone https://github.com/rsnk96/dltop && cd dltop
|
|
103
|
+
pip install -e ".[test]"
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Python 3.11+ required. The tool is Linux-only (needs NVML + optionally `dcgmi`).
|
|
107
|
+
|
|
108
|
+
## Usage
|
|
109
|
+
|
|
110
|
+
Once installed, `dltop` is callable from any directory — the same way `htop` is:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
dltop # 0.5s refresh, DCGM if available
|
|
114
|
+
dltop -i 1 # 1s refresh
|
|
115
|
+
dltop --no-dcgm # NVML-only (skip DCGM even if installed)
|
|
116
|
+
dltop --window 120 # stats window for the Table tab, seconds (default 60)
|
|
117
|
+
dltop --no-discover # disable Prometheus /metrics auto-discovery
|
|
118
|
+
dltop --demo # synthetic 2-GPU telemetry, no NVIDIA hardware needed
|
|
119
|
+
dltop --demo 4 # synthetic N-GPU telemetry
|
|
120
|
+
dltop --version # print the installed version and exit
|
|
121
|
+
dltop --help
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Key bindings (in the TUI)
|
|
125
|
+
|
|
126
|
+
| Key | Action |
|
|
127
|
+
|---|---|
|
|
128
|
+
| `q`, `Q` | Quit |
|
|
129
|
+
| `space`, `p` | Pause / resume sampling |
|
|
130
|
+
|
|
131
|
+
Switch tabs (**All · Compute · Memory · System · Table**) by clicking them, or with `←` / `→` when the tab bar is focused. Each chart has per-series checkboxes underneath to toggle individual lines on or off.
|
|
132
|
+
|
|
133
|
+
### Demo mode (no GPU needed)
|
|
134
|
+
|
|
135
|
+
`--demo [N]` swaps NVML/DCGM for a synthetic `N`-GPU source (default 2) so you can try, develop, or screenshot `dltop` on a laptop with no NVIDIA hardware at all — it's also what `scripts/capture_screenshots.py` uses to generate the images above.
|
|
136
|
+
|
|
137
|
+
### Prometheus auto-discovery
|
|
138
|
+
|
|
139
|
+
On startup (unless `--no-discover` is passed), `dltop` enumerates locally listening TCP ports (via `psutil`, falling back to `ss -lnt`), probes each with a short-timeout `GET /metrics`, and treats any response that looks like Prometheus text-exposition format as a hit. Up to 30 gauge/counter metrics per discovered endpoint are added as extra, default-off series on the **All** tab, scraped on a background thread every `max(--interval, 1)` seconds. Histograms and summaries are skipped (their component series aren't meaningful as single lines). Disable the whole probe with `--no-discover` if you'd rather not have `dltop` touch other local sockets.
|
|
140
|
+
|
|
141
|
+
## Related projects
|
|
142
|
+
|
|
143
|
+
`dltop` owes a lot to the terminal monitors that came before it:
|
|
144
|
+
|
|
145
|
+
- [htop](https://htop.dev) — the classic interactive process and CPU monitor.
|
|
146
|
+
- [btop](https://github.com/aristocratos/btop) — a polished all-round system monitor (CPU, memory, disk, network).
|
|
147
|
+
- [nvtop](https://github.com/Syllo/nvtop) — an htop-style monitor for AMD / NVIDIA / Intel GPUs.
|
|
148
|
+
- [nvitop](https://github.com/XuehaiPan/nvitop) — an interactive NVIDIA GPU process viewer.
|
|
149
|
+
|
|
150
|
+
We use and admire all of these. None of them, individually or together, met the needs we had internally: a single view that splits GPU compute into the lanes a CV/AI engineer reasons about — SM, Tensor, FP16/FP32/FP64 — **and** the media engines (NVENC/NVDEC), overlaid against host CPU/RAM/IO on one time-series, so you can see where a streaming-analytics pipeline actually bottlenecks. So we built `dltop`.
|
|
151
|
+
|
|
152
|
+
## Enabling the full compute split (DCGM)
|
|
153
|
+
|
|
154
|
+
On a data-center GPU (A100, H100, L4, T4, etc.) you can install DCGM to unlock the per-lane breakdown:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
# Ubuntu / Debian
|
|
158
|
+
sudo apt install datacenter-gpu-manager
|
|
159
|
+
sudo systemctl --now enable nvidia-dcgm
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Consumer GeForce cards (RTX 4090, 3090, etc.) have these profiling fields gated by NVIDIA at the driver level — DCGM will install but return no profiling data. `dltop` detects this at startup and falls back silently.
|
|
163
|
+
|
|
164
|
+
## Runtime requirements
|
|
165
|
+
|
|
166
|
+
- NVIDIA driver + CUDA runtime (any version supported by `nvidia-ml-py`)
|
|
167
|
+
- DCGM service (optional, for the full compute-lane split)
|
|
168
|
+
- A terminal (TTY) if you want the keyboard shortcuts — piping to a non-TTY still renders frames but disables keystroke handling
|
|
169
|
+
|
|
170
|
+
## License
|
|
171
|
+
|
|
172
|
+
MIT
|
dltop-0.2.0/README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# dltop
|
|
2
|
+
|
|
3
|
+
A `htop`/`nvitop`-style GPU monitor, tailored for computer-vision and deep-learning workloads.
|
|
4
|
+
|
|
5
|
+
Where `nvitop` gives you one uniform compute-utilization bar, `dltop` splits live GPU utilization into the two things an AI/CV engineer actually cares about on the same GPU:
|
|
6
|
+
|
|
7
|
+
- **Compute utilization** — CUDA Streaming Multiprocessor / Tensor / FP32 / FP16 / FP64 activity (via DCGM)
|
|
8
|
+
- **Media engines** — NVENC (encode) and NVDEC (decode) throughput (via NVML)
|
|
9
|
+
|
|
10
|
+
This helps identify the choke point for different scales of load on a streaming-analytics pipeline. Many metrics share **one interleaved chart** instead of stacking into tall bars: overlapping series alternate colour cell-by-cell, so no line is ever hidden behind another while each keeps its true value.
|
|
11
|
+
|
|
12
|
+
When DCGM is unavailable (consumer GeForce cards, or DCGM not installed), `dltop` falls back to NVML's single lumped SM% (the aggregate compute-utilization proxy shown by `nvidia-smi`) and prints a footer telling you how to enable the full split on a data-center GPU.
|
|
13
|
+
|
|
14
|
+
### Multi-GPU
|
|
15
|
+
|
|
16
|
+
Every chart is grouped **one domain per GPU** — never mixed onto a shared axis. On a box with more than one GPU, `dltop` adds a host chart plus one chart per GPU per tab (so a 2-GPU box shows 3 stacked charts on the Compute tab: Host, GPU 0, GPU 1), an info card row per GPU, and a toggle bar to show/hide individual GPUs across every chart at once.
|
|
17
|
+
|
|
18
|
+
## Screenshots
|
|
19
|
+
|
|
20
|
+
Captured in `--demo` mode (synthetic 2-GPU telemetry — see [Demo mode](#demo-mode-no-gpu-needed)). Five tabs, all on one shared time-series axis.
|
|
21
|
+
|
|
22
|
+
### All
|
|
23
|
+
The default overview — every metric on one axis, with **CPU, RAM, GPU SM and GPU VRAM** on by default. Glance once: is anything busy?
|
|
24
|
+
|
|
25
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/all.png" alt="dltop — All tab" width="100%">
|
|
26
|
+
|
|
27
|
+
### Compute
|
|
28
|
+
Host CPU plus the GPU compute engines. On data-center GPUs the DCGM split breaks SM into **Tensor, FP32, FP16 and FP64** — see exactly which math your model is doing.
|
|
29
|
+
|
|
30
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/compute.png" alt="dltop — Compute tab" width="100%">
|
|
31
|
+
|
|
32
|
+
### Memory
|
|
33
|
+
Host **RAM**, GPU **VRAM** and **VRAM bandwidth** — watch memory fill as a model loads and catch bandwidth saturation.
|
|
34
|
+
|
|
35
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/memory.png" alt="dltop — Memory tab" width="100%">
|
|
36
|
+
|
|
37
|
+
### System
|
|
38
|
+
**PCIe** in/out, GPU **power** draw, **disk** and **network** — the plumbing around the GPU.
|
|
39
|
+
|
|
40
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/system.png" alt="dltop — System tab" width="100%">
|
|
41
|
+
|
|
42
|
+
### Table
|
|
43
|
+
Every series — host, per-GPU, and any auto-discovered Prometheus metric — as a row of rolling-window stats (**Now, Mean, Median, Stddev**) over the last `--window` seconds. Four buttons copy the current snapshot straight to the clipboard: **Markdown**, **web table (HTML)**, **Excel (TSV)**, or a **capture-metadata** block (timestamp, dltop version, hostname, OS, CPU, RAM, GPU(s), driver/CUDA versions, and any Prometheus endpoints) — handy for pasting into a bug report or a training-run log.
|
|
44
|
+
|
|
45
|
+
<img src="https://raw.githubusercontent.com/rsnk96/dltop/main/assets/screenshots/table.png" alt="dltop — Table tab" width="100%">
|
|
46
|
+
|
|
47
|
+
> The screenshots above are stored via [Git LFS](https://git-lfs.com), so a plain clone (or a `pip install` from Git) only pulls tiny pointer files unless you explicitly fetch the LFS objects. Regenerate them anytime with `pip install -e ".[screenshots]"` then `python scripts/capture_screenshots.py`.
|
|
48
|
+
|
|
49
|
+
## Installation
|
|
50
|
+
|
|
51
|
+
### From PyPI (recommended)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pipx install dltop
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
[`pipx`](https://pipx.pypa.io) installs `dltop` into its own isolated environment while still putting the `dltop` command on your `PATH` — the right way to install a standalone CLI tool. A plain `pip install` works too:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install dltop
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### For development
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
git clone https://github.com/rsnk96/dltop && cd dltop
|
|
67
|
+
pip install -e ".[test]"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Python 3.11+ required. The tool is Linux-only (needs NVML + optionally `dcgmi`).
|
|
71
|
+
|
|
72
|
+
## Usage
|
|
73
|
+
|
|
74
|
+
Once installed, `dltop` is callable from any directory — the same way `htop` is:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
dltop # 0.5s refresh, DCGM if available
|
|
78
|
+
dltop -i 1 # 1s refresh
|
|
79
|
+
dltop --no-dcgm # NVML-only (skip DCGM even if installed)
|
|
80
|
+
dltop --window 120 # stats window for the Table tab, seconds (default 60)
|
|
81
|
+
dltop --no-discover # disable Prometheus /metrics auto-discovery
|
|
82
|
+
dltop --demo # synthetic 2-GPU telemetry, no NVIDIA hardware needed
|
|
83
|
+
dltop --demo 4 # synthetic N-GPU telemetry
|
|
84
|
+
dltop --version # print the installed version and exit
|
|
85
|
+
dltop --help
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Key bindings (in the TUI)
|
|
89
|
+
|
|
90
|
+
| Key | Action |
|
|
91
|
+
|---|---|
|
|
92
|
+
| `q`, `Q` | Quit |
|
|
93
|
+
| `space`, `p` | Pause / resume sampling |
|
|
94
|
+
|
|
95
|
+
Switch tabs (**All · Compute · Memory · System · Table**) by clicking them, or with `←` / `→` when the tab bar is focused. Each chart has per-series checkboxes underneath to toggle individual lines on or off.
|
|
96
|
+
|
|
97
|
+
### Demo mode (no GPU needed)
|
|
98
|
+
|
|
99
|
+
`--demo [N]` swaps NVML/DCGM for a synthetic `N`-GPU source (default 2) so you can try, develop, or screenshot `dltop` on a laptop with no NVIDIA hardware at all — it's also what `scripts/capture_screenshots.py` uses to generate the images above.
|
|
100
|
+
|
|
101
|
+
### Prometheus auto-discovery
|
|
102
|
+
|
|
103
|
+
On startup (unless `--no-discover` is passed), `dltop` enumerates locally listening TCP ports (via `psutil`, falling back to `ss -lnt`), probes each with a short-timeout `GET /metrics`, and treats any response that looks like Prometheus text-exposition format as a hit. Up to 30 gauge/counter metrics per discovered endpoint are added as extra, default-off series on the **All** tab, scraped on a background thread every `max(--interval, 1)` seconds. Histograms and summaries are skipped (their component series aren't meaningful as single lines). Disable the whole probe with `--no-discover` if you'd rather not have `dltop` touch other local sockets.
|
|
104
|
+
|
|
105
|
+
## Related projects
|
|
106
|
+
|
|
107
|
+
`dltop` owes a lot to the terminal monitors that came before it:
|
|
108
|
+
|
|
109
|
+
- [htop](https://htop.dev) — the classic interactive process and CPU monitor.
|
|
110
|
+
- [btop](https://github.com/aristocratos/btop) — a polished all-round system monitor (CPU, memory, disk, network).
|
|
111
|
+
- [nvtop](https://github.com/Syllo/nvtop) — an htop-style monitor for AMD / NVIDIA / Intel GPUs.
|
|
112
|
+
- [nvitop](https://github.com/XuehaiPan/nvitop) — an interactive NVIDIA GPU process viewer.
|
|
113
|
+
|
|
114
|
+
We use and admire all of these. None of them, individually or together, met the needs we had internally: a single view that splits GPU compute into the lanes a CV/AI engineer reasons about — SM, Tensor, FP16/FP32/FP64 — **and** the media engines (NVENC/NVDEC), overlaid against host CPU/RAM/IO on one time-series, so you can see where a streaming-analytics pipeline actually bottlenecks. So we built `dltop`.
|
|
115
|
+
|
|
116
|
+
## Enabling the full compute split (DCGM)
|
|
117
|
+
|
|
118
|
+
On a data-center GPU (A100, H100, L4, T4, etc.) you can install DCGM to unlock the per-lane breakdown:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Ubuntu / Debian
|
|
122
|
+
sudo apt install datacenter-gpu-manager
|
|
123
|
+
sudo systemctl --now enable nvidia-dcgm
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Consumer GeForce cards (RTX 4090, 3090, etc.) have these profiling fields gated by NVIDIA at the driver level — DCGM will install but return no profiling data. `dltop` detects this at startup and falls back silently.
|
|
127
|
+
|
|
128
|
+
## Runtime requirements
|
|
129
|
+
|
|
130
|
+
- NVIDIA driver + CUDA runtime (any version supported by `nvidia-ml-py`)
|
|
131
|
+
- DCGM service (optional, for the full compute-lane split)
|
|
132
|
+
- A terminal (TTY) if you want the keyboard shortcuts — piping to a non-TTY still renders frames but disables keystroke handling
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
MIT
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""dltop -- a top/htop-style GPU monitor tailored for CV and AI workloads.
|
|
2
|
+
|
|
3
|
+
Splits live GPU utilization into two categories:
|
|
4
|
+
|
|
5
|
+
* Compute (CV/AI): SM active, Tensor pipe, FP32/FP16/FP64 pipes -- via DCGM profiling
|
|
6
|
+
* Media engines: NVENC, NVDEC -- via NVML
|
|
7
|
+
|
|
8
|
+
The UI is built on Textual with box-drawing line charts (the nvtop/asciichart
|
|
9
|
+
look), so many metrics share one chart instead of stacking into tall bars.
|
|
10
|
+
Overlapping series are colour-interleaved per column so no line is ever hidden
|
|
11
|
+
behind another while every line keeps its true value (see ``TimeSeriesPlot``).
|
|
12
|
+
|
|
13
|
+
When DCGM profiling metrics are unavailable (e.g. consumer GeForce cards where
|
|
14
|
+
NVIDIA gates profiling fields, or DCGM not installed), we transparently fall
|
|
15
|
+
back to NVML's single overall SM% and show a status banner telling the user how
|
|
16
|
+
to enable the full split on a data-center GPU.
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
from dltop._version import __version__
|
|
20
|
+
from dltop.cli import main
|
|
21
|
+
|
|
22
|
+
__all__ = ["__version__", "main"]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"""Single source of the installed package version."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError, version
|
|
4
|
+
|
|
5
|
+
try:
|
|
6
|
+
__version__ = version("dltop")
|
|
7
|
+
except PackageNotFoundError: # running from a checkout without an install
|
|
8
|
+
__version__ = "0.0.0+uninstalled"
|