List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:February 28 2000 11:04pm
Subject:Re: flush-status not flushing?
View as plain text  
>>>>> "sasha" == sasha  <sasha@stripped> writes:

sasha> Michael Widenius wrote:
>> 
>> >>>>> "sasha" == sasha  <sasha@stripped> writes:
>> 
sasha> Sami Ahlroos wrote:
>> >>
>> >> Hi,
>> >> I tought "mysqladmin flush-status" would reset the numbers shown by
>> >> "mysqladmin status", but maybe I was wrong?
>> >>
>> >> sami@www:~ > mysqladmin status
>> >> Uptime: 11281  Threads: 29  Questions: 158990  Slow queries: 0  Opens:
>> >> 0  Flush tables: 1  Open tables: 67
>> >> sami@www:~ > mysqladmin flush-status
>> >> sami@www:~ > mysqladmin status
>> >> Uptime: 11285  Threads: 29  Questions: 159032  Slow queries: 0  Opens:
>> >> 0  Flush tables: 1  Open tables: 67
>> >>
>> >> This happens with 3.22.32 (binary) and 3.23.10 (compiled by me), under
>> >> Linux.
>> 
sasha> The reason this happens is that flush-status does not flush everything. This is
sasha> actually documented in the manual, although probably not as well as it should
sasha> be.
>> 
sasha> Monty:
>> 
sasha> Is there a reason why flush-status should not reset the stats completely?
>> 
>> Yes;  The problem is that some of the variables are 'live' variables
>> and not statistics variables.  For example, it's not that good to
>> change 'threads' as this is the number of actually running threads or
>> 'open tables' as this is the number of tables that are open.  Opened
>> tables on the other hand is safe to reset...
>> 
>> Regards,
>> Monty

sasha> I think the number of questions should also be safe to reset.

This isn't that easy to do;  Currently we display a counter that is
used to ensure in which order things happens internally.  Resetting
this would be a bad idea.

Actually Jani plans to do, instead of us having a flush-status, let
mysqladmin -ix extended-status work like 'vmstat';  In other words it will
the first time show everything but after this only show the
differences from last time (everything done internally within
mysqladmin).  This will make the 'flush status' command not that
useful any more..

Regards,
Monty
Thread
flush-status not flushing?Sami Ahlroos28 Feb
  • Re: flush-status not flushing?sasha28 Feb
    • Re: flush-status not flushing?Michael Widenius29 Feb
  • Re: flush-status not flushing?sasha29 Feb
    • Re: flush-status not flushing?Michael Widenius29 Feb