<?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: Top results for multiseries data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Top-results-for-multiseries-data/m-p/155790#M43841</link>
    <description>&lt;P&gt;Thanks for your suggestion. It gave me a number of things to try out and poke at, none of which worked unfortunately.&lt;/P&gt;

&lt;P&gt;As far as I can tell, after I call "stats dc(Process_Name) by hostname,Company", everything has already been sorted by hostname and other attempts to reorder the data yield strange results. For instance, this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;CODE&gt;base search | stats dc(Process_Name) by hostname,Company | sort -hostname | xyseries hostname,Company,dc(Process_Name)&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;gives sorts the hosts starting at 328 and goes up from there instead of starting at 1. &lt;/P&gt;

&lt;P&gt;Streamstats seemed to have no effect at all. Other ideas?&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2014 20:02:07 GMT</pubDate>
    <dc:creator>tcollyer</dc:creator>
    <dc:date>2014-02-19T20:02:07Z</dc:date>
    <item>
      <title>Top results for multiseries data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-results-for-multiseries-data/m-p/155788#M43839</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;

&lt;P&gt;I'm charting multiseries data displayed in stacked columns with the following command:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;stats dc(Process_Name) by&lt;BR /&gt;
hostname,Company | xyseries&lt;BR /&gt;
hostname,Company,dc(Process_Name)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;This works fine, except for the fact that I now have over 5000 hosts (i.e. values for 'hostname') and I need a way to quickly display only the ones with the most number of processes (i.e. discrete values of 'Process_Name').  If I could make it work, something like 'top' or 'head' would be great: &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;stats dc(Process_Name) as processes by&lt;BR /&gt;
hostname,Company|sort&lt;BR /&gt;
hostname,-processes|head 50|xyseries&lt;BR /&gt;
hostname,Company,processes&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The sort command seems to provide unpredictable results though when it is preceded by a multi-value command (e.g. the B,C in 'stats(A) by B,C'). Can anyone offer me a way to view just the top 50 (or whatever) hosts when sorted by the number of processes? &lt;/P&gt;

&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:55:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-results-for-multiseries-data/m-p/155788#M43839</guid>
      <dc:creator>tcollyer</dc:creator>
      <dc:date>2020-09-28T15:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Top results for multiseries data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-results-for-multiseries-data/m-p/155789#M43840</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search | stats dc(Process_Name) by hostname,Company | sort hostname,-dc(Process_Name) | streamstats count by hostname | where count &amp;lt; 51 |xyseries hostname,Company,processes
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Feb 2014 22:26:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-results-for-multiseries-data/m-p/155789#M43840</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-18T22:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Top results for multiseries data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Top-results-for-multiseries-data/m-p/155790#M43841</link>
      <description>&lt;P&gt;Thanks for your suggestion. It gave me a number of things to try out and poke at, none of which worked unfortunately.&lt;/P&gt;

&lt;P&gt;As far as I can tell, after I call "stats dc(Process_Name) by hostname,Company", everything has already been sorted by hostname and other attempts to reorder the data yield strange results. For instance, this:&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;CODE&gt;base search | stats dc(Process_Name) by hostname,Company | sort -hostname | xyseries hostname,Company,dc(Process_Name)&lt;/CODE&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;gives sorts the hosts starting at 328 and goes up from there instead of starting at 1. &lt;/P&gt;

&lt;P&gt;Streamstats seemed to have no effect at all. Other ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2014 20:02:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Top-results-for-multiseries-data/m-p/155790#M43841</guid>
      <dc:creator>tcollyer</dc:creator>
      <dc:date>2014-02-19T20:02:07Z</dc:date>
    </item>
  </channel>
</rss>

