<?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: Cpu and memory usage in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367643#M93360</link>
    <description>&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMI:LocalMainMemory]
interval = &amp;lt;Interval_Time&amp;gt;
wql = select CommittedBytes, AvailableBytes, PercentCommittedBytesInUse, Caption from \
 Win32_PerfFormattedData_PerfOS_Memory
disabled = 0
index = &amp;lt;IndexName&amp;gt;

[WMI:process]
index = &amp;lt;IndexName&amp;gt;
disabled = 0
interval = &amp;lt;Interval_Time&amp;gt;
wql = Select IDProcess,Name,PercentProcessorTime,TimeStamp_Sys100NS from Win32_PerfRawData_PerfProc_Process
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search Query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;INdexName&amp;gt; sourcetype="WMI:process" Name!=_Total Name!=Idle
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;INdexName&amp;gt; sourcetype="WMI:process" Name!=_Total Name!=Idle
| reverse | streamstats current=f last(PercentProcessorTime) as last_PercentProcessorTime last(Timestamp_Sys100NS) as last_Timestamp_Sys100NS by Name
| eval cputime = 100 * (PercentProcessorTime - last_PercentProcessorTime) / (Timestamp_Sys100NS - last_Timestamp_Sys100NS)
| search cputime &amp;gt; 0
| timechart limit=50 useother=f avg(cputime) by Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Feb 2018 04:37:44 GMT</pubDate>
    <dc:creator>ansif</dc:creator>
    <dc:date>2018-02-07T04:37:44Z</dc:date>
    <item>
      <title>Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367642#M93359</link>
      <description>&lt;P&gt;This probably has been asked many many times but there is still not a good answer out there.i simply want to use forwarder to collect data from my servers and send it to splunk and get a basic cpu memory usage.i am using wmi and my first challenge is what my config file would be.i have something like this which i found it on the net but not sure what is what exactly&lt;/P&gt;

&lt;P&gt;[WMI:process]&lt;BR /&gt;
disabled = 0&lt;BR /&gt;
interval = 30&lt;BR /&gt;
wql = Select IDProcess,Name,PercentProcessorTime,TimeStamp_Sys100NS from Win32_PerfRawData_PerfProc_Process&lt;BR /&gt;
index = pa&lt;/P&gt;

&lt;P&gt;my question is,what should use in wql to pull the data and once i have he config file what would my search would be?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:00:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367642#M93359</guid>
      <dc:creator>carlyleadmin</dc:creator>
      <dc:date>2020-09-29T18:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367643#M93360</link>
      <description>&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[WMI:LocalMainMemory]
interval = &amp;lt;Interval_Time&amp;gt;
wql = select CommittedBytes, AvailableBytes, PercentCommittedBytesInUse, Caption from \
 Win32_PerfFormattedData_PerfOS_Memory
disabled = 0
index = &amp;lt;IndexName&amp;gt;

[WMI:process]
index = &amp;lt;IndexName&amp;gt;
disabled = 0
interval = &amp;lt;Interval_Time&amp;gt;
wql = Select IDProcess,Name,PercentProcessorTime,TimeStamp_Sys100NS from Win32_PerfRawData_PerfProc_Process
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search Query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;INdexName&amp;gt; sourcetype="WMI:process" Name!=_Total Name!=Idle
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;INdexName&amp;gt; sourcetype="WMI:process" Name!=_Total Name!=Idle
| reverse | streamstats current=f last(PercentProcessorTime) as last_PercentProcessorTime last(Timestamp_Sys100NS) as last_Timestamp_Sys100NS by Name
| eval cputime = 100 * (PercentProcessorTime - last_PercentProcessorTime) / (Timestamp_Sys100NS - last_Timestamp_Sys100NS)
| search cputime &amp;gt; 0
| timechart limit=50 useother=f avg(cputime) by Name
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 04:37:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367643#M93360</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-02-07T04:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367644#M93361</link>
      <description>&lt;P&gt;Ansif,&lt;/P&gt;

&lt;P&gt;i apologize for the late response.i implemented your query and it seems to be working.i just changed the last bit to get a timechart by host.my question is these numbers don't make sense to me.i woudl like to get something in percentage if possible can you help with the?&lt;/P&gt;

&lt;P&gt;sourcetype="WMI:CPU" index=main sourcetype="WMI:CPU" Name!=_Total Name!=Idle Name!=_Total Name!=Idle&lt;BR /&gt;
 | streamstats current=f last(PercentProcessorTime) as last_PercentProcessorTime last(Timestamp_Sys100NS) as last_Timestamp_Sys100NS by Name&lt;BR /&gt;
 | eval cputime = 100 * (PercentProcessorTime - last_PercentProcessorTime) / (Timestamp_Sys100NS - last_Timestamp_Sys100NS)&lt;BR /&gt;
 | search cputime &amp;gt; 0&lt;BR /&gt;
 | timechart  span=10m avg(cputime) by host&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367644#M93361</guid>
      <dc:creator>carlyleadmin</dc:creator>
      <dc:date>2020-09-29T18:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367645#M93362</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4347i7E55D52DD1FEF906/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Feb 2018 18:59:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367645#M93362</guid>
      <dc:creator>carlyleadmin</dc:creator>
      <dc:date>2018-02-09T18:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367646#M93363</link>
      <description>&lt;P&gt;Can you share your current values and expected values?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 04:51:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367646#M93363</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-02-12T04:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367647#M93364</link>
      <description>&lt;P&gt;Ansif,&lt;/P&gt;

&lt;P&gt;here are the results,as i said it before i want to get the avg cpu by host.i will add the images.these numbers are huge.i want to get something like cpu is  at 20% or 5%.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 12:50:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367647#M93364</guid>
      <dc:creator>carlyleadmin</dc:creator>
      <dc:date>2018-02-12T12:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367648#M93365</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4348iFC06730EF34F2E5F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 12:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367648#M93365</guid>
      <dc:creator>carlyleadmin</dc:creator>
      <dc:date>2018-02-12T12:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367649#M93366</link>
      <description>&lt;P&gt;Ansif,&lt;BR /&gt;
instead of getting by all the processors i need just one number for everything so that's why i did by host,but not sure if that number is right or what it means &lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/4349iE8673BEA559435F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 12:54:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367649#M93366</guid>
      <dc:creator>carlyleadmin</dc:creator>
      <dc:date>2018-02-12T12:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367650#M93367</link>
      <description>&lt;P&gt;inputs.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;## Processes
[WMI:LocalProcesses]
interval = 30
wql = SELECT Name, IDProcess, PrivateBytes, PercentProcessorTime FROM Win32_PerfFormattedData_PerfProc_Process
index = windows
disabled =0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Search:&lt;/P&gt;

&lt;P&gt;sourcetype=WMI:LocalProcesses&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2018 14:43:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367650#M93367</guid>
      <dc:creator>ansif</dc:creator>
      <dc:date>2018-02-12T14:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367651#M93368</link>
      <description>&lt;P&gt;Ansif,&lt;/P&gt;

&lt;P&gt;First of all ,thank you for taking the time to  trying to help me out and i apologize in advance if i am not making this easy for you.&lt;BR /&gt;
i added the stanza to my wmi and getting the data but don't think it is giving me the correct data or i might be using the wrong query.is the "percentprocessortime" field what i am going to use?if that is,then why do i need "privatebytes"? &lt;/P&gt;

&lt;P&gt;so this is what i am searching&lt;/P&gt;

&lt;P&gt;index=5sv sourcetype="WMI:LocalProcesses" host=ap5sv  Name!=_Total Name!=Idle Name!=_Total Name!=Idle|search PercentProcessorTime &amp;gt; 0|timechart span=4h eval(round(avg(PercentProcessorTime),0)) by host&lt;/P&gt;

&lt;P&gt;i actually tried running this in realtime and going into the host machine at the same time and running some processes.numbers are close,but not sure if they are accurate.&lt;/P&gt;

&lt;P&gt;can you tell me if this is correct?Thanks for all the help&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:00:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367651#M93368</guid>
      <dc:creator>carlyleadmin</dc:creator>
      <dc:date>2020-09-29T18:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cpu and memory usage</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367652#M93369</link>
      <description>&lt;P&gt;Hello Ansif,&lt;/P&gt;

&lt;P&gt;I have an idea which would be helpful for you.&lt;/P&gt;

&lt;P&gt;I know its too late answer.&lt;/P&gt;

&lt;P&gt;Please find the below query which would list the processes list consuming more than certain amount of memory,&lt;/P&gt;

&lt;P&gt;index="wmi_perfmon" source="WMI:process" Name!=_Total Name!=Idle&lt;BR /&gt;
| reverse | streamstats current=f last(PercentProcessorTime) as last_PercentProcessorTime last(Timestamp_Sys100NS) as last_Timestamp_Sys100NS by Name&lt;BR /&gt;
| eval cputime = 100 * (PercentProcessorTime - last_PercentProcessorTime) / (Timestamp_Sys100NS - last_Timestamp_Sys100NS)&lt;BR /&gt;
| search cputime &amp;gt; 0&lt;BR /&gt;
| stats avg(cputime) as CPU_Time by Name&lt;BR /&gt;
| where CPU_Time &amp;gt; 10&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Cpu-and-memory-usage/m-p/367652#M93369</guid>
      <dc:creator>Nvijay92</dc:creator>
      <dc:date>2020-09-30T03:26:49Z</dc:date>
    </item>
  </channel>
</rss>

