<?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: Adding time in a search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Adding-time-in-a-search/m-p/42631#M179064</link>
    <description>&lt;P&gt;If the time is simply the number of seconds (or whatever), you could just do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cs_id=myid | stats sum(timespent) by cs_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But by "unix time" I guess you mean epoch time? If that's the case, I assume they must be providing a start and end time for each session, so you need to compute the duration from the difference:&lt;/P&gt;

&lt;P&gt;cs_id=myid | eval duration = endtime-starttime | stats sum(duration) by cs_id&lt;/P&gt;

&lt;P&gt;I really have no idea how the above information is actually represented in your logs, so it might not work (e.g., maybe the data in different events, and you have to use &lt;CODE&gt;transaction&lt;/CODE&gt; to construct the sessions and start and durations yourself, I don't know.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Sep 2010 23:47:19 GMT</pubDate>
    <dc:creator>gkanapathy</dc:creator>
    <dc:date>2010-09-02T23:47:19Z</dc:date>
    <item>
      <title>Adding time in a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-time-in-a-search/m-p/42630#M179063</link>
      <description>&lt;P&gt;I would like to add the total amount of time an cs_id spends on the web daily.  Ironport provides logs where the time is in unix time, does anyone know of a way to do this?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2010 23:41:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-time-in-a-search/m-p/42630#M179063</guid>
      <dc:creator>sptelars</dc:creator>
      <dc:date>2010-09-02T23:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding time in a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Adding-time-in-a-search/m-p/42631#M179064</link>
      <description>&lt;P&gt;If the time is simply the number of seconds (or whatever), you could just do:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;cs_id=myid | stats sum(timespent) by cs_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But by "unix time" I guess you mean epoch time? If that's the case, I assume they must be providing a start and end time for each session, so you need to compute the duration from the difference:&lt;/P&gt;

&lt;P&gt;cs_id=myid | eval duration = endtime-starttime | stats sum(duration) by cs_id&lt;/P&gt;

&lt;P&gt;I really have no idea how the above information is actually represented in your logs, so it might not work (e.g., maybe the data in different events, and you have to use &lt;CODE&gt;transaction&lt;/CODE&gt; to construct the sessions and start and durations yourself, I don't know.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2010 23:47:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Adding-time-in-a-search/m-p/42631#M179064</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-09-02T23:47:19Z</dc:date>
    </item>
  </channel>
</rss>

