Skip to content

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.

ColumnMeaning
PROTOtcp, tcp6, udp or udp6.
LOCALYour side of the connection: address and port.
REMOTEThe other side. 0.0.0.0:0 or :::0 means there is no other side yet.
STATEThe TCP state, such as ESTABLISHED, LISTEN, TIME_WAIT or CLOSE_WAIT.
USERThe user that owns the socket.
PID/PROGRAMThe 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.

ColumnMeaning
PROTOProtocol.
ADDRESSThe address the port listens on.
PORTThe port number.
SERVICEThe well-known service for that port, from your system's services list (for example ssh for 22). - if there is none.
USERThe owning user.
PID/PROGRAMWho 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? ​

  1. Run sudo ./sysvitals.py and press 3.

  2. Press /, type 8080, and press Enter.

  3. 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.

Next steps ​