<?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 Need CPU and Memory peak utilization of multiple VM's in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Need-CPU-and-Memory-peak-utilization-of-multiple-VM-s/m-p/496133#M84625</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;
I am very new to Splunk.&lt;/P&gt;

&lt;P&gt;My organisation uses Splunk for all infra monitoring, I am trying to get the "Peak CPU average" (or) the highest CPU hit per instance in last 24 hours of all my Azure VM's (it's Windows and Linux combo).&lt;/P&gt;

&lt;P&gt;I am able to get average average using bellow query, but I need peak average - Can you please help.&lt;/P&gt;

&lt;P&gt;host=AZR* index="perfmon" source="Perfmon:CPU" counter="% Processor Time" | stats avg(Value) as avgcpu by host&lt;/P&gt;

&lt;P&gt;host=AZR* index="perfmon" source="Perfmon:Memory" counter="% Committed Bytes In Use" | stats avg(Value) as AvgMemory by host&lt;/P&gt;</description>
    <pubDate>Sun, 26 Jan 2020 11:22:46 GMT</pubDate>
    <dc:creator>bhanue</dc:creator>
    <dc:date>2020-01-26T11:22:46Z</dc:date>
    <item>
      <title>Need CPU and Memory peak utilization of multiple VM's</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-CPU-and-Memory-peak-utilization-of-multiple-VM-s/m-p/496133#M84625</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;
I am very new to Splunk.&lt;/P&gt;

&lt;P&gt;My organisation uses Splunk for all infra monitoring, I am trying to get the "Peak CPU average" (or) the highest CPU hit per instance in last 24 hours of all my Azure VM's (it's Windows and Linux combo).&lt;/P&gt;

&lt;P&gt;I am able to get average average using bellow query, but I need peak average - Can you please help.&lt;/P&gt;

&lt;P&gt;host=AZR* index="perfmon" source="Perfmon:CPU" counter="% Processor Time" | stats avg(Value) as avgcpu by host&lt;/P&gt;

&lt;P&gt;host=AZR* index="perfmon" source="Perfmon:Memory" counter="% Committed Bytes In Use" | stats avg(Value) as AvgMemory by host&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jan 2020 11:22:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-CPU-and-Memory-peak-utilization-of-multiple-VM-s/m-p/496133#M84625</guid>
      <dc:creator>bhanue</dc:creator>
      <dc:date>2020-01-26T11:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need CPU and Memory peak utilization of multiple VM's</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Need-CPU-and-Memory-peak-utilization-of-multiple-VM-s/m-p/496134#M84626</link>
      <description>&lt;P&gt;There are several ways to do this - use &lt;CODE&gt;|stats max(Value)&lt;/CODE&gt; for the highest value across your result set &lt;BR /&gt;
If you want the peak average value, you can use your existing search, and just massage the results a bit with something like&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...| stats avg(Value) as avgcpu by host|sort - avgcpu|head 1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If you wanted to use the stats function again, you could instead do:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...| stats avg(Value) as avgcpu by host|stats max(avgcpu) as maxAvgCpu by host&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Jan 2020 11:31:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Need-CPU-and-Memory-peak-utilization-of-multiple-VM-s/m-p/496134#M84626</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-01-26T11:31:49Z</dc:date>
    </item>
  </channel>
</rss>

