It takes a few seconds for the stats to sync when using zero.  I tried clear and it didn’t work for me and I filed an issue on it yesterday.

Again, you have to wait a few seconds for traffic_server to startup and sync the stats before running traffic_top.

Stats are synced every 5 seconds by default.


On Mar 19, 2019, at 3:11 PM, Jason Yang <> wrote:

Hi Bryan, 
    Thank you for your quick reply! I have tried both approaches you have propose. 
using traffic_ctl to zero the stat, but it does not have any effect, I tried to zero several statistics, then I get the value, it is still there. I have also tried traffic_ctl metric clear, it does not working either. 

As for removing records.snap, 
it gives me "Error getting stat: proxy.process.http.100_responses when calling TSRecordGetInt() failed: file "traffic_top/stats.h", line 281” 
sometimes the error disappears if I rerun traffic_top, but sometimes it will always give this error. 
Any thoughts why? 


On Mar 19, 2019, at 12:42, Bryan Call <> wrote:

You can zero a metric while running ATS by running this command:
sudo /usr/local/bin/traffic_ctl metric zero proxy.process.http.completed_requests

Or you can shutdown ATS and remove the metrics file:
09:37:25 homer:~$ /usr/local/bin/traffic_ctl metric get proxy.process.http.completed_requests
proxy.process.http.completed_requests 1000000
09:39:25 homer:~$ sudo /usr/local/bin/trafficserver stop
Stopping traffic_manager:                                  [  OK  ]
Stopping traffic_server:                                   [  OK  ]
09:39:36 homer:~$ sudo rm /usr/local/var/trafficserver/records.snap
09:40:08 homer:~$ sudo /usr/local/bin/trafficserver start
Starting Apache Traffic Server:                            [  OK  ]
09:40:23 homer:~$ /usr/local/bin/traffic_ctl metric get proxy.process.http.completed_requests
proxy.process.http.completed_requests 0


On Mar 18, 2019, at 10:34 PM, Jason Yang <> wrote:

Hi Bryan, 
    How can I reset the statistics? I have tried traffic_server -Cclear and delete everything under var/log and var/trafficserver, but it seems the statistics is not reset. Thank you! 


On Mar 11, 2019, at 12:07, Bryan Call <> wrote:

It depends on what you mean as a miss.  If you mean that it has to go to the origin no matter what (even revalidating the cache entry) then it should be 100 - fresh.

Also, if you hit "a" you can get the stats from since the server started and you can get the number of incoming requests and requests going go the origin.


On Mar 7, 2019, at 4:04 PM, Jason Yang <> wrote:

Hi community, 
     I see there is such tool traffic_top, but I am confusing which of the number shows miss ratio? 
By miss ratio I mean the number that miss_ratio*request_traffic=traffic_to_origin.