<?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: Finding additional info about a value returned by max in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88074#M22515</link>
    <description>&lt;P&gt;What was the other way that you ended up using?&lt;/P&gt;</description>
    <pubDate>Wed, 06 Jun 2012 23:01:07 GMT</pubDate>
    <dc:creator>richprescott</dc:creator>
    <dc:date>2012-06-06T23:01:07Z</dc:date>
    <item>
      <title>Finding additional info about a value returned by max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88071#M22512</link>
      <description>&lt;P&gt;I am looking at maximum processor usage by specific processes on a group of clients.  By using stats max on my data (which contains host, instance, and % Processor Time fields), I can pull the max % Processor time that a given process reached on any client in the group.  Is there a way to get Splunk to tell me which host (or record) that maximum came from?  Ideally I'd like to be able to mouse over the entry in a bar graph and have it tell me something like "iexplore: 99%, host: foo1".&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2012 19:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88071#M22512</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2012-03-08T19:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Finding additional info about a value returned by max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88072#M22513</link>
      <description>&lt;P&gt;Yes, you can do this using the "sort" command, supposing the processor time is in a field called &lt;CODE&gt;% Processor Time&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | sort - "% Processor Time" | head 1 | table host instance "% Processor Time"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now, you can make this more interesting by looking at the top per host:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | dedup host sortby - "% Processor Time" | table host instance "% Processor Time"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Mar 2012 03:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88072#M22513</guid>
      <dc:creator>Stephen_Sorkin</dc:creator>
      <dc:date>2012-03-09T03:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Finding additional info about a value returned by max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88073#M22514</link>
      <description>&lt;P&gt;I ended up doing this another way, but I think this works too, so I'll mark it up.  Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Mar 2012 17:34:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88073#M22514</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2012-03-12T17:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Finding additional info about a value returned by max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88074#M22515</link>
      <description>&lt;P&gt;What was the other way that you ended up using?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2012 23:01:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88074#M22515</guid>
      <dc:creator>richprescott</dc:creator>
      <dc:date>2012-06-06T23:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: Finding additional info about a value returned by max</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88075#M22516</link>
      <description>&lt;P&gt;I used stats to split out the max by each host and instance, then used eval to create a new field (eval hostInstance = instance . ":" . host), then displayed the max value with the conjoined field.  Inelegant but functional.&lt;/P&gt;

&lt;P&gt;I think this is the way to go, though:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE&gt;&lt;BR /&gt;
...| stats max(Value) as Max by instance,host | dedup instance sortby -Max&lt;BR /&gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;
Still have to mess with numbered instances and case-sensitivity, but it's less ugly.  Also, if you want to keep the top X readings per instance instead of the top 1, you can say "dedup X instance sortby -Max".&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 12:28:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Finding-additional-info-about-a-value-returned-by-max/m-p/88075#M22516</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2012-06-07T12:28:46Z</dc:date>
    </item>
  </channel>
</rss>

