<?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: timechart per_second working. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-per-second-working/m-p/359849#M174750</link>
    <description>&lt;P&gt;That query provides number of events with per_second aggregation. You create a field foo with value 1, so that each event will have that field and you can calculate per_second count of events on this numerical data.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 13:56:42 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2020-09-29T13:56:42Z</dc:date>
    <item>
      <title>timechart per_second working.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-per-second-working/m-p/359848#M174749</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I found a query I could not understand:&lt;BR /&gt;
&lt;CODE&gt;| eval foo=1 | timechart per_second(foo) as "Bytes per second"&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Why set foo to 1 and then pass it in?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Ref: &lt;A href="https://answers.splunk.com/answers/10147/how-to-show-events-per-second-in-timechart-regardless-of-span.html"&gt;https://answers.splunk.com/answers/10147/how-to-show-events-per-second-in-timechart-regardless-of-span.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Can anyone pls explain?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Deepak&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2017 20:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-per-second-working/m-p/359848#M174749</guid>
      <dc:creator>deepak02</dc:creator>
      <dc:date>2017-05-02T20:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: timechart per_second working.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-per-second-working/m-p/359849#M174750</link>
      <description>&lt;P&gt;That query provides number of events with per_second aggregation. You create a field foo with value 1, so that each event will have that field and you can calculate per_second count of events on this numerical data.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:56:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-per-second-working/m-p/359849#M174750</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-29T13:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: timechart per_second working.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-per-second-working/m-p/359850#M174751</link>
      <description>&lt;P&gt;The main thing to understand is that there is a search before that far left pipe symbol, that is selecting some number of records, each of which has a _time field representing when it was indexed.&lt;/P&gt;

&lt;P&gt;Therefore, the &lt;CODE&gt;timechart&lt;/CODE&gt; command is receiving a set of records that have &lt;CODE&gt;_time&lt;/CODE&gt; and &lt;CODE&gt;foo=1&lt;/CODE&gt;.  timechart is calculating the sum of the foo values per second, and displaying them on a whatever basis it thinks is best.  For short time periods, it will be second-by-second, amounting to the sum of the foos. &lt;/P&gt;

&lt;P&gt;Thus, in that case, that code snippet is the equivalent of the much simpler... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | timechart count as "Bytes per second" 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Across a longer time range, it will calculate the AVERAGE SUM of the foos per second across each chunk of time span that timechart chooses to display.  &lt;/P&gt;

&lt;P&gt;It can be forced to make more sense, however, if you manually set the span value and name the field correctly ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your search | eval foo=1 | timechart span=5m per_second(foo) as "Transactions per second" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 May 2017 23:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-per-second-working/m-p/359850#M174751</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-05-03T23:39:02Z</dc:date>
    </item>
  </channel>
</rss>

