NYCPHP Meetup

NYPHP.org

[nycphp-talk] how to find the mysql server status

David Krings ramons at gmx.net
Sun Jul 15 21:25:25 EDT 2007


shaiju davis wrote:
> hi All,
> 
>  How can I get the mysql server status, no. of queries executed in a 
> single page and the time to execute total queries in the index.php page.
> I would like to get the output like this.
>  [ Execution time: 0.92 secs ]   [ Memory usage: Unknown ]   [ 50 
> database queries used ]   [ GZIP Disabled ]   [ Server load: 0.05 ]
>  
>  If anyone has the idea please reply to this mail.
>  
>  
>  Thanks in advance
>  Shaiju

Execution time - use microtime and calculate the difference between 
start and end time.

Mem use - no clue? Maybe some MySQL command line thingie to query the stats?

Query count - counter, each time a query is run/was successful a counter 
is increased by one. You can also have different counters for total and 
failed queries (difference is the number of queries that worked).

Server load, GZIP - no clue.


HTH

David



More information about the talk mailing list