<?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 display time stamp in each line on transaction ? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-display-time-stamp-in-each-line-on-transaction/m-p/177960#M35671</link>
    <description>&lt;P&gt;I'd suggest capturing the times you are interested in before the transaction into a different field. Like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt; | eval ack_sent_time = if(like(_raw,"%GetAckNak Sent%"),_time,nullif(1,1)) | eval ack_recv_time = if(like(_raw,"%GetAckNak Recv%"),_time,nullif(1,1)) | transaction ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will store the _time in a field called ack_sent_time only if the event contains "GetAckNak Sent", and will store the _time in a field called ack_recv_time only if the event contains "GetAckNak Recv". Otherwise these fields will be NULL.&lt;/P&gt;

&lt;P&gt;This will allow you to do things like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats latest(ack_sent_time) earliest(ack_recv_time) by &amp;lt;field&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To get the last sent time, and the first recieved time. &lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:03:34 GMT</pubDate>
    <dc:creator>aholzer</dc:creator>
    <dc:date>2020-09-28T18:03:34Z</dc:date>
    <item>
      <title>How to display time stamp in each line on transaction ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-display-time-stamp-in-each-line-on-transaction/m-p/177959#M35670</link>
      <description>&lt;P&gt;1&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;0/21/14 13:17:08.747 SERIAL ZPIMXTerminal.Send Start
10/21/14 13:17:08.747 SERIAL SerialComClass:****NOTICE: Serial Port cleared OK
10/21/14 13:17:08.809 SERIAL GetAckNak Sent: [00]
10/21/14 13:17:08.840 WLL-EX CCTX_POS_GET_TenderTypeStatus = 0

10/21/14 13:17:08.919 SERIAL SerialComClass:****NOTICE: Serial Port cleared OK
10/21/14 13:17:08.919 SERIAL Send Msg() &amp;gt;
10/21/14 13:17:08.981 SERIAL GetAckNak Recv: [00]

10/21/14 13:17:09.090 WLL-EX CCTX_OS_GET_TypeStatus = 0

10/21/14 13:17:09.090 SERIAL SerialComClass:**NOTICE: Serial Port cleared OK
10/21/14 13:17:09.153 SERIAL GetAckNak Recv: [00]
10/21/14 13:17:09.262 SERIAL SerialComClass:**NOTICE: Serial Port cleared OK
10/21/14 13:17:08.747 SERIAL ZPIMXTerminal.Send Start
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in above log.. i formed a transaction using "transaction startswith="ZPIMXTerminal.Send Start" endswith="ZPIMXTerminal.Send Start"&lt;/P&gt;

&lt;P&gt;i wanted to display time stamp  in below 2 two lines &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;10/21/14 13:17:08.809 SERIAL GetAckNak Sent: [00]
10/21/14 13:17:09.153 SERIAL GetAckNak Recv: [00]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;if I specify _time its giving me only the start time of the transaction &lt;/P&gt;</description>
      <pubDate>Fri, 31 Oct 2014 15:20:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-display-time-stamp-in-each-line-on-transaction/m-p/177959#M35670</guid>
      <dc:creator>hemanath_ofc</dc:creator>
      <dc:date>2014-10-31T15:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to display time stamp in each line on transaction ?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-display-time-stamp-in-each-line-on-transaction/m-p/177960#M35671</link>
      <description>&lt;P&gt;I'd suggest capturing the times you are interested in before the transaction into a different field. Like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt; | eval ack_sent_time = if(like(_raw,"%GetAckNak Sent%"),_time,nullif(1,1)) | eval ack_recv_time = if(like(_raw,"%GetAckNak Recv%"),_time,nullif(1,1)) | transaction ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will store the _time in a field called ack_sent_time only if the event contains "GetAckNak Sent", and will store the _time in a field called ack_recv_time only if the event contains "GetAckNak Recv". Otherwise these fields will be NULL.&lt;/P&gt;

&lt;P&gt;This will allow you to do things like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | stats latest(ack_sent_time) earliest(ack_recv_time) by &amp;lt;field&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To get the last sent time, and the first recieved time. &lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:03:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-display-time-stamp-in-each-line-on-transaction/m-p/177960#M35671</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2020-09-28T18:03:34Z</dc:date>
    </item>
  </channel>
</rss>

