ss command to know socket status

The "ss" command displays an output similar to the "netstat" command in linux distributions. The command displays the list of all socket and port status and related informations. Also the "ss" command can use with switches like -r,  -t, -u, etc. A summary of all established, close wait, or related like status of sockets will get as output.


Sample output of ss command
[root@server ~#]ss
State      Recv-Q Send-Q                      Local Address:Port                          Peer Address:Port
ESTAB      0      0                       ::ffff:192.168.10.20 :webcache                ::ffff: 192.168.10.209:veracity
ESTAB      0      0                               192.168.10.20 :ssh                            192.168.10.2:llsurfup-https
ESTAB      0      0                       ::ffff: 192.168.10.20 :webcache                ::ffff: 192.168.10.209:nim
CLOSE-WAIT 1      0                            192.168.10.20 :57278                          192.168.10.205:http
ESTAB      0      0                       ::ffff: 192.168.10.20 :webcache                ::ffff: 192.168.10.209:vfo
ESTAB      0      0                               192.168.10.20 :5901                           192.168.10.2:bridgecontrol
ESTAB      0      0                               192.168.10.20 :ftp                            192.168.10.15:alphatech-lm
ESTAB      0      0                       ::ffff: 192.168.10.20 :webcache                ::ffff: 192.168.10.209:startron


List of all listening ports
[root@server ~#]ss -l
Show all TCP socket status
[root@server ~#]ss -t
Show all UDP socket status
[root@server ~#]ss -u
Resolve hostnames (connected host's)
[root@server ~#]ss -r
Show socket memory usage
[root@server ~#]ss -m

ss command switches
   -h, --help           Print this menu
   -V, --version        output version information
   -n, --numeric        don't resolve service names
   -r, --resolve       resolve host names
   -a, --all            display all sockets
   -l, --listening      display listening sockets
   -o, --options       show timer information
   -e, --extended      show detailed socket information
   -m, --memory        show socket memory usage
   -p, --processes      show process using socket
   -i, --info           show internal TCP information
   -s, --summary        show socket usage summary
   -4, --ipv4          display only IP version 4 sockets
   -6, --ipv6          display only IP version 6 sockets
   -0, --packet display PACKET sockets
   -t, --tcp            display only TCP sockets
   -u, --udp            display only UDP sockets
   -d, --dccp           display only DCCP sockets
   -w, --raw            display only RAW sockets
   -x, --unix           display only Unix domain sockets
   -f, --family=FAMILY display sockets of type FAMILY
   -A, --query=QUERY, --socket=QUERY
       QUERY := {all|inet|tcp|udp|raw|unix|packet|netlink}[,QUERY]
   -D, --diag=FILE      Dump raw information about TCP sockets to FILE
   -F, --filter=FILE   read filter information from FILE
       FILTER := [ state TCP-STATE ] [ EXPRESSION ]

0 comments:

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons