Network connections and ports
Two tabs answer the network questions you meet most often while developing and testing: "what is this program connected to?" and "what is listening on this port?". SysVitals reads the answers straight from the kernel, like netstat -tunp and ss -tlnp do.
TIP
Run sudo ./sysvitals.py for these tabs. As a normal user you can only see which program owns sockets that you started yourself; the others show - in PID/PROGRAM.
The Network tab
Press 2. Every TCP and UDP socket, IPv4 and IPv6, is listed.
| Column | Meaning |
|---|---|
PROTO | tcp, tcp6, udp or udp6. |
LOCAL | Your side of the connection: address and port. |
REMOTE | The other side. 0.0.0.0:0 or :::0 means there is no other side yet. |
STATE | The TCP state, such as ESTABLISHED, LISTEN, TIME_WAIT or CLOSE_WAIT. |
USER | The user that owns the socket. |
PID/PROGRAM | The process ID and program name, or - if it cannot be seen. |
Rows are grouped by state: established connections first (green), then other states, then listening sockets (cyan). UDP sockets that are not connected to a remote address count as listening.
Find one connection
Press / and type any part of a row: a port such as :5432, an address, a state such as established, or a program name. Matching ignores case. Press Enter to keep the filter.
The Ports tab
Press 3. Only listening sockets are shown, one row per port and program, sorted by port number.
| Column | Meaning |
|---|---|
PROTO | Protocol. |
ADDRESS | The address the port listens on. |
PORT | The port number. |
SERVICE | The well-known service for that port, from your system's services list (for example ssh for 22). - if there is none. |
USER | The owning user. |
PID/PROGRAM | Who opened it. |
Spot exposed services
A yellow row listens on all interfaces: 0.0.0.0 (every IPv4 address) or :: (every IPv6 address). Anything that can reach your machine over the network can try to connect to it, subject to your firewall.
A row with 127.0.0.1 or ::1 listens on the loopback interface only, so only programs on the same machine can reach it. Development servers, databases and mock servers are usually safer that way.
Common tasks
Which program is using port 8080?
Run
sudo ./sysvitals.pyand press 3.Press /, type
8080, and press Enter.Read PID/PROGRAM. To stop that program, note the PID, press 1, filter for the PID and press x. See Stop a process.
Is my test server reachable from other machines?
Start your server, open the Ports tab and find its port. A yellow row means it listens on all interfaces. If you only meant to test locally, configure the server to listen on 127.0.0.1.
How many connections does my app have open?
Open Network, filter by the program name, and count the ESTABLISHED rows. Rows stuck in CLOSE_WAIT usually mean the program is not closing connections it has finished with.