Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use mytop for figuring out what queries are being executed and how long they take. I can connect properly to the db but

MySQL on localhost (5.1.41-3ubuntu12.8)                 up 0+01:50:47 [09:30:43]
Queries: 3.0     qps:    0 Slow:     0.0         Se/In/Up/De(%):    68767/00/00/00

Key Efficiency: 99.1%  Bps in/out:   0.0/  1.2

        Id      User         Host/IP         DB      Time    Cmd Query or State
        --      ----         -------         --      ----    --- --------------
       225      root       localhost                    0  Query show full processlist
       186      joom       localhost   culinary      5684  Sleep

The number of queries increases over time but the queries themselves do not appear in the list. Is there some type of configuration that I need to do to enable it?

share|improve this question
up vote 6 down vote accepted

mytop can only show the queries that are executing at the moment that it samples--much like top can only show information about processes at the time it checks. You can adjust the sampling rate with the 's' key or hit the space bar to force an update.

(I wrote mytop.)

share|improve this answer

Possible queries are executed too quickly(default delay 5 second,to change press 's')

Run in MySQL:

mysql> SELECT SLEEP(100);

Then see mytop output.

share|improve this answer
Thanks. It seems I misunderstood the use of mytop. I guess the question should be, is there a tool that can let me monitor queries in realtime? – recluze Feb 10 '11 at 7:32
mytop monitor queries in realtime wiht delay... SHOW PROCESSLIST monitor queries in realtime...General Query Log monitor all queries in file. – alvosu Feb 10 '11 at 7:35

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.