Terminal Access
GPU Fleet lets you open a remote shell on a host through the console. The main use is diagnostics: run commands such as nvidia-smi, docker ps and journalctl.
Security
The terminal is gated by two factors:
- The user's RBAC permission must include
gpu-fleetservice access (admin). - The host record must have
terminalEnabled= true (while claiming or afterwards from the UI).
Every terminal session:
- Is limited by a TTL (30 minutes by default; changeable in
Settings → terminalSessionTtlSeconds). - Is written to the audit log (the
gpu-fleet.terminal.openevent). - Closes immediately if the browser or agent connection drops.
Sandbox modes
The UI has 3 modes:
docker-debug (default, recommended)
docker run --rm -i --network host -v /var/run/docker.sock:/var/run/docker.sock cognipeer/debug-shell:latest /bin/sh -i
- A shell inside an ephemeral container.
- The Docker socket is mounted →
docker psanddocker logs <...>work. - With
--network hostit can reach the pool/inference endpoints. - Limited access to the host file system (only a
/host:romount; currently fails if the image is not ready).
host
/bin/sh -i directly in the agent process's namespace, with root privileges.
- Full privileges:
apt install,systemctl restart, and so on. - A wrong command affects the whole machine. Be careful.
- The audit log records every session open; per-command logging is not covered at the moment.
deployment-exec
docker exec -i <containerName> /bin/sh -i
- Enter the container of a specific deployment.
- Debugging a vLLM/TGI container, inspecting logs, GPU tests.
- Fails if the container has no shell (like a
debian-slimimage).
Usage
Host detail → Open terminal:
- Pick a sandbox.
- For
deployment-exec, paste the deployment id (listed on the host detail page). - Open session → the console:
- Generates a sessionId.
- Sends an
open-terminal-sessioncommand to the agent. - Returns the WS endpoint URL to the browser.
- The browser opens a WebSocket connection.
- The agent sees the command, opens its own WS to the console and spawns the shell process.
- In the UI,
[awaiting agent…]→ after a few seconds the prompt appears.
Phase 1 for now
There is no PTY (terminal emulation). It is a plain pipe → vim, htop and less do not work. Commands and their output are fine. The PTY upgrade comes in a later phase (node-pty + xterm.js).
Command examples
# GPU inventory
nvidia-smi
nvidia-smi -L
nvidia-smi mig -lgi
# Agent log
journalctl -u cognipeer-gpu-agent -n 100
# Docker
docker ps
docker logs cognipeer-llm-<deploymentId>
docker stats --no-stream
# Disk + memory
df -h
free -hSession TTL and cleanup
- When the session TTL expires: the console and the agent both close it immediately, and the container/shell gets SIGTERM.
- If you close the browser tab: WS close → the console session manager cleans up → it kills the agent's shell.
- If the agent restarts: all open sessions drop.
Audit
Every session:
service: gpu-fleet
action: admin
event: gpu-fleet.terminal.open
resourceType: gpu-host
resourceId: <hostId>
metadata: { sandbox, sessionId }Filter it on the Audit Log page.
Next step
→ Troubleshooting — common problems.

