<?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 subtract values from same field in subsequent event and with the resulted values i want to make a chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-subtract-values-from-same-field-in-subsequent-event-and/m-p/486161#M136029</link>
    <description>&lt;P&gt;Does &lt;CODE&gt;... | streamstats window=2 range(Published) as result&lt;/CODE&gt; do what you need?&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2019 01:28:15 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-09-26T01:28:15Z</dc:date>
    <item>
      <title>How to subtract values from same field in subsequent event and with the resulted values i want to make a chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-subtract-values-from-same-field-in-subsequent-event-and/m-p/486160#M136028</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;I am new to Splunk. please help me here on this requirement.&lt;/P&gt;

&lt;P&gt;i would like to check if there is any possibility to subtract the values from a same field in subsequent event.&lt;/P&gt;

&lt;P&gt;For Example i have below two events in two different time stamps.&lt;/P&gt;

&lt;P&gt;9/24/19&lt;BR /&gt;
6:52:22.000 PM  &lt;/P&gt;

&lt;P&gt;[Tue Sep 24 16:52:22 GMT 2019] [UM Server Status Generator] [com.pcbsys.foundation] - ServerStatusLog&amp;gt; Memory=1401, Direct=4096, EventMemory=0, Disk=224766, CPU=10.75, Scheduled=468, Queued=0, Connections=3, BytesIn=626255, BytesOut=113227133, Published=1677085616, Consumed=1677214707, QueueSize=0, ClientsSize=0, CommQueueSize=0&lt;/P&gt;

&lt;P&gt;9/24/19&lt;BR /&gt;
6:52:17.000 PM  &lt;/P&gt;

&lt;P&gt;[Tue Sep 24 16:52:17 GMT 2019] [UM Server Status Generator] [com.pcbsys.foundation] - ServerStatusLog&amp;gt; Memory=1607, Direct=4096, EventMemory=0, Disk=224811, CPU=4.62, Scheduled=468, Queued=0, Connections=3, BytesIn=626255, BytesOut=113207677, Published=1677078549, Consumed=1677207640, QueueSize=0, ClientsSize=0, CommQueueSize=0&lt;/P&gt;

&lt;P&gt;Now the result should be on this Field(Published) 1677085616 - 1677078549= result.&lt;/P&gt;

&lt;P&gt;........&lt;/P&gt;

&lt;P&gt;In the same way ,if i have next event in another time stamp, in fact every 5 seconds i have another event .&lt;/P&gt;

&lt;P&gt;9/24/19&lt;BR /&gt;
6:52:12.000 PM  &lt;/P&gt;

&lt;P&gt;[Tue Sep 24 16:52:12 GMT 2019] [UM Server Status Generator] [com.pcbsys.foundation] - ServerStatusLog&amp;gt; Memory=1710, Direct=4096, EventMemory=0, Disk=224404, CPU=6.25, Scheduled=467, Queued=0, Connections=3, BytesIn=626255, BytesOut=113183513, Published=1677076834, Consumed=1677205925, QueueSize=1, ClientsSize=0, CommQueueSize=0&lt;/P&gt;

&lt;P&gt;Now it would be like previous event field(Published) value - this event field(published) value, so it would be 1677078549 -1677076834= result.&lt;/P&gt;

&lt;P&gt;at the end with the resulted values i want to make a graph on the respective times.&lt;/P&gt;

&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;
Harish&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2019 23:28:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-subtract-values-from-same-field-in-subsequent-event-and/m-p/486160#M136028</guid>
      <dc:creator>harishbabu</dc:creator>
      <dc:date>2019-09-25T23:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to subtract values from same field in subsequent event and with the resulted values i want to make a chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-subtract-values-from-same-field-in-subsequent-event-and/m-p/486161#M136029</link>
      <description>&lt;P&gt;Does &lt;CODE&gt;... | streamstats window=2 range(Published) as result&lt;/CODE&gt; do what you need?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 01:28:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-subtract-values-from-same-field-in-subsequent-event-and/m-p/486161#M136029</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-09-26T01:28:15Z</dc:date>
    </item>
  </channel>
</rss>

