On Tue, Oct 17, 2006 at 02:31:39PM +0200, Jan Miczaika wrote:
> Hello,
> 
> we currently check on the amount of thread our mysql servers are running 
> with a bash script which more or less does:
> 
> STRING=`mysqladmin -u $USER -p XXX status`
> THREADS=`echo $STRING | sed 's/.*Threads: \([0-9]*\) .*/\1/'`
> 
> gmetric -tuint32 -c$MCAST -p$PORT -l$TTL -x180 -d300 -nmysql_threads 
> -v$THREADS
> 
> While this works well enough, the resolution is currently at 1 minute, 
> too low for reading spikes.
> 
> I have two questions:
> 
> a) is there a better way of piping mysql statistics into gmetric than 
> using bash to read variables, called by a 1-minute cronjob?

not that I know of.

> b) is there any way I can increase the resolution without installing a 
> cronjob handler which can run more often than 1 time per minute?

The only other (easy) option I can see is surrounding the above in a
'while:; do ..... sleep 10; done' loop and running the process
continually (monit is a nice app for making sure it doesn't crash, gets
started, etc.).

I also record the number of mysql queries per second, which might help
to give you an indication of when something strange happens.  My script
is available at http://ben.hartshorne.net/ganglia/ if you are
interested.

-ben

-- 
Ben Hartshorne
email: [EMAIL PROTECTED]
http://ben.hartshorne.net

Attachment: signature.asc
Description: Digital signature

Reply via email to