Tuesday, July 31, 2007

mysqltop.sh

If you need to monitor mysql proccesslist, dump the following to a shell script and chmod 755. (ofcourse you will need to add passwords etc. if you have any;)


#!/bin/sh

watch 'mysql<<EOF
show processlist;
EOF
'


(Control+C will let you out)

2 comments:

  1. a shorter variant

    watch -d 'mysql -e"show processlist;"'

    switch -d marks columns that have changed (see man watch)

    ReplyDelete
  2. thank you "anonymous". I like your version.

    ReplyDelete

[Due to much spam, comments are now moderated and will be posted after review]