netdiag

package
v5.63.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package netdiag names the processes behind a network failure, so an error such as "address already in use" says who holds the port.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PortOccupants

func PortOccupants(ports ...int) string

PortOccupants reports every TCP socket in this network namespace whose local port is one of ports: local and remote address, state and — when the owning process is visible in this pid namespace — pid and command line. It is attached to failures that name "address already in use", so a taken port names its occupant instead of leaving a bare EADDRINUSE. A socket without a visible owner belongs to a process in another pid namespace that shares this network namespace (on CircleCI's v2 docker runtime the job container shares its pod's namespace with the task agent). Linux only: it reads /proc/net/tcp{,6} and /proc/*/fd; elsewhere, or if /proc is unavailable, it returns "".

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL