<?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: How to calculate the total time taken for each transaction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69910#M180579</link>
    <description>&lt;P&gt;search source="your files" | reverse | transaction TransactionID | eval TimeTaken=_duration  | fields _time, TransactionID, TimeTaken | sort _time, TransactionID?&lt;/P&gt;

&lt;P&gt;Will that join the events as needed on TransactionID and then zoom in  on the fields you need ?&lt;/P&gt;

&lt;P&gt;If not I'm possibly not understanding your requirements fully&lt;/P&gt;

&lt;P&gt;I've just recently used transaction and also delta to help get end to end timings for events&lt;/P&gt;

&lt;P&gt;In one case I resorted to using delta because I could not get the events into Splunk exactly right&lt;/P&gt;

&lt;P&gt;Otherwise I think transaction is simpler&lt;/P&gt;</description>
    <pubDate>Sun, 22 Sep 2013 13:30:05 GMT</pubDate>
    <dc:creator>miken_hg5</dc:creator>
    <dc:date>2013-09-22T13:30:05Z</dc:date>
    <item>
      <title>How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69907#M180576</link>
      <description>&lt;P&gt;2013-09-20 16:53:04,723 INFO[Thread-3]EndTime=20/09/2013 16:53:04 TransactionID=A, Event=completed, Result=sent&lt;BR /&gt;
2013-09-20 16:52:04,723 INFO[Thread-3]StartTime=20/09/2013 16:52:04 TransactionID=A, Event=start_process&lt;/P&gt;

&lt;P&gt;If i need to calculate the total time for the above transaction (time taken of event=start_process - time taken for event=completed), how to go abt doing it?&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 12:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69907#M180576</guid>
      <dc:creator>thinksplunk</dc:creator>
      <dc:date>2013-09-22T12:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69908#M180577</link>
      <description>&lt;P&gt;Could this be done using the | reverse | transaction TransactionId?&lt;/P&gt;

&lt;P&gt;The reverse should ensure that the start_process is listed before completed&lt;/P&gt;

&lt;P&gt;The transaction will join separate events into one combined event = a transaction&lt;BR /&gt;
- and every unique value of TranscationID results in multiple transactions&lt;/P&gt;

&lt;P&gt;Splunk will automatically create a new field = _duration for you which is the difference between first and last event in the combined event.&lt;/P&gt;

&lt;P&gt;So you don't need to even do a time difference between the fields yourself&lt;/P&gt;

&lt;P&gt;nb: I note that the date and times for the events are identical in your quoted example - if there is no difference in log time NOR in the event details themselves, sadly _duration may prove to be 0?&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 13:02:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69908#M180577</guid>
      <dc:creator>miken_hg5</dc:creator>
      <dc:date>2013-09-22T13:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69909#M180578</link>
      <description>&lt;P&gt;what i meant is that i want to have the below resulst for above lines of event based on event=start_process - event=completed for every transaction.&lt;/P&gt;

&lt;P&gt;TransactionID   Time taken (1sec)&lt;BR /&gt;
A               60&lt;BR /&gt;
B               90&lt;BR /&gt;
C               20  ...&lt;BR /&gt;
etc&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 13:15:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69909#M180578</guid>
      <dc:creator>thinksplunk</dc:creator>
      <dc:date>2013-09-22T13:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69910#M180579</link>
      <description>&lt;P&gt;search source="your files" | reverse | transaction TransactionID | eval TimeTaken=_duration  | fields _time, TransactionID, TimeTaken | sort _time, TransactionID?&lt;/P&gt;

&lt;P&gt;Will that join the events as needed on TransactionID and then zoom in  on the fields you need ?&lt;/P&gt;

&lt;P&gt;If not I'm possibly not understanding your requirements fully&lt;/P&gt;

&lt;P&gt;I've just recently used transaction and also delta to help get end to end timings for events&lt;/P&gt;

&lt;P&gt;In one case I resorted to using delta because I could not get the events into Splunk exactly right&lt;/P&gt;

&lt;P&gt;Otherwise I think transaction is simpler&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 13:30:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69910#M180579</guid>
      <dc:creator>miken_hg5</dc:creator>
      <dc:date>2013-09-22T13:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69911#M180580</link>
      <description>&lt;P&gt;The transaction command creates a field called duration. In seconds. Done.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 14:00:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69911#M180580</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-09-22T14:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69912#M180581</link>
      <description>&lt;P&gt;No need to &lt;CODE&gt;reverse&lt;/CODE&gt;. Splunk will sort out the transaction anyway, as long as you're within reasonable limits regarding total transaction length and max time between events.&lt;/P&gt;

&lt;P&gt;see the docs for &lt;CODE&gt;transaction&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 17:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69912#M180581</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-09-22T17:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69913#M180582</link>
      <description>&lt;P&gt;as sowings points out, the transaction command will compute the duration for you, automatically. If you have &lt;EM&gt;very&lt;/EM&gt; long transactions, you might be better off performance wise with &lt;CODE&gt;stats&lt;/CODE&gt;;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...| stats min(_time) as min_t max(_time) as max_t by TranasactionID | eval dur = max_t - min_t&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Sep 2013 18:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69913#M180582</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-09-22T18:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the total time taken for each transaction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69914#M180583</link>
      <description>&lt;P&gt;Just a comment: "|reverse" is overkill here. Transaction understands that it should be in time order.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2013 12:25:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-calculate-the-total-time-taken-for-each-transaction/m-p/69914#M180583</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-09-23T12:25:59Z</dc:date>
    </item>
  </channel>
</rss>

