<?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 top command with values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46979#M11208</link>
    <description>&lt;P&gt;I want top 10 values for a field based on the timer control.&lt;/P&gt;

&lt;P&gt;mysearch | top 10 E_Time&lt;/P&gt;

&lt;P&gt;above command return top 10 results based on the events count. is there anyway to return top 10 values and display a graph based on these values? &lt;/P&gt;

&lt;P&gt;alternatively I can run this search and display the graph&lt;/P&gt;

&lt;P&gt;mysearch | table _time E_TIME | sort -E_TIME | head 10 | where len(E_TIME) &amp;gt; 0 &lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 12:52:33 GMT</pubDate>
    <dc:creator>jangid</dc:creator>
    <dc:date>2020-09-28T12:52:33Z</dc:date>
    <item>
      <title>top command with values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46979#M11208</link>
      <description>&lt;P&gt;I want top 10 values for a field based on the timer control.&lt;/P&gt;

&lt;P&gt;mysearch | top 10 E_Time&lt;/P&gt;

&lt;P&gt;above command return top 10 results based on the events count. is there anyway to return top 10 values and display a graph based on these values? &lt;/P&gt;

&lt;P&gt;alternatively I can run this search and display the graph&lt;/P&gt;

&lt;P&gt;mysearch | table _time E_TIME | sort -E_TIME | head 10 | where len(E_TIME) &amp;gt; 0 &lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:52:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46979#M11208</guid>
      <dc:creator>jangid</dc:creator>
      <dc:date>2020-09-28T12:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: top command with values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46980#M11209</link>
      <description>&lt;P&gt;Use &lt;CODE&gt;head&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | head 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;EDIT: &lt;CODE&gt;head&lt;/CODE&gt; will not necessarily return the latest results. The &lt;CODE&gt;head&lt;/CODE&gt; command will retrieve the first X items from what it's given in the search pipeline. If it's run directly after the initial &lt;CODE&gt;search&lt;/CODE&gt; command, then you are right, what comes in the search pipeline will be the latest events. If you run it after &lt;CODE&gt;table&lt;/CODE&gt; though, for instance, it will get the table items and give you the first X of those. So, if you have a table with data that is sorted in the way you want, running &lt;CODE&gt;head 10&lt;/CODE&gt; will give you the first 10 items according to that sort order. I believe that's what you wanted.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 11:45:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46980#M11209</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-28T11:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: top command with values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46981#M11210</link>
      <description>&lt;P&gt;this will return latest result. I want top 10 values from a particular field.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 15:19:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46981#M11210</guid>
      <dc:creator>jangid</dc:creator>
      <dc:date>2012-11-28T15:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: top command with values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46982#M11211</link>
      <description>&lt;P&gt;No. Updated my answer, please read.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2012 15:54:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46982#M11211</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-28T15:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: top command with values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46983#M11212</link>
      <description>&lt;P&gt;Thanks Ayn, yep you are right I used | head x to get the result. I solved my problem with table | sort | head &lt;BR /&gt;
buy my question, is it possible to get top 10 E_Time values [not events] using top command?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2012 10:50:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46983#M11212</guid>
      <dc:creator>jangid</dc:creator>
      <dc:date>2012-11-29T10:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: top command with values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46984#M11213</link>
      <description>&lt;P&gt;Nope, &lt;CODE&gt;top&lt;/CODE&gt; works with item counts exclusively, so you cannot use it to work with values.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2012 12:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/top-command-with-values/m-p/46984#M11213</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-11-29T12:11:30Z</dc:date>
    </item>
  </channel>
</rss>

