Portal Home > Knowledgebase > Articles Database > Command line to show mysql processes?


Command line to show mysql processes?




Posted by mrzippy, 10-30-2012, 11:43 AM
Hello, What is the command to show active mysql processes on the server? I would like to see a command-line version of the cpanel "Show MySQL Processes" screen. Thanks!

Posted by zoid, 10-30-2012, 11:46 AM
http://lmgtfy.com/?q=Command+line+to...ysql+processes second link

Posted by mrzippy, 10-30-2012, 11:49 AM
Sigh. Where's that "bashing myself over the head" emoticon? Thanks!

Posted by zoid, 10-30-2012, 11:51 AM
no worries

Posted by josephgarbett, 11-03-2012, 06:56 AM
log onto MySQL, type "show processlist" or look at installing mytop, its a clone service to MySQL that gives real-time info about your MySQL databases & threads. - Queries Per Second. - Slow query count - Current running queries.

Posted by zoid, 11-03-2012, 07:00 AM
.

Posted by viGeek, 11-07-2012, 03:41 PM
If you prefer this being a bit more readable, you can pipe directly to mySQL. i.e echo "show processlist\G" | mysql | more Alternatively you can tee results to a log file inside the mySQL CLI by running: tee -a file.log

Posted by josephgarbett, 11-08-2012, 03:52 AM
This isn't complicated, Google it..

Posted by lynxus, 11-08-2012, 04:25 AM
If your on linux, I use a program called MTOP It looks like normal top but for mysql. Quite simple and yet works well. Edit: Oops just noticed jhost mentioned mtop..

Posted by bdowne01, 11-13-2012, 07:23 PM
I'm going to blow your mind even further... if you're in the mysql client (mysql>) and you do a "show processlist", you can even kill those individual queries from the client as well. A'la:

Posted by LittleApps-Nick, 11-14-2012, 12:48 AM
If your in SSH:

Posted by techdept, 11-14-2012, 12:51 AM
Login to your SSH and just fire the command as #mysqladmin pr and it will show you the current mysql processes

Posted by zoid, 11-14-2012, 03:00 AM
I know it is not complicated. I rather wondered why you answered a question which was already answered four days ago.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
RKhunter (Views: 606)
JVM problem ? (Views: 589)
yum update problem (Views: 619)