The netstat command is used to display network status. Using the netstat command allows you to know the network situation of the entire Linux system.
1. View the number of tcp connections command:
netstat -an |grep ‘ESTABLISHED’ |grep ‘tcp’ |wc -l
2. Command to view the number and status of TCP connections:
netstat -an|awk ‘/^tcp/{++S[$NF]}END{for (a in S)print a,S[a]}’
Leave A Comment?
You must be logged in to post a comment.