<?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 stats question in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-question/m-p/103693#M26799</link>
    <description>&lt;P&gt;Here is my search command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="vsapi" | stats dc(guid) as count by os_name, blob_virusinfo_detectionname | sort -count | sort +os_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;how can I output top 50 for "each" os_name? &lt;/LI&gt;
&lt;LI&gt;if I want to add time interval on filename or in csvfile for weekly, how can I set it? (ex: 20110520-20110526-sort_by_osname.csv)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 09:34:26 GMT</pubDate>
    <dc:creator>ken_t_huang</dc:creator>
    <dc:date>2020-09-28T09:34:26Z</dc:date>
    <item>
      <title>stats question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-question/m-p/103693#M26799</link>
      <description>&lt;P&gt;Here is my search command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="vsapi" | stats dc(guid) as count by os_name, blob_virusinfo_detectionname | sort -count | sort +os_name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;how can I output top 50 for "each" os_name? &lt;/LI&gt;
&lt;LI&gt;if I want to add time interval on filename or in csvfile for weekly, how can I set it? (ex: 20110520-20110526-sort_by_osname.csv)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-question/m-p/103693#M26799</guid>
      <dc:creator>ken_t_huang</dc:creator>
      <dc:date>2020-09-28T09:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: stats question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-question/m-p/103694#M26800</link>
      <description>&lt;P&gt;I don't understand your second question, but I think the first one should be pretty easy to do.  The built-in &lt;CODE&gt;top&lt;/CODE&gt; search command supports a by-clause.  You can do a &lt;CODE&gt;| top limit=50 blob_virusinfo_detectionname by os_name&lt;/CODE&gt;  (Or whatever other field you with to count the top 50 of by OS).  &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Top"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Top&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2011 03:25:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-question/m-p/103694#M26800</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-05-18T03:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: stats question</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-question/m-p/103695#M26801</link>
      <description>&lt;P&gt;hi, thanks your reply, &lt;BR /&gt;
it have show limit 50 for each os_name, but it's not the "top" 50 for count. I need top 50 dc(guid) as count for each os_name.&lt;/P&gt;

&lt;P&gt;about second question, I mean when setting seacrh &amp;amp; report, it will send csv file in email, how do I add the query date in filename? (ex: query interval -7d@d -&amp;gt; @d)&lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:34:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-question/m-p/103695#M26801</guid>
      <dc:creator>ken_t_huang</dc:creator>
      <dc:date>2020-09-28T09:34:28Z</dc:date>
    </item>
  </channel>
</rss>

