<?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 How to control the number of top results shown from a search in Splunk 6.1.2? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166406#M47383</link>
    <description>&lt;P&gt;I am trying to control how many of the top results are shown.&lt;/P&gt;

&lt;P&gt;I have the following search&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;stats max(c1693801001) as MaxCPU by measObjLdn | sort - MaxCPU&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which gives me the following in the stats view:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;measObjLdn  MaxCPU
Object1 13
Object2 11
Object3 8
Object4 7
Object5 4
Object6 4
Object7 3
Object8 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do i just show the top 3 that would look like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;measObjLdn  MaxCPU
Object1 13
Object2 11
Object3 8
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried top but no joy, it just keeps showing them all &lt;BR /&gt;
&lt;CODE&gt;....| top limit=5 showcount=f showperc=f MaxCPU by measObjLdn | sort - MaxCPU&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2015 03:45:46 GMT</pubDate>
    <dc:creator>HattrickNZ</dc:creator>
    <dc:date>2015-03-09T03:45:46Z</dc:date>
    <item>
      <title>How to control the number of top results shown from a search in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166406#M47383</link>
      <description>&lt;P&gt;I am trying to control how many of the top results are shown.&lt;/P&gt;

&lt;P&gt;I have the following search&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;stats max(c1693801001) as MaxCPU by measObjLdn | sort - MaxCPU&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;which gives me the following in the stats view:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;measObjLdn  MaxCPU
Object1 13
Object2 11
Object3 8
Object4 7
Object5 4
Object6 4
Object7 3
Object8 3
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How do i just show the top 3 that would look like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;measObjLdn  MaxCPU
Object1 13
Object2 11
Object3 8
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have tried top but no joy, it just keeps showing them all &lt;BR /&gt;
&lt;CODE&gt;....| top limit=5 showcount=f showperc=f MaxCPU by measObjLdn | sort - MaxCPU&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 03:45:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166406#M47383</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-09T03:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to control the number of top results shown from a search in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166407#M47384</link>
      <description>&lt;P&gt;Just change to:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;stats max(c1693801001) as MaxCPU by measObjLdn | sort 3 - MaxCPU&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 04:21:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166407#M47384</guid>
      <dc:creator>musskopf</dc:creator>
      <dc:date>2015-03-09T04:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to control the number of top results shown from a search in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166408#M47385</link>
      <description>&lt;P&gt;That is because you have a by clause so it is showing you the top 5 MaxCPU for each measObjLdn. You should be using &lt;CODE&gt;head 3&lt;/CODE&gt;  after sorting to find out the top 3 values regardless of the combination.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 04:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166408#M47385</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-03-09T04:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to control the number of top results shown from a search in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166409#M47386</link>
      <description>&lt;P&gt;++ simpler solution.&lt;/P&gt;

&lt;P&gt;When i read the docs, it says "Specify the number of results to sort. " so  I assumed only the first 3 events would be used but it should says "Specify the number of sorted results to return" instead.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 04:36:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166409#M47386</guid>
      <dc:creator>ramdaspr</dc:creator>
      <dc:date>2015-03-09T04:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to control the number of top results shown from a search in Splunk 6.1.2?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166410#M47387</link>
      <description>&lt;P&gt;tks all, the one below by ramdaspr  works also.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2015 19:37:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-control-the-number-of-top-results-shown-from-a-search-in/m-p/166410#M47387</guid>
      <dc:creator>HattrickNZ</dc:creator>
      <dc:date>2015-03-10T19:37:18Z</dc:date>
    </item>
  </channel>
</rss>

