Back to articles
I replaced lsof, ss, and netstat with a single Rust binary

I replaced lsof, ss, and netstat with a single Rust binary

via Dev.toMark Marosi

The problem Every developer has been here: something is hogging port 3000 and you need to find out what. On Linux you try ss -tlnp | grep 3000 . On macOS it's lsof -i :3000 . On Windows... good luck. Each gives different output, different flags, and none of them tell you how long the process has been running, how much memory it's eating, or whether it's a Docker container. I got tired of this. So I built portview . One command, everything you need $ portview That's it. Every listening port, the process behind it, PID, user, uptime, memory usage, and the full command -- in a colored table. Cross-platform. ~1.3 MB single binary. Zero runtime dependencies. PORT PROTO PID USER PROCESS UPTIME MEM COMMAND 3000 TCP 48291 mark node 3h 12m 248 MB next dev 5432 TCP 1203 pg postgres 14d 2h 38 MB /usr/lib/postgresql/16/bin/postgres 6379 TCP 1198 redis redis 14d 2h 12 MB redis-server *:6379 8080 TCP 51002 mark python3 22m 45 MB uvicorn main:app --port 8080 No parsing lsof output through awk . No re

Continue reading on Dev.to

Opens in a new tab

Read Full Article
2 views

Related Articles