mathie's bits
root@xx [/scripts]# more check.sh #!/bin/sh echo “Uptime:” uptime echo “Disk free:” df -kh echo “Apache Processes:” ps -C ‘httpd’ | wc -l echo “MySQL Processes:” ps -C ‘mysqld’ | wc -l host=`host YOURDOMAIN.COM | awk ‘{print $4}’` one=`netstat -n –tcp | grep $host | wc -l` total=`netstat -n –tcp | wc -l` wait=`netstat -n –tcp | grep TIME_WAIT | wc -l` est=`netstat -n –tcp | grep ESTABLISHED | wc -l` echo “AR Connection: $one” echo “TIME_WAIT Connection: $wait” echo “ESTABLISHED Connection: $est” echo “Total Connections: $total”
Posted
in
by
admin
Tags:
Your email address will not be published. Required fields are marked *
Comment *
Name *
Email *
Website
Δ
Leave a Reply