<?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: 95th Percentile for this Query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311159#M93278</link>
    <description>&lt;P&gt;There is a function for that.  See here:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/99632/what-does-perc95-and-all-those-stats-functions-perc.html"&gt;https://answers.splunk.com/answers/99632/what-does-perc95-and-all-those-stats-functions-perc.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So I would think this (but it really depends on exactly what he meant):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=W3SVC_Log s_computername="*PRD*" cs_uri_stem="*/LMS/*" time_taken&amp;gt;10000
| stats avg(time_taken) as AvgTimetakenMS perc95(time_taken) count(cs_uri_stem) as Count by cs_uri_stem
| sort -Count
| head 20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 02 Dec 2017 21:13:17 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-12-02T21:13:17Z</dc:date>
    <item>
      <title>95th Percentile for this Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311158#M93277</link>
      <description>&lt;P&gt;Hello: I am extremely new to Splunk and was given a task by my manager. He provided the query below and wanted to know the 95th percentile of the results. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=W3SVC_Log s_computername="*PRD*" cs_uri_stem="*/LMS/*" time_taken&amp;gt;10000 | stats avg(time_taken) as AvgTimetakenMS count(cs_uri_stem) as Count by cs_uri_stem | sort -Count | head 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Would this be the correct query to achieve his objective?:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=W3SVC_Log s_computername="*PRD*" cs_uri_stem="*/LMS/*" time_taken&amp;gt;10000 | stats avg(time_taken) as AvgTimetakenMS count(cs_uri_stem) as Count by cs_uri_stem | stats perc95(time_taken) | sort -Count | head 20
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 20:00:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311158#M93277</guid>
      <dc:creator>vleCSOD</dc:creator>
      <dc:date>2017-12-02T20:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: 95th Percentile for this Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311159#M93278</link>
      <description>&lt;P&gt;There is a function for that.  See here:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/99632/what-does-perc95-and-all-those-stats-functions-perc.html"&gt;https://answers.splunk.com/answers/99632/what-does-perc95-and-all-those-stats-functions-perc.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;So I would think this (but it really depends on exactly what he meant):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=W3SVC_Log s_computername="*PRD*" cs_uri_stem="*/LMS/*" time_taken&amp;gt;10000
| stats avg(time_taken) as AvgTimetakenMS perc95(time_taken) count(cs_uri_stem) as Count by cs_uri_stem
| sort -Count
| head 20
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 02 Dec 2017 21:13:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311159#M93278</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-12-02T21:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: 95th Percentile for this Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311160#M93279</link>
      <description>&lt;P&gt;If you want to calculate the 95th percentile of the time taken for each URL where time_taken&amp;gt;10000 and then display a table with the URL, average time taken, count and 95th percentile you can use the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=W3SVC_Log s_computername="PRD" cs_uri_stem="/LMS/"  time_taken&amp;gt;10000 
| eventstats perc95(time_taken) as Perc95 by cs_uri_stem 
| stats avg(time_taken) as AvgTimetakenMS count(cs_uri_stem) as Count by cs_uri_stem,Perc95 
| sort -Count | head 20 
| eval AvgTimetakenMS = round(AvgTimetakenMS,0) 
| table cs_uri_stem,AvgTimetakenMS,Count,Perc95
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Again, if that's the intended result... you may need to clarify 95th percentile of what.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 21:21:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311160#M93279</guid>
      <dc:creator>adigrio</dc:creator>
      <dc:date>2017-12-02T21:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: 95th Percentile for this Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311161#M93280</link>
      <description>&lt;P&gt;Thank you woodcock! This looks great. He was looking for the 95th percentile of the time taken.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 21:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311161#M93280</guid>
      <dc:creator>vleCSOD</dc:creator>
      <dc:date>2017-12-02T21:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: 95th Percentile for this Query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311162#M93281</link>
      <description>&lt;P&gt;Thank you adigrio! He was looking for the 95th percentile of the time taken. Your query works great and the table is awesome.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Dec 2017 21:27:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/95th-Percentile-for-this-Query/m-p/311162#M93281</guid>
      <dc:creator>vleCSOD</dc:creator>
      <dc:date>2017-12-02T21:27:48Z</dc:date>
    </item>
  </channel>
</rss>

