Follow us on Twitter...
Stay up to date with the latest news, special offers and advice from CensorNet on Twitter... we are Tweeting regularly!
Sometimes it is useful to understand how many connections are active to the CensorNet server from unique source IP addresses. This can help you to diagnose performance issues or highlight a DoS attack from a computer on the network. The following commands can help.
The following commands should be run as the root user from the CensorNet server command line.
Display a list of connections from unique IP addresses to the proxy (first column connection count, second column IP address)
netstat -n | grep 8080 | awk '{print $5;}' | cut -d : -f 1 | sort | uniq -c
Display a count of unique IP addresses connected to the proxy (also includes closed connections)
netstat -n | grep 8080 | awk '{print $5;}' | cut -d : -f 1 | sort | uniq | grep -c .
Display a count of unique IP addresses which have open and active connections to the proxy
netstat -n | grep 8080 | grep ESTAB | awk '{print $5;}' | cut -d : -f 1 | sort | uniq -c
Display the number of connections to the database server (more than 50 will cause performance issues)
netstat -n | grep 5432 | grep ESTAB -c