Marc
Marc

Reputation: 9537

MySql - How to monitore "activty" when mysql seems to be "overloaded"

I have a page with a button. When clicked, a php script is executed hundred times simultaneously with different post variables. That script run loops through which data are inserted into my mysql db. Thousand of records for each one the hundred php script. The problem that I am facing is that I did this for the first time a couple minutes ago. So I wanted to check if my table in my db is populated properly, but it is impossible to open a table... My sql seems to be frozen. When I try to open a page that is on my server in the browser, it is also not possible. I have no error messages though. By the way I know activity is going on. My computer makes a hell of a sound... So what I would like to know, is if there are commands I can execute somewhere to know the processes going on mysql? Thank you in advance for your replies. Cheers. Marc

Upvotes: 0

Views: 41

Answers (1)

Subodh
Subodh

Reputation: 2214

There are several queries you could execute :

SHOW PROCESSLIST;
SHOW GLOBAL STATUS LIKE 'Threads_connected';
SHOW GLOBAL STATUS LIKE 'Threads_running';

And you could also download and use MySQL Administrator GUI based tool to monitor your connections. It can be found here : http://dev.mysql.com/downloads/gui-tools/5.0.html

Upvotes: 1

Related Questions