Results 1 to 4 of 4

Thread: Does someone know a command similar to this for CentOS 6?

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Does someone know a command similar to this for CentOS 6?

    Does someone know a command like this that works with CentOS 6. This is broken in CentOS 6 but worked before in version 5 and 4.

    netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

  2. #2
    Senior Member
    Join Date
    Jun 2007
    Location
    Hyderabad, AP, India
    Posts
    805
    Thanks
    44
    Thanked 55 Times in 48 Posts
    Rep Power
    11

    Default

    Quote Originally Posted by nibb View Post
    Does someone know a command like this that works with CentOS 6. This is broken in CentOS 6 but worked before in version 5 and 4.

    netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n
    Its not broken and working fine for me in CentOS6.2..

    Can I know whats the error or issue?
    Thanks,
    Surendra Kumar Anne
    Linux: Fast, friendly, flexible and .... free!
    Support Open source.
    http://www.linuxnix.com

  3. #3
    Junior Member
    Join Date
    Nov 2012
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by kumarat9pm View Post
    Its not broken and working fine for me in CentOS6.2..

    Can I know whats the error or issue?
    The count number is broken.

    It will list 2 or 3 connections from an IP while I open 500. It never increases.

    The command does not show any error, but it does not do what its supposed to do, which is list all IPs with its connection number.

    CentOS 5:
    8 some IP
    11 some IP
    38 some IP
    40 MY IP
    64 0.0.0.0

    I have open over 50 connections to my server here, so it MY IP is slowly increasing in number as I run the command.

    CentOS 6
    1 some IP
    1 some IP
    1 some IP
    2 MY IP
    24 0.0.0.0
    I can open as many connections as I want, my IP, or what ever IP im using or server to test this, will never increase over 3, usually all IP show 1 connection or 2.

    So, no it does not work. I tested it on multiple servers and its not showing the correct number of connections per IP on CentOS 6. You need to actually open allot of connections to your server to test this.

  4. #4
    Senior Member
    Join Date
    Jun 2007
    Location
    Hyderabad, AP, India
    Posts
    805
    Thanks
    44
    Thanked 55 Times in 48 Posts
    Rep Power
    11

    Default

    hmmm Not sure.. if below command helps you.. you have to refine below command to get desired output.

    lsof -i tcp -i udp
    Thanks,
    Surendra Kumar Anne
    Linux: Fast, friendly, flexible and .... free!
    Support Open source.
    http://www.linuxnix.com

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Detecting similar fields in a certain file
    By bojomojo in forum Shell scripting
    Replies: 4
    Last Post: 2nd July 2010, 11:04 PM
  2. centos adduser command not found
    By chinalinix in forum CentOS / RHEL / Fedora
    Replies: 3
    Last Post: 13th March 2010, 11:41 AM
  3. how to find similar files
    By kouche in forum Shell scripting
    Replies: 1
    Last Post: 2nd March 2010, 08:09 AM
  4. Red Hat / Fedora / CentOS Linux Install and USe banner command
    By eawedat in forum CentOS / RHEL / Fedora
    Replies: 6
    Last Post: 25th June 2008, 02:28 AM
  5. Replies: 0
    Last Post: 24th June 2008, 03:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41