Dhiru · dev watch
How to keep track of running dev servers and ports on Mac
Old dev servers pile up: Next.js moves to 3001, Vite to 5174, and soon nothing is where you expect. Here's how to see them all.
One command
lsof -nP -iTCP -sTCP:LISTEN
Every app listening on a port, with its PID. Stop one with kill <PID>. Full walkthrough: see what's running on a port.
Keep an eye on it
- Menu bar port apps: several free, open-source apps list listening ports in the menu bar with a kill button, for example Manfath and Seeports.
- Activity Monitor: shows processes and CPU, but not ports.
- On your desktop: Dhiru, from Spritefolk. A tortoise with a laptop who notices the dev servers you've left running, shows what's hogging your CPU, checks your internet speed and can keep your Mac awake.
Port by port: 3000, 3001, 3306, 4000, 4200, 4321, 5000, 5173, 5432, 5555, 6006, 6379, 7000, 8000, 8080, 8081, 8787, 8888, 9000, 9229, 27017