<?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: Calculate Packets per second (PPS) over 1st Quarter in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101787#M26300</link>
    <description>&lt;P&gt;Thanks for the help... Timechart seems to be a more elegant solution. I was also able to find an answer using the search below your answer (it worked but it's ugly)&lt;/P&gt;</description>
    <pubDate>Fri, 19 Apr 2013 21:22:46 GMT</pubDate>
    <dc:creator>Adrian</dc:creator>
    <dc:date>2013-04-19T21:22:46Z</dc:date>
    <item>
      <title>Calculate Packets per second (PPS) over 1st Quarter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101782#M26295</link>
      <description>&lt;P&gt;Trying to calculate the Packets per second (PPS) for sourcetype=traffic during the 1st quarter of 2013.  Understand the mathematical formula just having problem formulating the right syntax. Can  anyone offer some helpful insight?&lt;/P&gt;

&lt;P&gt;Logic: &lt;/P&gt;

&lt;P&gt;add total packets for 1st quarter - stats count sum(packet_count)  divide by seconds in 90 days - /7776000  result should be PPS&lt;/P&gt;

&lt;P&gt;This is my progress so far:&lt;/P&gt;

&lt;P&gt;index=test sourcetype="traffic" earliest="1/1/2013:00:00:00" latest="4/1/2013:00:00:00" | eval PPS = stats count sum(packet_count)/7776000&lt;/P&gt;

&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2013 18:37:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101782#M26295</guid>
      <dc:creator>Adrian</dc:creator>
      <dc:date>2013-04-19T18:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Packets per second (PPS) over 1st Quarter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101783#M26296</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=test sourcetype="traffic" earliest=-1q@q latest=@q | stats per_second(packet_count) as PPS
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Apr 2013 18:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101783#M26296</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-19T18:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Packets per second (PPS) over 1st Quarter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101784#M26297</link>
      <description>&lt;P&gt;Ayn, thanks for the quick response, but I am receiving:&lt;/P&gt;

&lt;P&gt;Error in 'stats' command: The argument 'per_second(packet_count)' is invalid.&lt;/P&gt;

&lt;P&gt;packet_count is a fieldname with a respective value... The reason which I was trying to sum first.  Sorry I left that out of my question.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:46:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101784#M26297</guid>
      <dc:creator>Adrian</dc:creator>
      <dc:date>2020-09-28T13:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Packets per second (PPS) over 1st Quarter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101785#M26298</link>
      <description>&lt;P&gt;I think I just answered my own question with a little insight from Ayn:&lt;/P&gt;

&lt;P&gt;index=test sourcetype="traffic" earliest="-1q@q" latest="@q" | stats sum(packet_count) as packets | eval PPS = packets/7776000 &lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2013 19:12:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101785#M26298</guid>
      <dc:creator>Adrian</dc:creator>
      <dc:date>2013-04-19T19:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Packets per second (PPS) over 1st Quarter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101786#M26299</link>
      <description>&lt;P&gt;My apologies, I forgot that the &lt;CODE&gt;per_second&lt;/CODE&gt; function is valid for &lt;CODE&gt;timechart&lt;/CODE&gt; only. You could either simply use &lt;CODE&gt;timechart&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test sourcetype="traffic" earliest=-1q@q latest=@q | timechart span=1q per_second(packet_count) as PPS
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or run &lt;CODE&gt;stats&lt;/CODE&gt; as you originally planned:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test sourcetype="traffic" earliest=-1q@q latest=@q | stats eval(sum(packet_count)/7776000) as PPS
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Apr 2013 19:17:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101786#M26299</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-19T19:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Packets per second (PPS) over 1st Quarter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101787#M26300</link>
      <description>&lt;P&gt;Thanks for the help... Timechart seems to be a more elegant solution. I was also able to find an answer using the search below your answer (it worked but it's ugly)&lt;/P&gt;</description>
      <pubDate>Fri, 19 Apr 2013 21:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-Packets-per-second-PPS-over-1st-Quarter/m-p/101787#M26300</guid>
      <dc:creator>Adrian</dc:creator>
      <dc:date>2013-04-19T21:22:46Z</dc:date>
    </item>
  </channel>
</rss>

