Loading...
Loading...
Check GPU usage on remote servers. Connect to servers via SSH, display video memory usage, running processes, and associated containers for each GPU card. Use this when the user says to check GPU, graphics card usage, or video memory usage.
npx skill4agent add majiayu000/claude-arsenal gpu-use| Alias | SSH Command |
|---|---|
| Default | |
user@host -p portssh {SSH_TARGET} "nvidia-smi --query-gpu=index,name,memory.total,memory.used,memory.free,utilization.gpu --format=csv,noheader,nounits"ssh {SSH_TARGET} "nvidia-smi --query-compute-apps=pid,gpu_uuid,used_memory,name --format=csv,noheader,nounits"ssh {SSH_TARGET} "nvidia-smi --query-gpu=index,gpu_uuid --format=csv,noheader"ssh {SSH_TARGET} "docker ps --format '{{.ID}} {{.Names}}' 2>/dev/null"ssh {SSH_TARGET} "for cid in \$(docker ps -q); do name=\$(docker inspect --format '{{.Name}}' \$cid | sed 's/^\///'); pids=\$(docker top \$cid -o pid 2>/dev/null | tail -n +2); for p in \$pids; do echo \"\$p \$name\"; done; done 2>/dev/null"ssh {SSH_TARGET} "for cid in \$(docker ps -q); do name=\$(docker inspect --format '{{.Name}}' \$cid | sed 's/^\///'); servers=\$(docker exec \$cid ps aux 2>/dev/null | grep 'http_server -p' | grep -v grep | awk '{for(i=1;i<=NF;i++) if(\$i==\"-p\") print \$(i+1)}'); if [ -n \"\$servers\" ]; then echo \"\$name: \$servers\"; fi; done 2>/dev/null"## GPU Usage Overview
| GPU | Model | Video Memory Usage | Free | GPU Utilization | Status |
|-----|------|----------|------|------------|------|
| 0 | H200 | 107 / 141 GB | 34 GB | 85% | 🔴 Busy |
| 1 | H200 | 12 / 141 GB | 129 GB | 10% | 🟢 Idle |
| 2 | H200 | 0 / 141 GB | 141 GB | 0% | ⚪ No Task |
## Process Details
| GPU | Video Memory Usage | Container | Process |
|-----|----------|------|------|
| 0 | 107 GB | vllm_qwen35 | VLLM::EngineCore |
| 0 | 2 GB | truetranslate-api-bin | truetranslate_api.bin |
| 1 | 12 GB | atlas_video | python |
## Multi-instance Services (Single-container Multi-terminal Deployment)
If multiple `http_server` instances are detected running in a container, list them separately:
| Container | Port | GPU | Status |
|------|------|-----|------|
| atlas_video | :5001 | GPU 2 | Running |
| atlas_video | :5002 | GPU 3 | Running |
## Idle Resources
GPUs available for new service deployment:
- GPU 4: 141 GB fully idle
- GPU 5: 141 GB fully idle| Video Memory Usage Ratio | GPU Utilization | Status |
|---|---|---|
| 0% | 0% | ⚪ No Task |
| < 30% | < 30% | 🟢 Idle |
| 30-80% | any | 🟡 Moderate |
| > 80% | any | 🔴 Busy |
http_server -p-pCUDA_VISIBLE_DEVICESssh {SSH_TARGET} "docker exec {CONTAINER} cat /proc/{PID}/environ 2>/dev/null | tr '\0' '\n' | grep CUDA_VISIBLE_DEVICES"