<?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: stats command file doubt in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20544#M3225</link>
    <description>&lt;P&gt;I'm not sure what you didn't understand about that &lt;CODE&gt;stats&lt;/CODE&gt; is an INTERNAL command. There IS no available code for it. &lt;CODE&gt;rawstats.py&lt;/CODE&gt; seems like a good place to start with your own experiments.&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2013 19:28:38 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-04-30T19:28:38Z</dc:date>
    <item>
      <title>stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20537#M3218</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Is the default &lt;CODE&gt;stats&lt;/CODE&gt; command for computing  avg,min,max and sdev a custom search command which calls the rawstats.py file?&lt;BR /&gt;
I have disabled the rawstats command for my search app, but I am available to run the stats command.&lt;/P&gt;

&lt;P&gt;Am I missing something or is my understanding wrong? &lt;/P&gt;

&lt;P&gt;Please help. &lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 17:27:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20537#M3218</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-04-30T17:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20538#M3219</link>
      <description>&lt;P&gt;What are trying to achieve?  Is there something wrong with the values that the stats command is returning?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 18:52:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20538#M3219</guid>
      <dc:creator>sdaniels</dc:creator>
      <dc:date>2013-04-30T18:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20539#M3220</link>
      <description>&lt;P&gt;The &lt;CODE&gt;stats&lt;/CODE&gt; command is a builtin. &lt;CODE&gt;rawstats&lt;/CODE&gt; is the command that uses &lt;CODE&gt;rawstats.py&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[rawstats]
filename = rawstats.py
streaming = true
retainsevents = true
overrides_timeorder = false
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Apr 2013 18:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20539#M3220</guid>
      <dc:creator>dart</dc:creator>
      <dc:date>2013-04-30T18:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20540#M3221</link>
      <description>&lt;P&gt;no..values are correct only... i need to have some extra funtionality of stats command..so wanted to check that stats command file..cany you me help me in finding the exact file pls&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 19:11:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20540#M3221</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-04-30T19:11:54Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20541#M3222</link>
      <description>&lt;P&gt;As dart says, there is no external file. &lt;CODE&gt;stats&lt;/CODE&gt; is a built-in command. If you need extra functionality, you'll need to build your own custom search command that adds it.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 19:15:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20541#M3222</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-30T19:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20542#M3223</link>
      <description>&lt;P&gt;Ayn . can you please give me the sample code of avg function for stats command pls.. i need work for an extra functionlity on tat.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 19:23:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20542#M3223</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-04-30T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20543#M3224</link>
      <description>&lt;P&gt;so dart . if i define my additional functionality to this piece of code in rawstats.py file &lt;/P&gt;

&lt;P&gt;def stats(r):&lt;BR /&gt;
    """returns the median, average, standard deviation, min and max of a sequence"""&lt;BR /&gt;
    tot = sum(r)&lt;BR /&gt;
    avg = tot/len(r)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sdsq = sum([(i-avg)**2 for i in r])
s = list(r)
s.sort()
return s[len(s)//2], avg, (sdsq/(len(r)-1 or 1))**.5, min(r), max(r)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and save it as seperate command .. will that work ??&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 19:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20543#M3224</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-04-30T19:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20544#M3225</link>
      <description>&lt;P&gt;I'm not sure what you didn't understand about that &lt;CODE&gt;stats&lt;/CODE&gt; is an INTERNAL command. There IS no available code for it. &lt;CODE&gt;rawstats.py&lt;/CODE&gt; seems like a good place to start with your own experiments.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 19:28:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20544#M3225</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-30T19:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20545#M3226</link>
      <description>&lt;P&gt;ok Ayn.thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 19:46:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20545#M3226</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2013-04-30T19:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: stats command file doubt</title>
      <link>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20546#M3227</link>
      <description>&lt;P&gt;Why not try it?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2013 20:17:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/stats-command-file-doubt/m-p/20546#M3227</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-30T20:17:49Z</dc:date>
    </item>
  </channel>
</rss>

