As the title says how would one check the number of open connections to a webserver on port 80 and 443?
I'm currently using this oneliner to get the number of open connections per ipaddress from port 80:
netstat -tn 2>/dev/null |
grep :80 |
grep -i established |
awk '{print $5}' |
cut -d: -f1 |
sort |
uniq -c |
sort -nr |
head
How would one add port number 443 to this query? I've tried the following:
netstat -tn 2>/dev/null |
grep ':80/|:443' |
grep -i established |
awk '{print $5}' |
cut -d: -f1 |
sort |
uniq -c |
sort -nr |
head
but ended up getting 0 results did i do something wrong?