You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Kopel, Yakov" <yk...@websense.com> on 2012/12/19 12:33:57 UTC

clear stats doesn't work

The problem:
  Clear stats using traffic_line -c/-C doesn't realy work. After several seconds the old value comes back.

The reason:
  For example - http_total_client_connections_ipv4_stat
  1. This stat is used in proxy/http/HttpClientSession.cc
  2. The macro HTTP_INCREMENT_DYN_STAT using the RecIncrRawStat func to increament the stat value.
  3. The RecIncrRawStat increament the sum counter on the specific net thread.
  4. RecRawStatSyncCount is called in a loop and summarize all the stats in the net thread to one global value.
  5. RecRegisterRawStatSyncCb is called to update the global value in the  records table.

When traffic_line -c/-C is called - it clear the records table but not the records table.
In the next time the RecRawStatSyncCount func will be called it will override the "zero" value in the records table.

Solution ???


Regards,
Yakov Kopel.



 Protected by Websense Hosted Email Security -- www.websense.com