You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "taoyunxing (JIRA)" <ji...@apache.org> on 2016/03/08 09:32:40 UTC
[jira] [Commented] (TS-4262) Some imprecise statistics of
stats_over_http plugin
[ https://issues.apache.org/jira/browse/TS-4262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15184656#comment-15184656 ]
taoyunxing commented on TS-4262:
--------------------------------
I code review the DNS.cc and found the "proxy.process.dns.lookup_successes" stats is not precise, I move the line:
{code}
DNS_INCREMENT_DYN_STAT(dns_total_lookups_stat);
{code}
under the line:
{code}
DNS_INCREMENT_DYN_STAT(dns_in_flight_stat);
{code}
in the file trafficserver-5.3.2/iocore/dns/DNS.cc, then compile ats 5.3.2 again, enable the stats_over_http plugin, I got the desired result:
{code}
"proxy.process.hostdb.total_entries": "135000",
"proxy.process.hostdb.total_lookups": "21",
"proxy.process.hostdb.total_hits": "10",
"proxy.process.hostdb.ttl": "0.000000",
"proxy.process.hostdb.ttl_expires": "2",
"proxy.process.hostdb.re_dns_on_reload": "0",
"proxy.process.hostdb.bytes": "25935872",
"proxy.process.dns.total_dns_lookups": "11",
"proxy.process.dns.lookup_avg_time": "0",
"proxy.process.dns.lookup_successes": "11",
"proxy.process.dns.fail_avg_time": "0",
"proxy.process.dns.lookup_failures": "0",
"proxy.process.dns.retries": "0",
"proxy.process.dns.max_retries_exceeded": "0",
{code}
so, the conclusion:
move a line code can fix this bug !
> Some imprecise statistics of stats_over_http plugin
> ---------------------------------------------------
>
> Key: TS-4262
> URL: https://issues.apache.org/jira/browse/TS-4262
> Project: Traffic Server
> Issue Type: Bug
> Components: Plugins
> Affects Versions: 5.3.2
> Reporter: taoyunxing
> Fix For: 6.1.2
>
>
> I found the statistics of HostDB and DNS are not precise, see the following:
> {code}
> proxy.process.hostdb.total_lookups 286951594
> proxy.process.hostdb.total_hits 277568738
> proxy.process.dns.total_dns_lookups 23238887
> proxy.process.dns.lookup_successes 8952696
> proxy.process.dns.lookup_failures 332447
> {code}
> calculation:
> {code}
> 286951594 - 277568738 = 9382856
> 8952696 + 332447 = 9285143
> 9382856 - 9285143 = 97713
> {code}
> I have two question:
> 1.why ?
> proxy.process.hostdb.total_lookups - proxy.process.hostdb.total_hits != proxy.process.dns.lookup_successes + proxy.process.dns.lookup_failures
> 2.why?
> proxy.process.dns.lookup_successes + proxy.process.dns.lookup_failures != proxy.process.dns.total_dns_lookups
> anyone can show me the reason? thanks in advance!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)