Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to use the linux watch command and have seen that there may be a "culmulative" (--differences=) parameter but this doesnt appear to be working.

Basically I would like to do the following and not have watch refresh the screen as i need to keep track of whats happening:

watch  mysqladmin -uroot -pxxx processlist

If watch wont work here is there an alternative?

share|improve this question

migrated from stackoverflow.com Jan 8 '13 at 19:40

This question came from our site for professional and enthusiast programmers.

    
I found an --differences switch which means "cumulative". Edited post. And maybe I'm wrong, but shouldn't you add --differences in your command if you want to use it? I refer to procps 3.2.8 (Debian Squeeze). –  try-catch-finally Jan 5 '13 at 22:56

3 Answers 3

watch  mysqladmin -uroot -pxxx processlist

Works for me. Keep in mind that "-p" is a command line option for "watch". Try:

watch -n 1 mysqladmin --user=<user> --password=<password> processlist

Or simply use http://jeremy.zawodny.com/mysql/mytop/ ;)

share|improve this answer

Why not redirect output to a file using

>>

And then do tailf on that file ?

share|improve this answer

Something like:

while true; do mysqladmin -uroot -pxxx processlist; sleep 1; done

maybe?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.