Install one known revision
gputaskman is an early, experimental GPU monitor, not a standard Linux utility. Version 0.4.3 was released on November 15, 2026. It joins device counters, per-process attribution, detected runtimes, model-file clues, and model-memory estimates in a terminal interface. The useful mental model is a stack of evidence: some numbers come from a driver, some ownership is inferred, and some model details are classified or estimated.
This article uses the PyPI build on 64-bit Linux with Python 3.12. The project requires Python 3.11 or newer for that route, and the first command also requires uv. Install uv beforehand through your organization's approved package process or the project's official installation instructions; do not pipe an unreviewed network response into a shell. command -v asks the shell to locate uv, and > /dev/null discards the pathname because only success or failure matters here. && stops the sequence if uv is absent. uv --version then proves that the resolved executable can run before it is trusted to install anything.
uv tool install creates an isolated application environment instead of adding gputaskman's dependencies to the current Python project. The ==0.4.3 suffix pins the revision tested here. The package's PyPI wheel and source archive carry provenance tied to the project's release workflow, but provenance identifies the publisher and build path; it is not a security audit.
uv tool list prints applications installed through uv. The shell's | pipe sends that listing to grep. The quoted basic regular expression ^gputaskman followed by a space anchors the match at the beginning of a line, so another tool that merely mentions the name does not satisfy the check. The grep article develops anchors and pipeline status. gputaskman 0.4.3 has no --version option—using it is an argument error—so do not copy that familiar check from another command. The shorter gtm executable is an alias, but the examples retain the full name.
command -v uv > /dev/null &&
uv --version &&
uv tool install 'gputaskman==0.4.3' &&
uv tool list | grep '^gputaskman 'uv 0.13.6 (x86_64-unknown-linux-gnu)
gputaskman v0.4.3The uv version and architecture vary by installation. uv's installation progress is also variable and normally appears on standard error, so it is omitted. Tagged portable Linux builds instead require glibc 2.35 or newer. In every installation method, GPU drivers come from the host; the package does not bundle NVIDIA, AMD, Intel, or Ascend drivers.
Prove that an adapter was discovered
Start with inventory rather than the full-screen interface. --list-gpus asks for selectable adapters and exits. On a configured multi-GPU host it prints indexes that --gpu can select. The printf command runs afterward because the semicolon separates two shell commands regardless of the first command's status; $? expands to the exit status of the immediately preceding gputaskman command. The fixed printf format keeps that status separate from data.
The absence of an adapter line before the status below is an observed result from a GPU-less Linux container. The important surprise is status 0: in 0.4.3, no adapter output plus success does not prove that a GPU was found. Treat the adapter list itself, and later JSON fields, as the discovery result. This example diagnoses the boundary without pretending to test a real GPU. The printf article develops the format/data distinction used by the status check.
gputaskman --list-gpus; printf 'status=%s\n' "$?"status=0A real host should list at least one indexed adapter before you rely on --gpu 0. An empty list is a failed precondition even when the process exit status is zero.
Read one snapshot before opening the TUI
--once prints one text snapshot and exits instead of opening the terminal user interface (TUI). --gpu 0 selects the first adapter index. --no-system skips the separate system-RAM and CPU sampler, so the report stays focused on GPU discovery and process rows. Without --no-system, the one-shot view also lists operating-system RAM, CPU, and top processes.
The observed GPU-less output is still a report: the adapter name is absent, memory is N/A, and the process table is empty. N/A is unavailable, not a measured zero. On a working host, compare the device line with the process table rather than assuming the rows must sum to the device total. Driver APIs, shared buffers, other users, containers, and uninspectable clients can leave memory unattributed.
gputaskman --once --gpu 0 --no-systemGPU
VRAM N/A / N/A
PID PROCESS KIND RUNTIME VRAM SHARED PAGED GPU% INSIDEDo not turn this exact transcript into a health check. A configured NVIDIA, AMD, Intel, Apple, or Ascend system has backend-specific columns and limitations; validate the adapter and required counters explicitly.
Use the TUI as an evidence explorer
With the preflight complete, run the TUI. -i 2 sets the refresh interval to two seconds; -i is the short form of --interval, and its argument is a number of seconds. --gpu 0 selects the adapter whose index was established above. The command reads telemetry and process metadata but does not terminate workloads or change GPU settings.
Press s to cycle sorting, a to switch between the top and all collected processes, m to toggle slim and diagnostic detail, p to pause collection, and ? to display the counter explanations. Pause is useful when a transient row needs inspection; it freezes the view, not the workload. A model path, mapped library, runtime label, or server response is evidence about the process. It does not prove that every named model is resident in GPU memory or actively executing.
This is also why gputaskman and vendor tools answer different questions. A device total can be measured while ownership remains incomplete. On native NVIDIA Linux, NVML supplies device and process counters. On native AMD and Intel Linux, DRM sysfs and fdinfo expose different accounting rules. Under WSL or inside a PID namespace, some process ownership is matched or guessed and is marked * or ?. Keep those marks in screenshots and reports; removing them removes the uncertainty the tool is trying to disclose.
gputaskman --gpu 0 --interval 2The TUI is variable and interactive, so no fixed transcript is shown. Press q to quit. Use --once or --json when another command needs a stable artifact.
Make automation reject a missing GPU
--json emits one JSON snapshot and implies --once. The shell's > redirection creates snapshot.json from standard output. --no-system omits the optional system section; it does not disable GPU collection. In JSON, unknown counters are null rather than zero.
The Python here-document is a small fail-closed gate. <<'PY' sends the following lines to python3 until the line containing only PY. Quoting the delimiter prevents the shell from expanding characters inside the Python program. json.load parses the saved object. dict.get reads a key without raising an exception when it is absent. If gpu is null, SystemExit writes the message to standard error and returns a failure status. A real pipeline can add required-counter checks for its own backend instead of accepting a syntactically valid but empty snapshot.
This gate is intentionally separate from the gputaskman exit code. The previous discovery test showed why. A monitoring job should test the measurement it needs, not merely that a command ran.
gputaskman --json --gpu 0 --no-system > snapshot.json &&
python3 - <<'PY'
import json
with open('snapshot.json', encoding='utf-8') as stream:
snapshot = json.load(stream)
if snapshot.get('gpu') is None:
raise SystemExit('no GPU discovered; inspect drivers and device access')
print(snapshot['gpu'], snapshot.get('vram_used'), snapshot.get('vram_total'))
PYno GPU discovered; inspect drivers and device accessOn a working host the last line prints the adapter name, used bytes, and total bytes. Those are integer byte counts or null values, not formatted GiB strings.
Compare a workload without text-diff noise
Capture the same adapter before and after a controlled workload change. The first redirection creates before.json; the second creates after.json. Start the workload only after the first command has completed, then wait until initialization has settled before taking the second snapshot. gputaskman diff reads both files offline and compares its memory fields semantically rather than comparing JSON text.
The subcommand reports device changes, process changes, and model files that appeared or disappeared. It compares measured memory separately from runtime-reported and estimated breakdowns, and it does not add those categories together. Changes smaller than 16 MiB are generally suppressed from the human-readable process-change view as noise. The files still contain the original readings.
The diff article explains why a changed result and a failed comparison need different handling. gputaskman diff follows the same operational lesson but has its own schema checks: snapshots with different GPU names or backends are rejected, and adapter identity is strongest when comparable PCI information is present. A model file appearing in the result means the process opened or named it; it does not prove GPU residency.
gputaskman --json --gpu 0 --no-system > before.json
# Start one authorized test workload, then wait for it to finish loading.
gputaskman --json --gpu 0 --no-system > after.json
gputaskman diff before.json after.jsonThe middle line is a comment: Bash ignores text after #. Replace it with your documented workload procedure; do not paste an unknown launch command merely to create activity. Output depends on that workload and is therefore not fabricated here.
Record a bounded window without exposing the artifact
A pair of snapshots can miss a short spike. record appends one compact JSON object per line to a JSON Lines file. -o supplies the output pathname, --duration 300 stops after 300 seconds, --interval 2 requests one sample every two seconds, and --gpu 0 selects the adapter. The recorder writes a complete line and flushes it after each sample; a slow collection delays the next sample instead of launching overlapping catch-up reads.
The shell's umask 077 removes group and other permissions from newly created files. mkdir creates a new directory, && continues only after success, and cd enters it. This matters because snapshots can contain process names, PIDs, listening-port numbers, runtime labels, model paths, and model metadata. The recording code opens an existing file in append mode rather than overwriting it, so choose a new pathname for a new investigation. umask does not repair permissions on a file that already exists.
summary reads the recording offline and reports average and peak values plus top processes. Unknown readings are skipped, not converted to zero. replay opens an offline interactive playback. Neither command needs live GPU access, which makes a protected recording useful for handoff—but only after considering whether its inventory belongs in the recipient's trust boundary. After replay closes, cd .. moves from gpu-capture back to its parent directory. The two dots are the shell pathname for the parent; returning there makes the earlier snapshot.json visible to the next example.
umask 077
mkdir gpu-capture &&
cd gpu-capture &&
gputaskman record --output session.jsonl --duration 300 --interval 2 --gpu 0
gputaskman summary session.jsonl
gputaskman replay session.jsonl
cd ..record appends. If gpu-capture or session.jsonl already exists, stop and choose a new disposable directory rather than mixing runs or inheriting permissive file modes. summary separates runs when the GPU/backend changes, time goes backward, or a large gap appears.
Inspect a listener without mistaking it for exposure
The preceding cd .. returned to the directory containing snapshot.json. That same JSON can help inventory an unfamiliar GPU workload during an authorized assessment. The program below prints each reported process name, PID, and listening-port number. The first for loop walks through the processes list, and the second walks through that process's ports list. The or [] expression supplies an empty list when the field is null or absent. f before the quoted string makes a Python formatted string, substituting the three values inside braces.
A listed port says that gputaskman associated a listening socket with the process. It does not include the bind address, firewall state, namespace path, authentication policy, or external reachability. Confirm those separately with the operating system and the service itself. Likewise, the JSON's model_files and llm fields are useful leads for comparing an approved inventory, but paths and classifications are evidence—not proof that a model's weights are resident or that a process is malicious.
Running as root can reveal processes and counters hidden from an ordinary user, especially on Linux DRM paths. That broader visibility also enlarges the diagnostic artifact. Prefer the least privilege that answers the question, protect the resulting file, and avoid attaching raw snapshots to public issue reports. This is a data-handling boundary, not a claimed vulnerability in gputaskman.
python3 - <<'PY'
import json
with open('snapshot.json', encoding='utf-8') as stream:
snapshot = json.load(stream)
for process in snapshot.get('processes') or []:
for port in process.get('ports') or []:
print(f"{process.get('name')} pid={process.get('pid')} port={port}")
PYUse a snapshot captured without --no-system only if you also need the system process inventory. The GPU process rows themselves remain present with --no-system.
Write the backend into the conclusion
Version 0.4.3 supports several backends, but their numbers do not mean the same thing. Native NVIDIA Linux uses NVML; native AMD and Intel use DRM interfaces with shared-client and shared-buffer limits; WSL can combine Linux process inspection with Windows host counters; Apple Silicon uses unified memory; and Ascend support depends on npu-smi. --no-host disables Windows-host counter collection under WSL. It does nothing useful on ordinary native Linux. --no-system disables the separate OS RAM/CPU sampler, not GPU collection.
Record the tool revision, backend, adapter identity, driver, execution context, privilege level, and whether ownership was measured, matched, or guessed. Preserve null and N/A as unknown. Do not silently rewrite them as zero. A process table that fails to account for all device memory is not necessarily wrong, and a complete-looking table is not necessarily proof of residency.
gputaskman is most valuable when it prevents a vague statement such as 'the GPU is full' from ending the investigation. Use it to form a sharper question, keep the uncertainty markers attached, and corroborate the consequential answer with the driver, runtime, service, and operating system that produced the workload.