top
command, but without any of the bells and whistles?Well, here you go:
> while [[ 1 ]];
do
clear;
mysql -u <username> -p<password> -h <host> -e "show full processlist";
sleep 1;
done
Remember to replace the <username> <password> and <host> variables with the values for your database. Also, if you don't like the bounding box on the mysql output, you can have a cleaner output by using redirection instead of the -e flag:
mysql -u <username> -p<password> -h <host> <<< "show full processlist";
You can try using `watch` to similar effect:
ReplyDeletewatch "mysql -u [username] -p[password] -h [host] -e 'show full processlist'"
Thanks, Pat. 'watch' gives a much cleaner display. Using 'clear' produces an obvious flicker...
ReplyDelete