<?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: High CPU Utilization Report in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108206#M2484</link>
    <description>&lt;P&gt;Is a way to round up the max(Value) to 2 decimal places?&lt;/P&gt;</description>
    <pubDate>Thu, 27 Aug 2015 17:19:15 GMT</pubDate>
    <dc:creator>idab</dc:creator>
    <dc:date>2015-08-27T17:19:15Z</dc:date>
    <item>
      <title>High CPU Utilization Report</title>
      <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108202#M2480</link>
      <description>&lt;P&gt;I'm trying to write a report that will show me the 1 minute time spans from the last two days where a specific machine had a average CPU utilization (the field is called Value) of 75 or higher. This is what I have so far, but I'm having trouble finishing it. Thanks in advance for any help.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="perfmon" host="mymachine" collection="CPU Load" counter="% Processor Time" earliest="-2d@d"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jul 2013 20:35:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108202#M2480</guid>
      <dc:creator>fredclown</dc:creator>
      <dc:date>2013-07-26T20:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: High CPU Utilization Report</title>
      <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108203#M2481</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="perfmon" host="mymachine" collection="CPU Load" counter="% Processor Time" earliest="-2d@d"
| bucket _time span=1m
| stats avg(Value) as avg_CPU by _time
| where avg_CPU &amp;gt; = 75
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jul 2013 22:06:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108203#M2481</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2013-07-26T22:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: High CPU Utilization Report</title>
      <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108204#M2482</link>
      <description>&lt;P&gt;Just add &lt;STRONG&gt;Value &amp;gt;= 75&lt;/STRONG&gt; to limit which events splunk returns, then add the following.&lt;/P&gt;

&lt;P&gt;I am not sure how you want your minutes formatted, but here is what I have used in the past.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval DATETIME=strftime(_time, "%D %H:%M") | convert timeformat="%D %H:%M" mktime(DATETIME) AS DATETIME| fieldformat DATETIME=strftime(DATETIME,"%D %H:%M")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;For more options or google strftime.[CommonEvalFunctions][&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;]&lt;/P&gt;

&lt;P&gt;Incase you have two values per minute, I am using max() to take the highest value for that minute. You can use avg(), min() etc..&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| chart max(Value) by DATETIME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that this will leave some time periods missing.  If you want every minute listed, use &lt;STRONG&gt;| timechart span=1m max(value)&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;The whole thing looks like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="perfmon" host="mymachine" collection="CPU Load" counter="% Processor Time" earliest="-2d@d" 
Value&amp;gt;=75 
| eval DATETIME=strftime(_time, "%D %H:%M") 
| convert timeformat="%D %H:%M" mktime(DATETIME) AS DATETIME
| fieldformat DATETIME=strftime(DATETIME,"%D %H:%M")
| chart max(Value) by DATETIME
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The Datetime conversion trick I learned from the Answers system.  Wish I could find the right post and give them credit here.  It is very useful.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2013 22:11:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108204#M2482</guid>
      <dc:creator>frankloron</dc:creator>
      <dc:date>2013-07-26T22:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: High CPU Utilization Report</title>
      <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108205#M2483</link>
      <description>&lt;P&gt;This is exactly what I was looking for and very succinct. Thanks a ton!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2013 16:22:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108205#M2483</guid>
      <dc:creator>fredclown</dc:creator>
      <dc:date>2013-07-29T16:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: High CPU Utilization Report</title>
      <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108206#M2484</link>
      <description>&lt;P&gt;Is a way to round up the max(Value) to 2 decimal places?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2015 17:19:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108206#M2484</guid>
      <dc:creator>idab</dc:creator>
      <dc:date>2015-08-27T17:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: High CPU Utilization Report</title>
      <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108207#M2485</link>
      <description>&lt;P&gt;For any numerical values try: eval roundedMax=round(max(Value),2).  This is specified more completely in the eval documentation. &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Potentially handy also are eval variants 'ceiling' or 'floor' to FORCE the rounding up or down.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Apr 2016 14:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108207#M2485</guid>
      <dc:creator>andykuhn</dc:creator>
      <dc:date>2016-04-22T14:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: High CPU Utilization Report</title>
      <link>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108208#M2486</link>
      <description>&lt;P&gt;@Iguinn Thanks. &lt;BR /&gt;
Can you suggest how to restrict this search to a particular host where "avg_CPU" &amp;gt;75% for more than 5 minutes. &lt;BR /&gt;
i want to list down those such hosts. &lt;/P&gt;

&lt;P&gt;also in my query, i am doing it on "% Idle Time" &amp;lt;25%, hope that is also the same. &lt;/P&gt;

&lt;P&gt;Thanks in advance &lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2016 11:56:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/High-CPU-Utilization-Report/m-p/108208#M2486</guid>
      <dc:creator>saurabh_tek</dc:creator>
      <dc:date>2016-10-07T11:56:13Z</dc:date>
    </item>
  </channel>
</rss>

