postIt

        Post-It sticky notes with PasteBin sense

  • 08:03:50 am on August 10, 2011 | # | 0
    Tags: , , ,

    Socket monitoring by watching receive and send queue every 5 seconds

    $ while true; do netstat -tn; sleep 5; clear; done

    Result:

     
    Active Internet connections (w/o servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State
    tcp        0      0 10.238.133.152:43941    98.136.48.103:5050      ESTABLISHED
    tcp        1      0 10.238.133.152:42541    8.27.254.249:80         CLOSE_WAIT
    tcp        1      0 10.238.133.152:34355    184.73.222.16:80        CLOSE_WAIT
    tcp        0      0 10.238.133.152:43210    199.59.148.87:443       ESTABLISHED
    tcp        0    229 10.238.133.152:43209    199.59.148.87:443       ESTABLISHED

    This is to emulate combination of watch and ss in Solaris, more or less same result

    $ watch -n 5 ss -t
    State      Recv-Q Send-Q      Local Address:Port          Peer Address:Port
    ESTAB      0      0          10.238.133.152:36045       74.125.224.250:https
    ESTAB      0      0          10.238.133.152:36044       74.125.224.250:https
    CLOSE-WAIT 1      0          10.238.133.152:59622      174.129.233.179:www
    ESTAB      0      0          10.238.133.152:43941        98.136.48.103:mmcc
    CLOSE-WAIT 38     0          10.238.133.152:49300        199.59.148.87:https
    ESTAB      0      0          10.238.133.152:33626       74.125.224.191:https
    CLOSE-WAIT 1      0          10.238.133.152:37621        208.46.163.81:www
     

  • Modified from Prologue theme by Automattic

Leave a Comment