CLI tool for launching and managing vllm model servers via SSH and tmux
Project description
vllmctl
A powerful CLI for launching, managing, and monitoring vLLM model servers on remote machines via SSH and tmux.
โ ๏ธ SSH Configuration Required
Many commands in vllmctl rely on your SSH configuration (~/.ssh/config).
- Make sure all your remote servers are properly listed in your SSH config.
- The tool will automatically discover and use these hosts for remote operations, port forwarding, and GPU monitoring.
Example SSH config entry:
Host myserver
HostName myserver.example.com
User myuser
IdentityFile ~/.ssh/id_rsa
๐ Features
- Launch vLLM servers on remote hosts in isolated tmux sessions
- Automatic SSH tunneling for secure local API access
- Real-time health checks and queue monitoring
- List, attach, and kill tmux sessions for full process control
- GPU utilization dashboard across your cluster
- Flexible model/port/env selection per launch
- Safe for production: no processes die on SSH disconnect
๐ฆ Installation
pip install -r requirements.txt
- Requires Python 3.8+
- Ensure
tmuxis installed on both local and remote machines - Passwordless SSH access is recommended
๐ Shell Autocompletion
To enable shell autocompletion for vllmctl, run:
vllmctl --install-completion
Or, to see the completion script for your shell:
vllmctl --show-completion
You can add the output to your shell profile (e.g., .bashrc, .zshrc) for persistent autocompletion.
๐ ๏ธ Commands Overview
1. list_local
Show all local vLLM models (including forwarded ports).
vllmctl list-local
Sample Output:
โโโโโโโโโโโโณโโโโโโโโโโโโโณโโโโโโโโโโโโณโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Server โ Remote portโ Local portโ Status โ Model โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ - โ - โ 8000 โ Local launch โ Qwen/Qwen2.5-Coder-32B-Instruct โ
โ server1 โ 8000 โ 16100 โ Forwarded โ Llama-2-13B-chat โ
โโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
2. list_remote
Show vLLM models running on all servers from your SSH config.
vllmctl list-remote [--host-regex <pattern>] [--remote-port <port>] [--debug]
3. auto_forward
Automatically forward ports with running models to your local machine.
vllmctl auto-forward [--host-regex <pattern>] [--remote-port <port>] [--local-range <start-end>] [--no-kill] [--debug]
4. tmux_forwards
Show all tmux-based SSH forwards and their status.
vllmctl tmux-forwards
5. vllm_queue_top
Real-time dashboard for vLLM queue status on all local ports (like nvtop for vLLM).
vllmctl vllm-queue-top
Sample Output:
Scanning ports for vLLM models... โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:00
\ vLLM Queue Status (refreshes every 1.0s)
โโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโณโโโโโโโโโโณโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโโโณโโโโโโโโโโ
โ Local Port โ Model โ Waiting โ Running โ Wait graph โ Run graph โ Prompt TPT โ Gen TPT โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ 16004 โ Qwen/Qwen3-32B โ 774 โ 226 โ โโโโโโโโโโโโโโโโโโ
โ
โ
โ
โฆ โ โโโโโโโ
โโโ
โ
โโโ
โโโโโโโโโฆ โ - โ - โ
โ 16101 โ Qwen/Qwen3-32B โ 774 โ 226 โ โโโโโโโโโโโโโโโโโโ
โ
โ
โ
โฆ โ โโโโโโโ
โโโ
โ
โ
โโ
โโโโโโโโโฆ โ - โ - โ
โ 16102 โ Qwen/Qwen3-4B โ 663 โ 113 โ โโโโโโโโโโโโโโโโโ
โ
โโ
โ
โฆ โ โโโโโโโโโ
โ
โ
โโโโโโโโโโโโฆ โ - โ - โ
โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโ
6. gpu_idle_top
Live GPU utilization and memory dashboard for all servers in your SSH config.
vllmctl gpu-idle-top --host-regex <pattern>
Sample Output:
Scanning GPU utilization on hosts... โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 100% 0:00:27
| GPU Idle Top (refreshes every 0.5s)
โโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโณโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโณโโโโโโโโโโโโ
โ Host โ Util (%) โ Util Graph โ Mem (%) โ Mem Graph โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ host-a โ 0.0 โ โโ โ 5.1 โ โโ โ
โ host-b โ 0.0 โ โโ โ 94.4 โ โโ โ
โ host-c โ 0.0 โ โโ โ 0.0 โ โโ โ
โ host-d โ 86.5 โ โโ โ 90.9 โ โโ โ
โ host-e โ 89.0 โ โโ โ 59.3 โ โโ โ
โ host-f โ 91.9 โ โโ โ 92.9 โ โโ โ
โ host-g โ 95.0 โ โโ โ 93.3 โ โโ โ
โ host-h โ 97.4 โ โโ โ 52.3 โ โโ โ
โ host-i โ 100.0 โ โโ โ 91.9 โ โโ โ
โโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโ
7. launch
Launch a vLLM server on a remote host and set up a local SSH tunnel.
vllmctl launch --server <host> --model <model_name> [--conda-env <env>] [--remote-port <port>] [--local-range <range>] [--timeout <seconds>] [--lifetime <duration>]
--lifetime <duration>: Maximum lifetime for the vLLM process. Supports formats like10m(minutes),2h(hours),1d(days),30s(seconds). Example:vllmctl launch --server myserver --model Qwen/Qwen3-4B --lifetime 2h
- After the specified lifetime, the vLLM server will be automatically stopped on the remote server.
- Only the vLLM process runs in tmux on the remote server; the SSH tunnel is managed locally without tmux.
8. Other Utilities
- Attach to tmux session:
vllmctl attach-tmux <session_name>
- Kill a tmux session:
vllmctl kill-tmux <session_name>
- Clean up dead/unused tmux sessions:
vllmctl clean-tmux-forwards
๐ Best Practices
- Always use tmux for remote process management
- Use SSH keys for authentication
- Monitor endpoints with health checks and logs
- Clean up unused sessions regularly
- For production, consider systemd for static deployments
โน๏ธ Help
All commands support --help for detailed usage:
vllmctl <command> --help
License
MIT
Project details
Release history Release notifications | RSS feed
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 vllmctl-0.1.0.tar.gz.
File metadata
- Download URL: vllmctl-0.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
920007dd7e94373a637ff3d238901571bc34d969d5a132207ac985939adcc0d5
|
|
| MD5 |
d07f713b626ff65b095a83abb744741b
|
|
| BLAKE2b-256 |
420eecd7724778e58fb656967cd82ce854d20089559bd25047b7830097da074b
|
File details
Details for the file vllmctl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vllmctl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c8823c00d3eb5128453ebc66dae3b9d3a17aed13e1875e150da85b43ad4b381
|
|
| MD5 |
f04eb60214b2655df064821eeedb3a98
|
|
| BLAKE2b-256 |
29859e40b909f5db9a46488db3b5e4c689d2b2a47e28f1ada35b38c7af806ae1
|