Bug #2841 flushing and suppressing zeros: mysqladmin --relative --sleep N extended-status
Submitted: 17 Feb 2004 8:52 Modified: 27 Dec 2006 9:04
Reporter: Tim Bunce Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version: OS:
Assigned to: CPU Architecture:Any
Triage: D5 (Feature request)

[17 Feb 2004 8:52] Tim Bunce
There is no way to suppress zero values with "mysqladmin --relative"

There is no way to force the output of "mysqladmin --relative" to
be flushed (unbuffered) at the end of each chunk of output.

When using mysqladmin --relative --sleep N extended-status
the output per 'sample' is very long and getting longer as new
status counters are added. Many of the status counters are often zero.

To suppress the zeros, or to grep for a particular value, you have to use grep but using grep has problems because the output is buffered.

How to repeat:
mysqladmin --relative --sleep 5 extended-status

Suggested fix:
1. flush() stdout at the end of each extended-status output.

2. Add option to suppress (not output) status values that are zero
   (could apply to both --relative and the normal extended-status output)
[27 Dec 2006 9:04] Sveta Smirnova
Thank you for the report.

You first request has implemented already.
Second has verified.