<?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: Calculating the disk read  write ratio in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322340#M175391</link>
    <description>&lt;P&gt;You are quite welcome.  Please accept one of the helpful answers.  gpradeepkumarreddy's is fine - it got you pretty much there.&lt;/P&gt;</description>
    <pubDate>Thu, 23 Feb 2017 18:51:45 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-02-23T18:51:45Z</dc:date>
    <item>
      <title>Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322332#M175383</link>
      <description>&lt;P&gt;I have this below query  . After the summation  of values is calculated , i have to find the ratio of read versus write  and have to modify this query only for that . How to do it?&lt;/P&gt;

&lt;P&gt;index=nmon  host=*  type=DISKWRITE  OR  type=DISKREAD | stats sum(value) by type&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 12:18:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322332#M175383</guid>
      <dc:creator>shabdadev</dc:creator>
      <dc:date>2017-02-22T12:18:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322333#M175384</link>
      <description>&lt;P&gt;Possibly solvable without this, but it would be easier and quicker (with far fewer false starts, probably) if we had a few of the original events to look at.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 12:42:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322333#M175384</guid>
      <dc:creator>Richfez</dc:creator>
      <dc:date>2017-02-22T12:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322334#M175385</link>
      <description>&lt;P&gt;I cant provide the events . can you please provide the solution to this ......each  event of diskread  has a value and same is the case with  diskwrite .  I have to find the disk read write ratio .&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2017 13:04:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322334#M175385</guid>
      <dc:creator>shabdadev</dc:creator>
      <dc:date>2017-02-22T13:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322335#M175386</link>
      <description>&lt;P&gt;You can try something like this&lt;/P&gt;

&lt;PRE&gt;index=nmon host=* type=DISKWRITE OR type=DISKREAD | stats sum(value) as value by type | eventstats sum(value) as total | head 1 | eval ratio = value/total&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2017 14:58:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322335#M175386</guid>
      <dc:creator>pradeepkumarg</dc:creator>
      <dc:date>2017-02-22T14:58:01Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322336#M175387</link>
      <description>&lt;P&gt;See  till here &lt;BR /&gt;
 index=nmon host=* type=DISKWRITE OR type=DISKREAD | stats sum(value) as value by type&lt;/P&gt;

&lt;P&gt;query returns the output like this :&lt;/P&gt;

&lt;P&gt;type         sum(value)&lt;/P&gt;

&lt;P&gt;diskread      2.3445&lt;/P&gt;

&lt;P&gt;diskwrite     3.56666&lt;/P&gt;

&lt;P&gt;Aftert this  i want to compute the ratio of   read versus write  i.e   diskread / diskwrite  &lt;/P&gt;

&lt;P&gt;how to do this one?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 05:36:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322336#M175387</guid>
      <dc:creator>shabdadev</dc:creator>
      <dc:date>2017-02-23T05:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322337#M175388</link>
      <description>&lt;P&gt;try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nmon host=* type=DISKWRITE OR type=DISKREAD 
| eval WriteValue=if(type="DISKWRITE", value,0)
| eval ReadValue=if(type="DISKREAD", value,0)
| stats count, sum(ReadValue) as ReadValue, sum(WriteValue) as WriteValue,  sum(value) as TotalValue
| eval ReadPercent=ReadValue/TotalValue
| eval WritePercent=WriteValue/TotalValue,
| eval ReadRatio=ReadValue/If(WriteValue==0,0.01,WriteValue)
| table count, ReadValue, ReadPercent, WriteValue, WritePercent, ReadRatio 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;It calculates a few extra things so you can check the results.  After you've verified it, you can remove anything you don't want to see.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 06:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322337#M175388</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-23T06:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322338#M175389</link>
      <description>&lt;P&gt;Thanks a lot  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; .it worked &lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 06:12:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322338#M175389</guid>
      <dc:creator>shabdadev</dc:creator>
      <dc:date>2017-02-23T06:12:36Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322339#M175390</link>
      <description>&lt;P&gt;Try the following.&lt;/P&gt;

&lt;P&gt;index=nmon host=* type=DISKWRITE OR type=DISKREAD &lt;BR /&gt;
    | stats sum(eval(type=DISKWRITE)) AS DiskWriteSum, sum(eval(type=DISKREAD)) AS DiskReadSum&lt;BR /&gt;
    | eval Ratio = round((DiskWriteSum/DiskReadSum),2)&lt;/P&gt;

&lt;P&gt;You can omit the rounding off, if required. Hope this works fine.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 08:07:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322339#M175390</guid>
      <dc:creator>Honey0308</dc:creator>
      <dc:date>2017-02-23T08:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the disk read  write ratio</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322340#M175391</link>
      <description>&lt;P&gt;You are quite welcome.  Please accept one of the helpful answers.  gpradeepkumarreddy's is fine - it got you pretty much there.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2017 18:51:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Calculating-the-disk-read-write-ratio/m-p/322340#M175391</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-23T18:51:45Z</dc:date>
    </item>
  </channel>
</rss>

