<?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 Calculate a % based on two Windows Perfmon Counters in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculate-a-based-on-two-Windows-Perfmon-Counters/m-p/107538#M183391</link>
    <description>&lt;P&gt;I am trying to calculate the percentage usage of disk from an application based on it's perfmon counters.  Unfortunately it doesn't give me this value as a counter.  I have "Data File Size" and "Data File Space Used".  But as a newbie, how to do take the Value fields into something I can use?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 02 Apr 2012 23:49:37 GMT</pubDate>
    <dc:creator>chrismor</dc:creator>
    <dc:date>2012-04-02T23:49:37Z</dc:date>
    <item>
      <title>Calculate a % based on two Windows Perfmon Counters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-a-based-on-two-Windows-Perfmon-Counters/m-p/107538#M183391</link>
      <description>&lt;P&gt;I am trying to calculate the percentage usage of disk from an application based on it's perfmon counters.  Unfortunately it doesn't give me this value as a counter.  I have "Data File Size" and "Data File Space Used".  But as a newbie, how to do take the Value fields into something I can use?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2012 23:49:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-a-based-on-two-Windows-Perfmon-Counters/m-p/107538#M183391</guid>
      <dc:creator>chrismor</dc:creator>
      <dc:date>2012-04-02T23:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate a % based on two Windows Perfmon Counters</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculate-a-based-on-two-Windows-Perfmon-Counters/m-p/107539#M183392</link>
      <description>&lt;P&gt;I can't tell from the counter names what the difference is between them, so my formula may be off, but I got something like the following to work:&lt;/P&gt;

&lt;P&gt;&lt;PRE&gt;&lt;CODE&gt;index=perfmon counter="Data File Size" | stats avg(Value) as Avg1 by host | join host [search index=perfmon counter="Data File Space Used" | stats avg(Value) as Avg2 by host] | eval Ratio=Avg1/Avg2 | fields host,Ratio&lt;/CODE&gt;&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;I feel like there should be a solution that doesn't run a join, but if your data isn't too extensive this might work.  Let me know if that helps.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/4.3.1/SearchReference/Eval"&gt;http://docs.splunk.com/Documentation/Splunk/4.3.1/SearchReference/Eval&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2012 21:35:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculate-a-based-on-two-Windows-Perfmon-Counters/m-p/107539#M183392</guid>
      <dc:creator>cphair</dc:creator>
      <dc:date>2012-04-03T21:35:43Z</dc:date>
    </item>
  </channel>
</rss>

