blob: 0b9a8c435176a6a4e06abc454a2771f37d4ab71f [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001.TH SS 8
2.SH NAME
3ss \- another utility to investigate sockets
4.SH SYNOPSIS
5.B ss
6.RI [ options ] " [ FILTER ]"
7.SH DESCRIPTION
8.B ss
9is used to dump socket statistics. It allows showing information similar
10to
11.IR netstat .
12It can display more TCP and state informations than other tools.
13
14.SH OPTIONS
15When no option is used ss displays a list of
16open non-listening TCP sockets that have established connection.
17.TP
18These programs follow the usual GNU command line syntax, with long
19options starting with two dashes (`-').
20A summary of options is included below.
21.TP
22.B \-h, \-\-help
23Show summary of options.
24.TP
25.B \-V, \-\-version
26Output version information.
27.TP
28.B \-n, \-\-numeric
29Do not try to resolve service names.
30.TP
31.B \-r, \-\-resolve
32Try to resolve numeric address/ports.
33.TP
34.B \-a, \-\-all
35Display both listening and non-listening (for TCP this means established connections) sockets.
36.TP
37.B \-l, \-\-listening
38Display only listening sockets (these are omitted by default).
39.TP
40.B \-o, \-\-options
41Show timer information.
42.TP
43.B \-e, \-\-extended
44Show detailed socket information
45.TP
46.B \-m, \-\-memory
47Show socket memory usage.
48.TP
49.B \-p, \-\-processes
50Show process using socket.
51.TP
52.B \-i, \-\-info
53Show internal TCP information.
54.TP
55.B \-s, \-\-summary
56Print summary statistics. This option does not parse socket lists obtaining
57summary from various sources. It is useful when amount of sockets is so huge
58that parsing /proc/net/tcp is painful.
59.TP
60.B \-4, \-\-ipv4
61Display only IP version 4 sockets (alias for -f inet).
62.TP
63.B \-6, \-\-ipv6
64Display only IP version 6 sockets (alias for -f inet6).
65.TP
66.B \-0, \-\-packet
67Display PACKET sockets (alias for -f link).
68.TP
69.B \-t, \-\-tcp
70Display TCP sockets.
71.TP
72.B \-u, \-\-udp
73Display UDP sockets.
74.TP
75.B \-d, \-\-dccp
76Display DCCP sockets.
77.TP
78.B \-w, \-\-raw
79Display RAW sockets.
80.TP
81.B \-x, \-\-unix
82Display Unix domain sockets (alias for -f unix).
83.TP
84.B \-f FAMILY, \-\-family=FAMILY
85Display sockets of type FAMILY.
86Currently the following families are supported: unix, inet, inet6, link, netlink.
87.TP
88.B \-A QUERY, \-\-query=QUERY, \-\-socket=QUERY
89List of socket tables to dump, separated by commas. The following identifiers
90are understood: all, inet, tcp, udp, raw, unix, packet, netlink, unix_dgram,
91unix_stream, packet_raw, packet_dgram.
92.TP
93.B \-D FILE, \-\-diag=FILE
94Do not display anything, just dump raw information about TCP sockets to FILE after applying filters. If FILE is - stdout is used.
95.TP
96.B \-F FILE, \-\-filter=FILE
97Read filter information from FILE.
98Each line of FILE is interpreted like single command line option. If FILE is - stdin is used.
99.TP
100.B FILTER := [ state TCP-STATE ] [ EXPRESSION ]
101Please take a look at the official documentation (Debian package iproute-doc) for details regarding filters.
102.SH USAGE EXAMPLES
103.TP
104.B ss -t -a
105Display all TCP sockets.
106.TP
107.B ss -u -a
108Display all UDP sockets.
109.TP
110.B ss -o state established '( dport = :ssh or sport = :ssh )'
111Display all established ssh connections.
112.TP
113.B ss -x src /tmp/.X11-unix/*
114Find all local processes connected to X server.
115.TP
116.B ss -o state fin-wait-1 '( sport = :http or sport = :https )' dst 193.233.7/24
117List all the tcp sockets in state FIN-WAIT-1 for our apache to network 193.233.7/24 and look at their timers.
118.SH SEE ALSO
119.BR ip (8),
120.BR /usr/share/doc/iproute-doc/ss.html " (package iprouteĀ­doc)"
121.SH AUTHOR
122.I ss
123was written by Alexey Kuznetosv, <kuznet@ms2.inr.ac.ru>.
124.PP
125This manual page was written by Michael Prokop <mika@grml.org>
126for the Debian project (but may be used by others).