Write a single command line that uses netstat and grep to co
Write a single command line that uses netstat and grep to count all connections in a state of “ESTABLISHED” and outputs a single number representing how many connections are currently open to the server.
Solution
use this command to get the number of established connections to port 80:
ss -o state established \'( sport = :http or sport = :https )\' | wc -l
For total number of connections use:
ss -o state established | wc -l

