Skip to main content

whosat

A terminal dashboard for ports, processes, and Docker containers.
Like htop but focused on network ports.

PyPI Python License


What is whosat?

whosat is a terminal-based system monitor that answers one question: "who's sitting on that port?"

It scans all listening ports on your machine, groups them by process, enriches them with CPU/memory stats, and displays everything in a rich interactive TUI. Think of it as htop meets netstat — you get a live, searchable, themeable dashboard showing every port, the process behind it, and what resources it's consuming.

Whether you're debugging a port conflict, hunting down a runaway process, or just want a quick overview of what's running on your system — whosat gives you the answer in one command.

whosat screenshot

Install

pip install whosat

With Docker support:

pip install 'whosat[docker]'

Usage

TUI Dashboard

whosat

Launch the full interactive TUI — live-updating, searchable, themeable.

CLI One-liners

# What's on port 3000?
whosat 3000

# Kill whatever is on port 8080 (finds parent process, kills the tree)
whosat kill 8080

# Force kill without confirmation
whosat kill 8080 --force

# List all ports in a table
whosat ls

# Sort by CPU usage, descending
whosat ls --sort cpu --desc

# JSON output — pipe to jq, use in scripts
whosat --json
whosat 3000 --json
whosat ls --json

Examples

$ whosat 8880
🐍 :8880 → uvicorn (pid 7218)  TCP/0.0.0.0  [ONLINE]  cpu 0.1%  mem 1.0 GB  up 5h 8m  user adwitiya

$ whosat ls
PORT    NAME             PID  PROTO  IP           STATUS     CPU     MEM     UPTIME
22      🔒 sshd            -  TCP    0.0.0.0      ● ONLINE     -       -     -
3000    📗 node        12847  TCP    0.0.0.0      ● ONLINE  0.2%  115 MB     2h 8m
5432    🐘 postgres     1234  TCP    127.0.0.1    ● ONLINE  0.0%   42 MB     3d 2h
8880    🐍 uvicorn      7218  TCP    0.0.0.0      ● ONLINE  0.1%  1.0 GB    5h 8m

$ whosat kill 8000
🐍 python3 (pid 96365) on port 8000
Worker pid 96365 is a child of uvicorn (pid 96363)
Kill uvicorn (pid 96363)? [y/N] y
Sent SIGTERM to uvicorn (pid 96363)

Features

  • CLI Power — whosat 3000 for instant port lookup, whosat kill 3000 to free a port, whosat ls for a quick table, --json for scripting
  • Smart Kill — Detects parent processes (uvicorn master, node supervisor) and kills the whole tree
  • Port Conflict Detection — Warns about multiple PIDs on the same port or mixed bind addresses
  • Port & Process Monitoring — See all listening ports with owning processes, CPU/memory usage, and uptime
  • Memory View — System-wide process memory usage with GPU memory tracking (NVIDIA)
  • Docker Integration — Optional container monitoring alongside system processes
  • Group & Flat Views — Group processes by name or view as a flat list
  • Detail Panel — Expand any process to see full network info, open ports, resource usage, and CPU sparkline
  • Actions — Ping, curl, and kill processes directly from the TUI
  • Live Refresh — Configurable auto-refresh (15s / 30s / 1m / 2m / off)
  • Theming — 6 built-in themes (matrix, nord, dracula, tokyo-night, gruvbox, solarized)
  • Search & Filter — Search by process name, port, or IP; filter by scope (system / docker)
  • Keyboard Driven — Full keyboard navigation
  • Cross-platform — Linux, macOS, and WSL2

Keyboard Shortcuts

Key Action
1 / 2 Switch to Ports / Memory view
Up / Down Navigate rows
Enter Expand/collapse row + open detail panel
Esc Close detail panel / modal / clear search
/ Focus search
R Refresh data
G Toggle group/flat view
K Kill selected process
S Cycle scope (ALL / SYS / DOCKER)
T Cycle theme
Y Copy IP:PORT to clipboard
Q Quit

Configuration

On first run, whosat creates ~/.whosat/config.toml with default categories and settings.

theme = "matrix"
refresh_interval = 30

[[categories]]
name = "python"
icon = "snake"
section = "System"
match = ["python3", "python", "uvicorn", "gunicorn", "celery"]

# Add your own:
# [[port_names]]
# port = 8020
# name = "My App"
# icon = "robot"

Requirements

  • Python 3.10+
  • Linux, macOS, or WSL2
  • Optional: Docker SDK for container monitoring
  • Optional: NVIDIA GPU for GPU memory tracking in memory view

License

MIT

Metadata

Release files for whosat 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whosat 0.2.0
File Size Uploaded Provenance Actions
whosat-0.2.0.tar.gz 60.4 kB Without provenance Details for whosat-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for whosat 0.2.0
File Interpreter ABI Platform Actions
whosat-0.2.0-py3-none-any.whl Python 3 none any Details for whosat-0.2.0-py3-none-any.whl

Total release size: 126.8 kB

Release files / whosat-0.2.0.tar.gz

Download URL whosat-0.2.0.tar.gz
Size 60.4 kB
Tags Source
SHA-256 checksum
How to use checksums
54700e3fbb0055a940e68e75fe9a6c1ea05374874dafdfaa77586afa5b26a187
BLAKE2b-256 checksum
How to use checksums
73226d4c92b3c621859013439ba507b146d3d33fbd858fe840a020937a3e0816
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / whosat-0.2.0-py3-none-any.whl

Download URL whosat-0.2.0-py3-none-any.whl
Size 66.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74594c65ddd0bbcc123537f4ae40f9a03789450e90d2a6069cf0c3f76650ba48
BLAKE2b-256 checksum
How to use checksums
7836fca0ef91caddce2384f581c29959ec1994d6b1010b08b5a07b3bef1d6b0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for whosat 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page