How sleepy is your MySQL serve …

How sleepy is your MySQL server?
Here’s a simple way to find out:

$ mysqladmin pro \
| awk '/Sleep/ {a+=$12} END {print a/NR}' \
| sed 's/\.[0-9]*$//'

This will print out a single figure, the average time sleeping MySQL processes spend asleep.
If that figure is high then maybe it’s time to follow some of the hints Jeremy posted, and linked to below and reduce the number of idle processes on your server!



Leave a Reply