What Are Established Connections?
Established connections represent active TCP connections between processes on your system. These are network communications that are currently in progress, such as:- A web application connecting to a database
- A Node.js service calling an external API
- Inter-service communication in a microservices architecture
ss command to discover all established TCP connections:
Connection Data Structure
Each connection contains information about the source and destination:Table View: Connection Badges
In the Table view, connections are displayed as badge indicators in the “Connect to” column of the listeners table. Each badge shows the target of a connection:Target identification
psys attempts to identify the connection target using multiple methods:
- Docker container names - If the target port is published by a Docker container
- Known services - Common services like MongoDB (27017), Redis (6379), PostgreSQL (5432), MySQL (3306)
- Process names - For local connections, psys looks up the process name at that port
- Address:port - Falls back to showing the raw address and port
Badge display
Up to 5 connection targets are shown as individual badges. If there are more connections, a “+N” badge indicates the additional count.
Badges use the secondary variant for connection targets and the outline variant for the overflow count indicator.
Diagram View: Visual Network Graph
The Diagram view provides a visual representation of your system’s network topology using ReactFlow. This interactive graph shows:Listener Nodes (Left Side)
Rectangular nodes with:- Process icon - Visual indicator of the service type
- Docker icon - Shown if the port is published by a container
- Service label - Process name or detected service
- Port number - The listening port
components/connections-dashboard.tsx:92
Target Nodes (Right Side)
Rounded nodes representing connection targets:- Target label - Service name or address:port
- Address and port - Connection destination details
components/connections-dashboard.tsx:114
Edges: Connection Lines
Arrows drawn from listener nodes to target nodes represent active connections. Each edge is created only once per unique listener-target pair:components/connections-dashboard.tsx:132
Duplicate edges between the same listener and target are deduplicated to keep the diagram clean and readable.
Target Label Resolution
psys uses a smart resolution strategy to provide meaningful labels for connection targets:- Docker container name - Check if the target port matches a Docker container
- Known service by port - Use well-known port mappings (MongoDB, Redis, etc.)
- Local process lookup - For loopback connections, find the process at that port
- IPv4/IPv6 alternates - Check both loopback addresses (127.0.0.1 and ::1)
Known Service Ports
For connection targets, psys recognizes these common services:lib/connections.ts:328