<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: can i know the best95 and worst5 stats in splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46588#M11125</link>
    <description>&lt;P&gt;I am not getting the desired result when i use perc..can you pls give me the query to calulcate the top 95 durations average and last 5 durations .&lt;/P&gt;</description>
    <pubDate>Wed, 29 Aug 2012 12:02:30 GMT</pubDate>
    <dc:creator>rakesh_498115</dc:creator>
    <dc:date>2012-08-29T12:02:30Z</dc:date>
    <item>
      <title>can i know the best95 and worst5 stats in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46586#M11123</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have written a query which gives me the list of durations of all the transactions.Now i need to calucalte the avg of top95 durations and avg of the last 5 durations . how do i do that in single query.&lt;/P&gt;

&lt;P&gt;my query to list durations is.&lt;/P&gt;

&lt;P&gt;sourcetype="data" "request OR response" | keepevicted=true transaction prod_id | top limit=100 duration &lt;/P&gt;

&lt;P&gt;displays only the top 100 durations values . but i need the stats for avg of top 95 duration values and avg of last 5 duration values..&lt;/P&gt;

&lt;P&gt;Please help..&lt;/P&gt;

&lt;P&gt;thanx&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 11:04:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46586#M11123</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2012-08-29T11:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: can i know the best95 and worst5 stats in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46587#M11124</link>
      <description>&lt;P&gt;hi rakesh_498115&lt;/P&gt;

&lt;P&gt;you can use the p&lt;X&gt;() function of chart, stats and timechart for example&lt;/X&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;p&amp;lt;X&amp;gt;(Y) | perc&amp;lt;X&amp;gt;(Y)    
This function returns the X-th percentile value of the field Y.
This example returns the 5th percentile value of a field "total":perc5(total)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.3/SearchReference/CommonStatsFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.3/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;cheers,&lt;BR /&gt;
MuS&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 11:50:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46587#M11124</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2012-08-29T11:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: can i know the best95 and worst5 stats in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46588#M11125</link>
      <description>&lt;P&gt;I am not getting the desired result when i use perc..can you pls give me the query to calulcate the top 95 durations average and last 5 durations .&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 12:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46588#M11125</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2012-08-29T12:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: can i know the best95 and worst5 stats in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46589#M11126</link>
      <description>&lt;P&gt;| eventstats p95(duration) AS dur_limit | where duration &amp;lt; dur_limit | stats avg(duration)&lt;/P&gt;

&lt;P&gt;should do just fine&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:21:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46589#M11126</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2020-09-28T12:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: can i know the best95 and worst5 stats in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46590#M11127</link>
      <description>&lt;P&gt;How do i get both the stats in single query ...  ??&lt;/P&gt;</description>
      <pubDate>Wed, 29 Aug 2012 19:38:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46590#M11127</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2012-08-29T19:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: can i know the best95 and worst5 stats in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46591#M11128</link>
      <description>&lt;P&gt;It's also worth noticing that pX() is using APPROXIMATION not exact value when you have &amp;gt;1000 data points, see &lt;A href="http://splunk-base.splunk.com/answers/44336/percentile-implementation"&gt;http://splunk-base.splunk.com/answers/44336/percentile-implementation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2012 04:49:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46591#M11128</guid>
      <dc:creator>kallu</dc:creator>
      <dc:date>2012-08-30T04:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: can i know the best95 and worst5 stats in splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46592#M11129</link>
      <description>&lt;P&gt;you can combine any searches with append &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Append" target="_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Append&lt;/A&gt; and here is the string you need:&lt;/P&gt;

&lt;P&gt;your search&lt;BR /&gt;
| eventstats p5(duration) AS low_limit &lt;BR /&gt;
| where duration &amp;gt; low_limit &lt;BR /&gt;
| stats avg(duration) AS dur_low_avg &lt;BR /&gt;
| append [&lt;BR /&gt;
| eventstats p95(duration) AS max_limit &lt;BR /&gt;
| where duration &amp;lt; max_limit &lt;BR /&gt;
| stats avg(duration) AS dur_max_avg]&lt;/P&gt;

&lt;P&gt;this will run for awhile depending on your amount of data, because it runs each search on it own and not at the same time. so thanks for your upvote and kudos &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;cheers,&lt;BR /&gt;
MuS&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:21:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/can-i-know-the-best95-and-worst5-stats-in-splunk/m-p/46592#M11129</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2020-09-28T12:21:20Z</dc:date>
    </item>
  </channel>
</rss>

