<?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 track memory/cpu usage per search execution (on Search Head/Indexer)? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275971#M83259</link>
    <description>&lt;P&gt;Hi @melonman,&lt;/P&gt;

&lt;P&gt;If you want to search CPU and memory utilization per search execution with relevant information like which used executed and more.&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:36:03 GMT</pubDate>
    <dc:creator>VatsalJagani</dc:creator>
    <dc:date>2019-06-05T13:36:03Z</dc:date>
    <item>
      <title>How to track memory/cpu usage per search execution (on Search Head/Indexer)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275969#M83257</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I am looking for a way to track memory/cpu usage per search execution on search head and indexer.&lt;BR /&gt;
I thought  I could use _introspection index to track it, but I can not find process resource information in there.&lt;/P&gt;

&lt;P&gt;I am currenly testing with splunk6.4.0 on MacOS, and I am trying to monitor searches on Search head Splunk 6.3.2 and Indexer Splunk 6.0.2.&lt;/P&gt;

&lt;P&gt;Could anyone comment on this?&lt;/P&gt;

&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 01:03:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275969#M83257</guid>
      <dc:creator>melonman</dc:creator>
      <dc:date>2016-05-31T01:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to track memory/cpu usage per search execution (on Search Head/Indexer)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275970#M83258</link>
      <description>&lt;P&gt;Hi melonman,&lt;/P&gt;

&lt;P&gt;Did you check out the Distributed Management Console &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.2/DMC/DMCoverview"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.2/DMC/DMCoverview&lt;/A&gt; this should provide data for the search head. &lt;BR /&gt;
Regarding the indexer try this search &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=YourHostNameHere sourcetype=splunk_resource_usage index=_introspection component=PerProcess "data.process_type"=search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2016 01:17:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275970#M83258</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2016-05-31T01:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to track memory/cpu usage per search execution (on Search Head/Indexer)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275971#M83259</link>
      <description>&lt;P&gt;Hi @melonman,&lt;/P&gt;

&lt;P&gt;If you want to search CPU and memory utilization per search execution with relevant information like which used executed and more.&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:36:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275971#M83259</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2019-06-05T13:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to track memory/cpu usage per search execution (on Search Head/Indexer)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275972#M83260</link>
      <description>&lt;P&gt;There are a few dashboards in &lt;A href="https://splunkbase.splunk.com/app/3796/" target="_blank"&gt;Alerts for Splunk Admins (splunkbase)&lt;/A&gt; or &lt;A href="https://github.com/gjanders/SplunkAdmins" target="_blank"&gt;github&lt;/A&gt; that might help with tracking down the issues here. There are also alerts  / reports to detect dashboard or saved searches with index=* or similar.&lt;/P&gt;

&lt;P&gt;In particular for the dashboards:&lt;BR /&gt;
troubleshooting_indexer_cpu&lt;BR /&gt;
troubleshooting_resource_usage_per_user&lt;BR /&gt;
detect_excessive_search_use&lt;/P&gt;

&lt;P&gt;Saved searches:&lt;BR /&gt;
SearchHeadLevel - Scheduled searches not specifying an index&lt;BR /&gt;
SearchHeadLevel - User - Dashboards searching all indexes&lt;BR /&gt;
SearchHeadLevel - Scheduled Searches without a configured earliest and latest time&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:49:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/275972#M83260</guid>
      <dc:creator>gjanders</dc:creator>
      <dc:date>2020-09-30T00:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to track memory/cpu usage per search execution (on Search Head/Indexer)?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/509907#M142545</link>
      <description>&lt;P&gt;Lots of great info and search queries in this thread (thanks),&amp;nbsp; splunk really is amazing!&lt;/P&gt;&lt;P&gt;One thing i can contribute is this search (below) that i often use to show all of my scheduled reports (it pairs nicely with some of the resource usage searches in this thread to help ID and modify your scheduled reports or their cron entry).&lt;/P&gt;&lt;P&gt;Also its nice to review this from time to time as its easy to loose track of cron scheduled reports you may no longer need to run (or run as frequently);&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rest /servicesNS/-/-/saved/searches  | search is_scheduled=1 | table author cron_schedule is_scheduled schedule_window title updated embed.enabled Search&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;thanks&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 20:04:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-track-memory-cpu-usage-per-search-execution-on-Search/m-p/509907#M142545</guid>
      <dc:creator>spunk311z</dc:creator>
      <dc:date>2020-07-19T20:04:42Z</dc:date>
    </item>
  </channel>
</rss>

