<?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 calculate duration between multiple events from same session in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/calculate-duration-between-multiple-events-from-same-session/m-p/124405#M33640</link>
    <description>&lt;P&gt;I am dealing with log files which are structured as follows&lt;BR /&gt;
TimeStamp=1 SessionHandle=1 SessionEvent=A&lt;BR /&gt;
TimeStamp=2 SessionHandle=1 SessionEvent=B&lt;BR /&gt;
TimeStamp=3 SessionHandle=1 SessionEvent=C&lt;BR /&gt;
TimeStamp=4 SessionHandle=1 SessionEvent=D&lt;BR /&gt;
TimeStamp=5 SessionHandle=1 SessionEvent=E&lt;BR /&gt;
TimeStamp=6 SessionHandle=1 SessionEvent=F&lt;BR /&gt;
TimeStamp=7 SessionHandle=1 SessionEvent=G&lt;BR /&gt;
TimeStamp=8 SessionHandle=1 SessionEvent=H&lt;/P&gt;

&lt;P&gt;TimeStamp=10 SessionHandle=2 SessionEvent=A&lt;BR /&gt;
TimeStamp=11 SessionHandle=2 SessionEvent=B&lt;BR /&gt;
TimeStamp=12 SessionHandle=2 SessionEvent=C&lt;BR /&gt;
TimeStamp=13 SessionHandle=2 SessionEvent=D&lt;BR /&gt;
TimeStamp=14 SessionHandle=2 SessionEvent=E&lt;BR /&gt;
TimeStamp=15 SessionHandle=2 SessionEvent=F&lt;BR /&gt;
TimeStamp=16 SessionHandle=2 SessionEvent=G&lt;BR /&gt;
TimeStamp=17 SessionHandle=2 SessionEvent=H&lt;/P&gt;

&lt;P&gt;I want  to calculate duration between various events for each session&lt;BR /&gt;
For ex: timediff between B &amp;amp; A, similarly H-A, H-D, A-F etc for each session separately and display results in single table&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jun 2014 09:16:39 GMT</pubDate>
    <dc:creator>sajids</dc:creator>
    <dc:date>2014-06-30T09:16:39Z</dc:date>
    <item>
      <title>calculate duration between multiple events from same session</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-duration-between-multiple-events-from-same-session/m-p/124405#M33640</link>
      <description>&lt;P&gt;I am dealing with log files which are structured as follows&lt;BR /&gt;
TimeStamp=1 SessionHandle=1 SessionEvent=A&lt;BR /&gt;
TimeStamp=2 SessionHandle=1 SessionEvent=B&lt;BR /&gt;
TimeStamp=3 SessionHandle=1 SessionEvent=C&lt;BR /&gt;
TimeStamp=4 SessionHandle=1 SessionEvent=D&lt;BR /&gt;
TimeStamp=5 SessionHandle=1 SessionEvent=E&lt;BR /&gt;
TimeStamp=6 SessionHandle=1 SessionEvent=F&lt;BR /&gt;
TimeStamp=7 SessionHandle=1 SessionEvent=G&lt;BR /&gt;
TimeStamp=8 SessionHandle=1 SessionEvent=H&lt;/P&gt;

&lt;P&gt;TimeStamp=10 SessionHandle=2 SessionEvent=A&lt;BR /&gt;
TimeStamp=11 SessionHandle=2 SessionEvent=B&lt;BR /&gt;
TimeStamp=12 SessionHandle=2 SessionEvent=C&lt;BR /&gt;
TimeStamp=13 SessionHandle=2 SessionEvent=D&lt;BR /&gt;
TimeStamp=14 SessionHandle=2 SessionEvent=E&lt;BR /&gt;
TimeStamp=15 SessionHandle=2 SessionEvent=F&lt;BR /&gt;
TimeStamp=16 SessionHandle=2 SessionEvent=G&lt;BR /&gt;
TimeStamp=17 SessionHandle=2 SessionEvent=H&lt;/P&gt;

&lt;P&gt;I want  to calculate duration between various events for each session&lt;BR /&gt;
For ex: timediff between B &amp;amp; A, similarly H-A, H-D, A-F etc for each session separately and display results in single table&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2014 09:16:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-duration-between-multiple-events-from-same-session/m-p/124405#M33640</guid>
      <dc:creator>sajids</dc:creator>
      <dc:date>2014-06-30T09:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: calculate duration between multiple events from same session</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-duration-between-multiple-events-from-same-session/m-p/124406#M33641</link>
      <description>&lt;P&gt;You can use &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.1/SearchReference/transaction"&gt;transaction&lt;/A&gt; for this.&lt;/P&gt;

&lt;P&gt;e.g. for calculating timediff between A &amp;amp; B, you can use something like&lt;BR /&gt;&lt;BR /&gt;
...|transaction SessionHandle startswith="SessionEvent=A" endswith="SessionEvent=B"&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jun 2014 10:42:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-duration-between-multiple-events-from-same-session/m-p/124406#M33641</guid>
      <dc:creator>amitkr0201</dc:creator>
      <dc:date>2014-06-30T10:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: calculate duration between multiple events from same session</title>
      <link>https://community.splunk.com/t5/Splunk-Search/calculate-duration-between-multiple-events-from-same-session/m-p/124407#M33642</link>
      <description>&lt;P&gt;You may use streamstats to achieve this. Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Base search | streamstats window=1 current=f first(TimeStamp) as prevTimeStamp | eval duration=prevTimeStamp-TimeStamp 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Jun 2014 13:29:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/calculate-duration-between-multiple-events-from-same-session/m-p/124407#M33642</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-06-30T13:29:55Z</dc:date>
    </item>
  </channel>
</rss>

