From users-return-7631-archive-asf-public=cust-asf.ponee.io@trafficserver.apache.org Thu Mar 21 01:34:24 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id EC7C518062C for ; Thu, 21 Mar 2019 02:34:23 +0100 (CET) Received: (qmail 14928 invoked by uid 500); 21 Mar 2019 01:34:22 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 14918 invoked by uid 99); 21 Mar 2019 01:34:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Mar 2019 01:34:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 56D02180779 for ; Thu, 21 Mar 2019 01:34:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.798 X-Spam-Level: * X-Spam-Status: No, score=1.798 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id gO0WwcMzvD47 for ; Thu, 21 Mar 2019 01:34:20 +0000 (UTC) Received: from mail-qt1-f178.google.com (mail-qt1-f178.google.com [209.85.160.178]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D371F5F125 for ; Thu, 21 Mar 2019 01:34:19 +0000 (UTC) Received: by mail-qt1-f178.google.com with SMTP id v20so4924826qtv.12 for ; Wed, 20 Mar 2019 18:34:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=+p9BOjLqzxfCFTM1pogQyIB+HaiKxg5aemkqh+sVB3s=; b=BV3TEgj2XjZwDnA0lY0dYAmIXR/bMvaUAvUOh6WD1jKKisZ9sTNupKkptAj4fk4cLu PXaPLp8RN2eW9kl3sy+T1DY1ktD5ww10CkV51jQKaymLiXUFFBoP7+u/oASCUa8NgFpT de7tnwOSUyEEVf1SeRuGgdF+N+FPdPC+1HjY9xx4x3EkX/l2XZOia8JJWHhMq7GL+xjI nUHStzwb/R/Tv2spJCOiLLkGlkFk2IV2kn5zk8aaTlN0H2YDKCK7IBvlADKGLDA3f2Z4 hEmCQg5un8qC5c6Xe9XcAy0CTNhQqBrq7wxdxOv2PHiUb/UDSTwnXbtDq8c8hZTA+wNY h80Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=+p9BOjLqzxfCFTM1pogQyIB+HaiKxg5aemkqh+sVB3s=; b=CDiTUnIJaLBXJtqm/ySBfRlSuJEbhtOtCyfX7mHq5PoYNna9AnEjmRZfGMkmIE35NP 6Jzmqy9B9RqyLnWSzzzGK7Q5Wxz8WnuwvewaXO20ft00GxYIyFaIjk8gD18jt+fqopId uZGo65WVReowJYqS1wafn/nLDN8PxpvdQ7l3aCvDC4P0reRtLrk2BHvoddbHGXP6j7k+ pu0tcjn7+La+bFK3rYwb42bTn+G1LJz2JkyhwZhWsutPGaL6J4HECZhq/PQV0V5uxnwA ngX92VHJ+0f3X9y+ztwylE2pnrNtj03jf/9Puy6ju2MoRuLQNsNr3GESqm5/ihAbl4bD TmmA== X-Gm-Message-State: APjAAAXnTFaViMQJLWdcqol0zRxJ2LwcZYWGyOcKwGJbeRAWEajM7S2K KA0lnQumtr55N/xbt5MB5Mdxm6uwn54= X-Google-Smtp-Source: APXvYqwqNth7+KrCmI8akqvL8bdC/YzAvPQBAZbLH14PJr069IMEJJcZt83KhrNopElTGciOSuu4kA== X-Received: by 2002:aed:3946:: with SMTP id l64mr818278qte.45.1553132052519; Wed, 20 Mar 2019 18:34:12 -0700 (PDT) Received: from ghc8flrcolor.prt.cs.cmu.edu (ghc8flrcolor.prt.cs.cmu.edu. [128.2.208.201]) by smtp.gmail.com with ESMTPSA id t12sm2537927qkl.58.2019.03.20.18.34.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Mar 2019 18:34:11 -0700 (PDT) From: Jason Yang Content-Type: multipart/alternative; boundary="Apple-Mail=_98BED1F9-F9D5-4004-A6E5-19CD05A2D8B7" Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: How do I see miss ratio? Date: Wed, 20 Mar 2019 21:34:10 -0400 References: <080b276f-7c17-4a89-aac5-575d7bb40570@Spark> <31CDC357-2284-40FB-8F14-1FA9B3EE0BCA@apache.org> <537D24C2-D8BE-4450-8F37-F20DD8BE1A81@gmail.com> <393AB6C2-48DC-42B6-BBB9-12501112B1C0@apache.org> <7A1C5C17-920F-4EBC-A36F-EC8A18FB0D15@gmail.com> <787D1B62-649F-4BEB-BB37-428CF1DA1237@apache.org> To: users@trafficserver.apache.org In-Reply-To: <787D1B62-649F-4BEB-BB37-428CF1DA1237@apache.org> Message-Id: <9E65A4AF-0FA7-46D8-A4EB-4B1B15DC2D04@gmail.com> X-Mailer: Apple Mail (2.3445.100.39) --Apple-Mail=_98BED1F9-F9D5-4004-A6E5-19CD05A2D8B7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Great, it works! Thank you! You are amazing :)=20 Jason=20 > On Mar 20, 2019, at 17:29, Bryan Call wrote: >=20 > It takes a few seconds for the stats to sync when using zero. I tried = clear and it didn=E2=80=99t work for me and I filed an issue on it = yesterday. >=20 > Again, you have to wait a few seconds for traffic_server to startup = and sync the stats before running traffic_top. >=20 > Stats are synced every 5 seconds by default. >=20 > -Bryan >=20 >=20 >=20 >> On Mar 19, 2019, at 3:11 PM, Jason Yang > wrote: >>=20 >> Hi Bryan,=20 >> Thank you for your quick reply! I have tried both approaches you = have propose.=20 >> 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.=20 >>=20 >> As for removing records.snap,=20 >> it gives me "Error getting stat: proxy.process.http.100_responses = when calling TSRecordGetInt() failed: file "traffic_top/stats.h", line = 281=E2=80=9D=20 >> sometimes the error disappears if I rerun traffic_top, but sometimes = it will always give this error.=20 >> Any thoughts why?=20 >>=20 >>=20 >>=20 >> Best,=20 >> Jason=20 >>=20 >>=20 >>> On Mar 19, 2019, at 12:42, Bryan Call > wrote: >>>=20 >>> 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 >>>=20 >>> 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 >>>=20 >>> -Bryan >>>=20 >>>=20 >>>=20 >>>> On Mar 18, 2019, at 10:34 PM, Jason Yang = > wrote: >>>>=20 >>>> Hi Bryan,=20 >>>> 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!=20 >>>>=20 >>>>=20 >>>> Best,=20 >>>> Jason=20 >>>>=20 >>>>=20 >>>>> On Mar 11, 2019, at 12:07, Bryan Call > wrote: >>>>>=20 >>>>> 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. >>>>>=20 >>>>> 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. >>>>>=20 >>>>> -Bryan >>>>>=20 >>>>>=20 >>>>>=20 >>>>>> On Mar 7, 2019, at 4:04 PM, Jason Yang = > wrote: >>>>>>=20 >>>>>> Hi community,=20 >>>>>> I see there is such tool traffic_top, but I am confusing = which of the number shows miss ratio?=20 >>>>>> By miss ratio I mean the number that = miss_ratio*request_traffic=3Dtraffic_to_origin.=20 >>>>>>=20 >>>>>>=20 >>>>>> Best,=20 >>>>>> Jason=20 >>>>>>=20 >>>>>>=20 >>>>>=20 >>>>=20 >>>=20 >>=20 >=20 --Apple-Mail=_98BED1F9-F9D5-4004-A6E5-19CD05A2D8B7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Great, it works! Thank you! You are amazing :) 


Jason 


On Mar = 20, 2019, at 17:29, Bryan Call <bcall@apache.org> wrote:

It takes a few seconds = for the stats to sync when using zero.  I tried clear and it = didn=E2=80=99t 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.

-Bryan



On Mar 19, 2019, at 3:11 PM, Jason Yang <peter.waynechina@gmail.com> 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=E2=80=9D 
sometimes the error disappears = if I rerun traffic_top, but sometimes it will always give this = error. 
Any thoughts why? 



Best, 
Jason 


On Mar 19, 2019, at 12:42, Bryan Call <bcall@apache.org> = 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

-Bryan



On Mar 18, 2019, at 10:34 PM, Jason Yang <peter.waynechina@gmail.com> 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! 


Best, 
Jason 


On Mar = 11, 2019, at 12:07, Bryan Call <bcall@apache.org> 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.

-Bryan



On Mar 7, 2019, at 4:04 PM, Jason Yang <peter.waynechina@gmail.com> 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=3Dtraffic_to_origin. 


Best, 
Jason 








= --Apple-Mail=_98BED1F9-F9D5-4004-A6E5-19CD05A2D8B7--