<?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 generate a search that will sort by a field and get aggregated data for the sorted field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207958#M60603</link>
    <description>&lt;P&gt;That worked perfectly.  Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Nov 2016 13:48:53 GMT</pubDate>
    <dc:creator>sweenj</dc:creator>
    <dc:date>2016-11-03T13:48:53Z</dc:date>
    <item>
      <title>How to generate a search that will sort by a field and get aggregated data for the sorted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207955#M60600</link>
      <description>&lt;P&gt;I have a search string. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=data sourcetype=jobs QUEUE=myqueue| dedup JOBID | FIELDS CPU_USED, USER group by USER
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each user can run multiple jobs, so I'll have duplicate USER names in the searched event.  I'll also have varied CPU for each job the USER ran.  &lt;/P&gt;

&lt;P&gt;I'd like to be able to do a search that aggregates the CPU_USED by USER.  So if user1 runs 2 jobs in the time period, I can get CPU_USED from the first, job, and CPU_USED from the 2nd job, added together into an aggregate (sum) value.  &lt;/P&gt;

&lt;P&gt;Could anyone assist with this?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:39:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207955#M60600</guid>
      <dc:creator>sweenj</dc:creator>
      <dc:date>2020-09-29T11:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that will sort by a field and get aggregated data for the sorted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207956#M60601</link>
      <description>&lt;P&gt;I belive you'll want to look here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.0/SearchReference/Addcoltotals"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.0/SearchReference/Addcoltotals&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 22:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207956#M60601</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2016-11-02T22:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that will sort by a field and get aggregated data for the sorted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207957#M60602</link>
      <description>&lt;P&gt;You can try this to count the sum of CPU_USED for each USER&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=data sourcetype=jobs QUEUE=myqueue| dedup JOBID | stats sum(CPU_USED) by USER
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Nov 2016 22:56:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207957#M60602</guid>
      <dc:creator>ID_SplunkUser</dc:creator>
      <dc:date>2016-11-02T22:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate a search that will sort by a field and get aggregated data for the sorted field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207958#M60603</link>
      <description>&lt;P&gt;That worked perfectly.  Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2016 13:48:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-generate-a-search-that-will-sort-by-a-field-and-get/m-p/207958#M60603</guid>
      <dc:creator>sweenj</dc:creator>
      <dc:date>2016-11-03T13:48:53Z</dc:date>
    </item>
  </channel>
</rss>

