Skip to main content

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
psys uses the 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:
1

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
2

Badge display

Up to 5 connection targets are shown as individual badges. If there are more connections, a “+N” badge indicates the additional count.
3

Filtering logic

Connections are matched to listeners by PID and source port:
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
Listener nodes are positioned vertically on the left side of the diagram:
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
Target nodes are automatically positioned to the right:
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:
The resolution order is:
  1. Docker container name - Check if the target port matches a Docker container
  2. Known service by port - Use well-known port mappings (MongoDB, Redis, etc.)
  3. Local process lookup - For loopback connections, find the process at that port
  4. IPv4/IPv6 alternates - Check both loopback addresses (127.0.0.1 and ::1)
The diagram view includes interactive controls for zooming, panning, and a mini-map for navigation in complex network graphs.

Known Service Ports

For connection targets, psys recognizes these common services:
lib/connections.ts:328
This helps you quickly identify where your services are connecting without needing to remember port numbers.