Menu Close

Stupid monitoring trick: Watch mysql queries fly

Put this somewhere in your ~/bin:

watch 'echo "show processlist" | mysql -u whateveruser --password=mypassword | grep -v "show processlist" '

Now run it and you will have a poor man’s monitor, kind of like top but for MySQL. That coupled with screen (or multiple terminals) may give you some quick and easy piece of mind.

This should give you *a lot* of monitoring automation ideas. It should be easy to put together a shell script that puts it all in a little “important things panel” to use watch on. Sometimes that’s all you need.

1 Comment

Comments are closed.