<?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: How to find top 10 hosts after a sort? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37610#M8425</link>
    <description>&lt;P&gt;try this&lt;BR /&gt;
index=_internal source=*license_usage.log type="Usage" | stats sum(b) AS volume by h  | eval  GB=round(volume/1024/1024/1024,5)  | table h GB  | sort 10 - GB | rename h AS Host&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 08:29:46 GMT</pubDate>
    <dc:creator>rameshyedurla</dc:creator>
    <dc:date>2020-09-29T08:29:46Z</dc:date>
    <item>
      <title>How to find top 10 hosts after a sort?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37607#M8422</link>
      <description>&lt;P&gt;The following search will give the count of events by host and sort the hosts by count, highest to lowest. &lt;/P&gt;

&lt;P&gt;index=summary source="SI Count By Host Every 10m" | stats count by orig_host | sort count&lt;/P&gt;

&lt;P&gt;Now I just want to show the top 10 hosts based on their high count. Using the head command will show the first 10 hosts that are found and not the top 10 based on the count that i am trying to display. This seems easy enough but i cannot figure it out...&lt;/P&gt;

&lt;P&gt;Feeling very noob right now, help is always appreciated.&lt;/P&gt;

&lt;P&gt;Thanks,
Iman&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2011 02:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37607#M8422</guid>
      <dc:creator>I-Man</dc:creator>
      <dc:date>2011-02-03T02:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to find top 10 hosts after a sort?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37608#M8423</link>
      <description>&lt;P&gt;I think that's what you're looking for can be achieved by.  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary source="SI Count By Host Every 10m" | top limit=10 orig_host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, if you would like to use your search you could also achieve the same by:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=summary source="SI Count By Host Every 10m" | stats count by orig_host | sort limit=10 -count 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;.gz&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2011 02:41:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37608#M8423</guid>
      <dc:creator>Genti</dc:creator>
      <dc:date>2011-02-03T02:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to find top 10 hosts after a sort?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37609#M8424</link>
      <description>&lt;P&gt;index=summary source="SI Count By Host Every 10m" | stats count by orig_host | sort -count | head 10&lt;/P&gt;

&lt;P&gt;The above search finally worked for me. There was some kind of bug going on that when I clicked on the top of a column to sort via ascending/descending order, the   sort -count  OR  sort +count  would make no difference as the column properties take seemed to take precedence. Not sure why but this only happened when the head function was not present. Weird. Thank you anyways for the quick response Genti.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2011 02:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37609#M8424</guid>
      <dc:creator>I-Man</dc:creator>
      <dc:date>2011-02-03T02:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to find top 10 hosts after a sort?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37610#M8425</link>
      <description>&lt;P&gt;try this&lt;BR /&gt;
index=_internal source=*license_usage.log type="Usage" | stats sum(b) AS volume by h  | eval  GB=round(volume/1024/1024/1024,5)  | table h GB  | sort 10 - GB | rename h AS Host&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:29:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37610#M8425</guid>
      <dc:creator>rameshyedurla</dc:creator>
      <dc:date>2020-09-29T08:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to find top 10 hosts after a sort?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37611#M8426</link>
      <description>&lt;P&gt;index=summary source="SI Count By Host Every 10m" | stats count by orig_host | sort 10 - count&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2017 03:33:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-top-10-hosts-after-a-sort/m-p/37611#M8426</guid>
      <dc:creator>renjujacob88</dc:creator>
      <dc:date>2017-05-16T03:33:26Z</dc:date>
    </item>
  </channel>
</rss>

