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: :webcache                ::ffff:
ESTAB      0      0                      :ssh                  
ESTAB      0      0                       ::ffff: :webcache                ::ffff:
CLOSE-WAIT 1      0                   :57278                
ESTAB      0      0                       ::ffff: :webcache                ::ffff:
ESTAB      0      0                      :5901                 
ESTAB      0      0                      :ftp                  
ESTAB      0      0                       ::ffff: :webcache                ::ffff:

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 ]

Was this helpfull ?


Related Posts Plugin for WordPress, Blogger...

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