<?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: Using a parameter that records memory usage, how do I get my transaction search to show the maximum memory usage by user? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-a-parameter-that-records-memory-usage-how-do-I-get-my/m-p/203198#M59036</link>
    <description>&lt;P&gt;Please try this.&lt;/P&gt;

&lt;P&gt;index=iis earliest=-7d@d latest=@d | eval c_time=_time | eval c_time=strftime(_time,"%Y-%m-%d %H:%M:%S") | eventstats max(system_mem) as max_mem, min(system_mem) as min_mem by GUID | search system_mem=max_mem OR system_mem=min_mem | fields - max_mem, min_mem | transaction GUID mvlist=t keepevicted=true | table GUID c_time cs_uri_stem system_mem&lt;/P&gt;

&lt;P&gt;Hope it helps you.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 07:13:05 GMT</pubDate>
    <dc:creator>thirumalreddyb</dc:creator>
    <dc:date>2020-09-29T07:13:05Z</dc:date>
    <item>
      <title>Using a parameter that records memory usage, how do I get my transaction search to show the maximum memory usage by user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-parameter-that-records-memory-usage-how-do-I-get-my/m-p/203196#M59034</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a parameter &lt;CODE&gt;system_mem&lt;/CODE&gt; that records the memory usage of an application.&lt;/P&gt;

&lt;P&gt;I am trying to do analysis by using transactions and see each session, for the previous 100 events or so, leading up to the max memory usage.&lt;/P&gt;

&lt;P&gt;Is it possible to have something like the search below? Currently, my transactions do not end with the maximum &lt;CODE&gt;system_mem&lt;/CODE&gt; experienced by the user. Why is this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=iis earliest=-7d@d latest=@d | eval c_time=_time | eval c_time=strftime(_time,"%Y-%m-%d %H:%M:%S") |  transaction GUID maxpause=60min endswith=(eventstats=max(system_mem)) mvlist=t keepevicted=true | table GUID c_time cs_uri_stem system_mem
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To note I do not have a sessionId, only a unique user ID.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 08:31:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-parameter-that-records-memory-usage-how-do-I-get-my/m-p/203196#M59034</guid>
      <dc:creator>DanielFordWA</dc:creator>
      <dc:date>2015-09-02T08:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using a parameter that records memory usage, how do I get my transaction search to show the maximum memory usage by user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-parameter-that-records-memory-usage-how-do-I-get-my/m-p/203197#M59035</link>
      <description>&lt;P&gt;If I understand you correctly and we are assuming that a "session" can be inferred by an increase of memory usage (e.g. so long as memory is increasing, it is the same session; whenever it decreases, a new session has begun), then we can manufacture a sessionID using &lt;CODE&gt;streamstats&lt;/CODE&gt; like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=iis earliest=-7d@d latest=@d | eval c_time=_time | eval c_time=strftime(_time,"%Y-%m-%d %H:%M:%S") | reverse | streamstats current=f last(system_mem) AS prev_system_mem BY GUID | eval new_session=if((system_mem&amp;lt;prev_system_mem),"TRUE",null()) | streamstats current=t count(new_session) AS sessionID BY GUID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now each GUID's event has a &lt;CODE&gt;sessionID&lt;/CODE&gt; field that can be used to distinguish/group events that can be exploited by tacking on something like &lt;CODE&gt;| stats blah blah blah BY GUID sessionID&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Any time that you can avoid &lt;CODE&gt;transaction&lt;/CODE&gt;, you should; it is &lt;EM&gt;very&lt;/EM&gt; slow/costly to use it.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 14:07:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-parameter-that-records-memory-usage-how-do-I-get-my/m-p/203197#M59035</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-09-02T14:07:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using a parameter that records memory usage, how do I get my transaction search to show the maximum memory usage by user?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-a-parameter-that-records-memory-usage-how-do-I-get-my/m-p/203198#M59036</link>
      <description>&lt;P&gt;Please try this.&lt;/P&gt;

&lt;P&gt;index=iis earliest=-7d@d latest=@d | eval c_time=_time | eval c_time=strftime(_time,"%Y-%m-%d %H:%M:%S") | eventstats max(system_mem) as max_mem, min(system_mem) as min_mem by GUID | search system_mem=max_mem OR system_mem=min_mem | fields - max_mem, min_mem | transaction GUID mvlist=t keepevicted=true | table GUID c_time cs_uri_stem system_mem&lt;/P&gt;

&lt;P&gt;Hope it helps you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 07:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-a-parameter-that-records-memory-usage-how-do-I-get-my/m-p/203198#M59036</guid>
      <dc:creator>thirumalreddyb</dc:creator>
      <dc:date>2020-09-29T07:13:05Z</dc:date>
    </item>
  </channel>
</rss>

