<?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: I am trying to write a query that displays how long an application has been running?  So far I have the following string. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231650#M188401</link>
    <description>&lt;P&gt;I double checked the field and it is named New_Process_Name.  When I take "_time" out of the search, New_Process_Name shows up in the display.  This actually is what I want but I still need to display what time the application was launched.  Can that be displayed as well?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Steve&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 08:27:35 GMT</pubDate>
    <dc:creator>smazzatenta</dc:creator>
    <dc:date>2020-09-29T08:27:35Z</dc:date>
    <item>
      <title>I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231639#M188390</link>
      <description>&lt;P&gt;host="server" EventCode=4688 OR EventCode=469 | transaction New_Process_Name startswith=(EventCode=4688) endswith=(EventCode=4689) | where duration &amp;gt; 1 | search New_Process_Name="&lt;EM&gt;extend.exe&lt;/EM&gt;" New_Process_Name="&lt;EM&gt;excel.exe&lt;/EM&gt;"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:25:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231639#M188390</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2020-09-29T08:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231640#M188391</link>
      <description>&lt;P&gt;Hi, can you be more specific? Is the search above working for you at all?&lt;BR /&gt;
By looking at your query it seems you pretty much got what you were trying to achieve, apart from some typos and the OR missing in your filter:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="server" EventCode=4688 OR EventCode=4699 
| transaction New_Process_Name startswith="EventCode=4688" endswith="EventCode=4689"
| where duration &amp;gt; 1
| search New_Process_Name="extend.exe" OR New_Process_Name="excel.exe"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if that works for you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 16:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231640#M188391</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-01-13T16:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231641#M188392</link>
      <description>&lt;P&gt;Thank you for the response.  To be more specific, I can't seem to display the result correctly on the dashboard.  I am trying to show each application on the x-axis and the duration in hours, minutes, seconds on the y-axis.  Also, I would like  display the time when application was launched.  Would you mind pointing out which OR I am missing in my filter.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jan 2016 16:59:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231641#M188392</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2016-01-13T16:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231642#M188393</link>
      <description>&lt;P&gt;Hi, it's the second OR, the one in the last line.&lt;BR /&gt;
If you don't do that you'll be searching for processes with both names.&lt;/P&gt;

&lt;P&gt;With regards to your request:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="server" EventCode=4688 OR EventCode=4699 
| transaction New_Process_Name startswith="EventCode=4688" endswith="EventCode=4689"
| where duration &amp;gt; 1
| search New_Process_Name="extend.exe" OR New_Process_Name="excel.exe"
| chart values(eval(duration/60)) as duration_minutes by New_Process_Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Keep in mind duration is in seconds so in order to display that in a chart you need numerical values (seconds, minutes, hours).&lt;/P&gt;

&lt;P&gt;Let me know if that helps&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 12:11:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231642#M188393</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-01-14T12:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231643#M188394</link>
      <description>&lt;P&gt;Thank you. Would you be able to assist in helping me display the numerical values (seconds, minutes, hours)?  I tried working on that yesterday and was unsuccessful.&lt;/P&gt;

&lt;P&gt;Thanks again for all your help.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2016 13:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231643#M188394</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2016-01-14T13:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231644#M188395</link>
      <description>&lt;P&gt;Hi again, I have been working on this query for a couple days.  To clarify, I am trying to write a query that tracks application launch time and duration.  Rather than give you a sample of the query, like I did in my previous post, below is the exact query I am using and it does not give me the correct results.  Any assistance would be helpful. Thanks.&lt;/P&gt;

&lt;P&gt;host="WKSDC-0004" EventCode=4688 OR EventCode=4689 | transaction New_Process_ID Process_ID Process_Name New_Process_Name startswith="EventCode=4688" endswith="EventCode=4689" | search New_Process_Name="C:\Program Files (x86)\ExtendSim9\ExtendSim.exe" OR New_Process_Name="C:\GAMS\win64\24.0\gamside.exe" OR New_Process_Name="&lt;EM&gt;Netica.exe&lt;/EM&gt;" OR New_Process_Name="C:\Programs Files (x86)\Vitech\CORE 8\core80.exe" | chart values(eval(duration/60)) as Usage_In_Minutes by New_Process_Name&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231644#M188395</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2020-09-29T08:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231645#M188396</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In that case I wouldn't use a chart but a table to summarise your requirement. Alternatively a timechart might do the trick too.&lt;BR /&gt;
Two options then:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch
| eval Usage_In_Minutes = round(duration/60)
| table _time, New_Process_Name, Usage_In_Minutes

yoursearch
| eval Usage_In_Minutes = round(duration/60)
| timechart Usage_In_Minutes by New_Process_Name
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if that works for you.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 10:19:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231645#M188396</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-01-15T10:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231646#M188397</link>
      <description>&lt;P&gt;Once again.  Thanks for the quick response.  I will not be a work for a couple of days but will give it a try when I return on Tuesday.  Thanks again for all the help.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 11:38:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231646#M188397</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2016-01-15T11:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231647#M188398</link>
      <description>&lt;P&gt;Once again.  Thanks for the quick response.  I will not be a work for a couple of days but will give it a try when I return on Tuesday.  Thanks again for all the help.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2016 11:38:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231647#M188398</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2016-01-15T11:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231648#M188399</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;The first search using "table" does not show the New_Process_Name in the display.  It shows the time (2016-01-13T05:06:52.000-5:00) and usage in minutes (528).  I am not sure I understand the time.&lt;/P&gt;

&lt;P&gt;When I use "timechart" I receive the following error:&lt;BR /&gt;
Error in 'timechart' command: The specifier 'Usage_In_Minutes' is invalid. It must be in form (). For example: max(size)&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Steve&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:27:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231648#M188399</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2020-09-29T08:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231649#M188400</link>
      <description>&lt;P&gt;Is New_Process_Name an actual field in your data? Simply run a quick search against your data (no filtering) to find that out. Keep in mind field names are CASE SENSITIVE&lt;/P&gt;

&lt;P&gt;The timechart error is my fault as I forgot to include the max (or any other aggregation function). I've fixed this in the search below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; yoursearch
 | eval Usage_In_Minutes = round(duration/60)
 | table _time, New_Process_Name, Usage_In_Minutes

 yoursearch
 | eval Usage_In_Minutes = round(duration/60)
 | timechart max(Usage_In_Minutes) as Usage_In_Minutes by New_Process_Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231649#M188400</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2020-09-29T08:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231650#M188401</link>
      <description>&lt;P&gt;I double checked the field and it is named New_Process_Name.  When I take "_time" out of the search, New_Process_Name shows up in the display.  This actually is what I want but I still need to display what time the application was launched.  Can that be displayed as well?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Steve&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:27:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231650#M188401</guid>
      <dc:creator>smazzatenta</dc:creator>
      <dc:date>2020-09-29T08:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231651#M188402</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Can you copy and paste your query so that I can take a quick look?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 15:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231651#M188402</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2016-01-19T15:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: I am trying to write a query that displays how long an application has been running?  So far I have the following string.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231652#M188403</link>
      <description>&lt;P&gt;Were you ever able to improve the speed of this search by replacing &lt;CODE&gt;transaction&lt;/CODE&gt; with a more efficient function, like &lt;CODE&gt;stats&lt;/CODE&gt; or &lt;CODE&gt;streamstats&lt;/CODE&gt;? If so, could you share? Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 16:17:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-am-trying-to-write-a-query-that-displays-how-long-an/m-p/231652#M188403</guid>
      <dc:creator>samjenk_2</dc:creator>
      <dc:date>2019-07-09T16:17:35Z</dc:date>
    </item>
  </channel>
</rss>

