<?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: Does anyone know how to monitor all running searches on a search head and their memory usage in real-time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192853#M55450</link>
    <description>&lt;P&gt;@yannK and @benjaminlin1019 - Search with some performance enhancement. Please check it out if you wish.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_introspection host=* source=*/resource_usage.log* component=PerProcess data.process_type="search" 
  | stats latest(data.pct_cpu) AS resource_usage_cpu latest(data.mem_used) AS resource_usage_mem by data.pid, _time, data.search_props.type,data.search_props.mode, data.search_props.role,data.search_props.user, data.search_props.app, data.search_props.sid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 05 Jun 2019 13:37:53 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2019-06-05T13:37:53Z</dc:date>
    <item>
      <title>Does anyone know how to monitor all running searches on a search head and their memory usage in real-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192849#M55446</link>
      <description>&lt;P&gt;I use one of the S.O.S. queries to get top 20 memory usage queries every 5 minutes, however, it might be easier for us to see that in job inspection. Does anyone know how you can monitor all the running searches and their memory usage in real-time? I would like to see something similar to 'top' results. thanks&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jan 2015 22:43:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192849#M55446</guid>
      <dc:creator>benjaminlin1019</dc:creator>
      <dc:date>2015-01-13T22:43:50Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know how to monitor all running searches on a search head and their memory usage in real-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192850#M55447</link>
      <description>&lt;P&gt;SOS scripts is a good start.&lt;/P&gt;

&lt;P&gt;Otherwise on recent splunk you can use the introspection logs, they run every 30 seconds.&lt;BR /&gt;
Pick an host (indexer or search-head) and look at the cpu/mem usage per search pid.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_introspection host=* source=*/resource_usage.log* | spath | search component=PerProcess                 
    | eval args = 'data.args' | eval sid = 'data.search_props.sid' | eval process_class = case( process=="mongod","KV store", process=="splunk-optimize","index service", process=="sh" OR process=="ksh" OR process=="bash" OR like(process,"python%") OR process=="powershell","scripted input") | eval process_class = case( process=="splunkd" AND ((like(args,"-p %start%") AND NOT like(args,"%process-runner%")) OR args=="service"),"splunkd server", process=="splunkd" AND isnotnull(sid),"search", process=="splunkd" AND (like(args,"fsck%") OR like(args,"recover-metadata%") OR like(args,"cluster_thing")),"index service", process=="splunkd" AND args=="instrument-resource-usage", "scripted input", (like(process,"python%") AND like(args,"%/appserver/mrsparkle/root.py%")) OR like(process,"splunkweb"),"Splunk Web", isnotnull(process_class), process_class) | eval process_class = if(isnull(process_class),"other",process_class)
| search process_class="search"                     | stats latest(data.pct_cpu) AS resource_usage_cpu_dedup latest(data.mem_used) AS resource_usage_mem_dedup latest(process_class) AS process_class by data.pid,  _time, data.search_props.type,data.search_props.mode,  data.search_props.role,data.search_props.user, data.search_props.app, data.search_props.sid                   
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Jan 2015 00:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192850#M55447</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2015-01-14T00:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know how to monitor all running searches on a search head and their memory usage in real-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192851#M55448</link>
      <description>&lt;P&gt;Thanks, I could not find that particular index exist, do you know that any configuration I need to enable first?&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 02:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192851#M55448</guid>
      <dc:creator>benjaminlin1019</dc:creator>
      <dc:date>2015-01-14T02:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know how to monitor all running searches on a search head and their memory usage in real-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192852#M55449</link>
      <description>&lt;P&gt;My bad, it's an underscore index : index=_introspection&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jan 2015 19:45:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192852#M55449</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2015-01-14T19:45:42Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know how to monitor all running searches on a search head and their memory usage in real-time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192853#M55450</link>
      <description>&lt;P&gt;@yannK and @benjaminlin1019 - Search with some performance enhancement. Please check it out if you wish.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_introspection host=* source=*/resource_usage.log* component=PerProcess data.process_type="search" 
  | stats latest(data.pct_cpu) AS resource_usage_cpu latest(data.mem_used) AS resource_usage_mem by data.pid, _time, data.search_props.type,data.search_props.mode, data.search_props.role,data.search_props.user, data.search_props.app, data.search_props.sid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Jun 2019 13:37:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Does-anyone-know-how-to-monitor-all-running-searches-on-a-search/m-p/192853#M55450</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-06-05T13:37:53Z</dc:date>
    </item>
  </channel>
</rss>

