Monday 19 January 2015

Monitoring active tcp connections

Active tcp connections number brings us light on whether the system can serve the request fast. A high number indicate queuing/processing of requests. This number can be retrieved from netstat.
#!/bin/bash
tcp=$(/bin/netstat -nt | tail -n +3 | grep ESTABLISHED | wc -l)
printf "%s \n" "$tcp"

[root@fc21 ~]# tcp
5

No comments :

Post a Comment

search iomeweekly