<?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: Calculating the number of executions using streamstats in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-number-of-executions-using-streamstats/m-p/254403#M76187</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving package executionID type day time
| eval count=if(type="start",1,0)
| streamstats sum(count) as count by day
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Oct 2016 14:28:07 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2016-10-14T14:28:07Z</dc:date>
    <item>
      <title>Calculating the number of executions using streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-number-of-executions-using-streamstats/m-p/254402#M76186</link>
      <description>&lt;P&gt;Hi! I have such table:&lt;/P&gt;

&lt;P&gt;package executionID type day time&lt;BR /&gt;
A 1 start day1 some_hour&lt;BR /&gt;
A 1 end  day1 some_hour&lt;BR /&gt;
B 1 start day1 some_hour&lt;BR /&gt;
B 2 start day1 some_hour&lt;BR /&gt;
B 2 end  day1 some_hour&lt;/P&gt;

&lt;P&gt;Id like to identify (counting) the execution, so obtaining something like this:&lt;/P&gt;

&lt;P&gt;A 1 start day1 some_hour 1   (start of the first exec of package A in day1)&lt;BR /&gt;
A 1 end  day1 some_hour  1 (end  of the first exec of package A in day1)&lt;BR /&gt;
B 1 start day1 some_hour 1 (start of the first exec of package B in day1)&lt;BR /&gt;
B 2 start day1 some_hour  2 (start of the second exec of package B in day1)&lt;BR /&gt;
B 2 end  day1 some_hour  2 (end of the second exec of package B in day1)&lt;/P&gt;

&lt;P&gt;I tried everything i could with streamstats but i could not do it.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:25:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-number-of-executions-using-streamstats/m-p/254402#M76186</guid>
      <dc:creator>andreafebbo</dc:creator>
      <dc:date>2020-09-29T11:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of executions using streamstats</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-number-of-executions-using-streamstats/m-p/254403#M76187</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your current search giving package executionID type day time
| eval count=if(type="start",1,0)
| streamstats sum(count) as count by day
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Oct 2016 14:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-number-of-executions-using-streamstats/m-p/254403#M76187</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-10-14T14:28:07Z</dc:date>
    </item>
  </channel>
</rss>

