English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Linux - Determine number of unique hosts connected to server
Normally; I would use netstat -a | grep
To see a list or to get a count of how many connections to a particular port. However, I need a bit more granular output so that I can also see the number of UNIQUE hosts connected to that port. Otherwise, the current output I am getting will show multiple connections a host may have; which doesn't give me an accurate 'count' of total hosts connected.

Thanks

2007-09-18 06:41:34 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

netstat -a | grep | sort -u
netstat -a | grep | sort | uniq

to get a count:
netstat -a | grep | sort | uniq | wc -l
(thats a small case L on the end)

2007-09-18 10:03:43 · answer #1 · answered by Gandalf Parker 7 · 1 0

fedest.com, questions and answers