Bug #1596 mysqladmin status having issues
Submitted: 18 Oct 2003 11:38 Modified: 21 Oct 2003 17:49
Reporter: Donny Simonton Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1.0 Binary OS:Linux (Linux 2.4.22)
Assigned to: CPU Architecture:Any

[18 Oct 2003 11:38] Donny Simonton
Description:
Yesterday for the first time, I noticed that I could no longer see the number of queries per second when doing a mysqladmin status.  Today, I thought I would look into it again.

This is what I found.

[root@dn-parked mysql]# mysqladmin status
Uptime: 250803  Threads: 433  Questions: 149518444  Slow queries: 211490  Opens: 1278  Flush tables: 1  Open tables: 1019  Queries 9
[root@dn-parked mysql]# 

I thought the problem could be solved if I shutdown mysql and then restarted it.  So I did and this is what I got after running mysqladmin status again.

[root@dn-parked init.d]# mysqladmin status
Uptime: 111  Threads: 315  Questions: 45402  Slow queries: 0  Opens: 69  Flush tables: 1  Open tables: 63  Queries per second avg: 7
[root@dn-parked init.d]# 

So the problem is still there.  I decided to pipe the output to a file and see if that would return the same results, but it showed the correct results.

[root@dn-parked root]# mysqladmin status >text.txt
[root@dn-parked root]# more text.txt 
Uptime: 145  Threads: 317  Questions: 58652  Slow queries: 1  Opens: 71  Flush tables: 1  Open tables: 65  Queries per second avg: 4
04.497

Not sure if this is a mysqladmin bug or what.  Just thought I would at least post it.

Donny

How to repeat:
Simple, run mysqladmin status again, and it's repeated.
[18 Oct 2003 11:40] Donny Simonton
Just happened to run mysqladmin status again and this is what I got this time.

[root@dn-parked root]# mysqladmin status          
Uptime: 768  Threads: 405  Questions: 1126366  Slow queries: 4  Opens: 108  Flush tables: 1  Open tables: 102  Queries per second a2
[root@dn-parked root]# 

Queries per second: a2?  That makes no sense at all.
[21 Oct 2003 17:49] Dean Ellis
I am unable to duplicate this with either 4.1.0 (official binary) or with 4.1.1 (compiled from latest BitKeeper sources).  I tried varying levels of load to see if there may be a display problem once queries/sec exceeded a certain threshhold, to no avail.

If you are not using an official binary for 4.1, it could simply be a bad build.  If you are, perhaps the problem is something with your shell or term/curses libraries (that the output is correct when piped to a file makes this seem likely).

Thank you
[21 Oct 2003 19:51] Donny Simonton
Just wanted to add another comment.  Yes, I am using the MySQL 4.1 binary that was downloaded from the site.  For whatever reason the problem has gone away and everything seems to be working fine now.

Below is an example of how it looks now.

[root@dn-parked mysql]# mysqladmin status
Uptime: 268403  Threads: 538  Questions: 215318821  Slow queries: 3493  Opens: 5503  Flush tables: 2  Open tables: 1024  Queries per second avg: 802.222

Thanks for the reply.