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
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
Thanks,
Surendra Kumar Anne
Linux: Fast, friendly, flexible and .... free!
Support Open source.
http://www.linuxnix.com
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.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)