The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

netstat

Discussion in 'General Discussion' started by MMarko, Jan 28, 2006.

  1. MMarko

    MMarko Well-Known Member

    Joined:
    Apr 18, 2005
    Messages:
    316
    Likes Received:
    0
    Trophy Points:
    16
    One of the most twisted, but useful invocations is:

    netstat -a -n|grep -E "^(tcp)"| cut -c 68-|sort|uniq -c|sort -n

    This will show you a sorted list of how many sockets are in each connection state. For example:

    9 LISTEN
    21 ESTABLISHED


    :D


    Found this here -> http://people.redhat.com/alikins/system_tuning.html
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Actually thought the ps invocation mentioned was more useful.

    ps -eo pid,%cpu,vsz,args,wchan

    Thanks for the link.
     

Share This Page