<?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 How do I get Cache Hit ratio? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261328#M78430</link>
    <description>&lt;P&gt;I have cache hit as well as cache miss reports, How do i get the ratio of cache hit i.e, cache hit / (cache hit + cache miss)?&lt;/P&gt;</description>
    <pubDate>Mon, 23 May 2016 18:07:56 GMT</pubDate>
    <dc:creator>spandana9</dc:creator>
    <dc:date>2016-05-23T18:07:56Z</dc:date>
    <item>
      <title>How do I get Cache Hit ratio?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261328#M78430</link>
      <description>&lt;P&gt;I have cache hit as well as cache miss reports, How do i get the ratio of cache hit i.e, cache hit / (cache hit + cache miss)?&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 18:07:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261328#M78430</guid>
      <dc:creator>spandana9</dc:creator>
      <dc:date>2016-05-23T18:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Cache Hit ratio?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261329#M78431</link>
      <description>&lt;P&gt;... | eval ratio=cacheHit/(cacheHit+cacheMiss) | ...&lt;/P&gt;

&lt;P&gt;if cacheHit and cacheMiss arent fields...   and specifically arent integers, then you'll have to create your own with some eval magic like this example which creates counters based on finding patterns in the raw event data:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... 
 | eval cacheHits=if(match(_raw,"Pattern that is found in cache hit events"),cacheHits+1,cacheHits) 
 | eval cacheMisses=if(match(_raw,"Pattern that is found in cache miss events"),cacheMisses+1,cacheMisses) 
 | eval cacheHitRatio=cacheHits/(cacheHits+cacheMisses)
 | table cacheHits, cacheMisses, cacheHitRatio
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 May 2016 20:19:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261329#M78431</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-23T20:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Cache Hit ratio?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261330#M78432</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 20:20:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261330#M78432</guid>
      <dc:creator>spandana9</dc:creator>
      <dc:date>2016-05-23T20:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get Cache Hit ratio?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261331#M78433</link>
      <description>&lt;P&gt;If this worked as an answer, please use the "mark as answer" link below the answer.  The upvote is certainly appreciated as well.  Glad to help!&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 20:24:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-get-Cache-Hit-ratio/m-p/261331#M78433</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2016-05-23T20:24:22Z</dc:date>
    </item>
  </channel>
</rss>

