Linux under Network view command SS SS command
The SS command is used to display the socket information in the active state. Similar content can be displayed and netstat, and more detailed information can be displayed, and viewing is faster.
Format
SS [Options] [FILTER]
Options
-H: Displays help information;
-V: Displays the instruction version information;
-N: Do not parse the service name and display it digitally;
-A: Displays all sockets;
-L: Displays the socket in the listening state;
-O: Displays timer information;
-M: Shows memory usage of sockets;
-P: Displays process information using sockets;
-I: Displays the internal TCP information;
-4: Only IPv4 sockets are displayed;
-6: Only IPv6 sockets are displayed;
-T: Only TCP sockets are displayed;
-u: Displays only UDP sockets;
-D: Show only DCCP sockets;
-W: Show only raw sockets;
-x: Only UNIX domain sockets are displayed.
Example
[[Email protected] ~] #ss-L # View native Open ports State recv-q send-q local address:port Peer address:port LIST EN 0 *:55397 *:* LISTEN 0:: : Sunrpc :::*
[[Email protected] ~] #ss-at # Show all TCP sockets
[[Email protected] ~] #ss-au # Show all UDP sockets
[[Email protected] ~] #ss-O State established # displays all connected socket connections Recv-q send-q Local address:port Peer address:port 0 148 192.168.55.55:ssh 192.168.55.1:13504 timer: (on,247ms,0) 0 0 172.16.253.55:ssh 172.16.253.209:5530 timer: ( keepalive,26min,0)
[[Email protected] ~] #ss-S # displays all current socket details total:824 (kernel 830) TCP: + (estab 3, closed 0, orphaned 0, synre CV 0, Timewait 0/0), ports 8Transport total IP ipv6* 830 - - RAW 0 0 0 UDP 7 3 TCP 7 INET FRAG 0 0 0
Linux under Network View command SS