troubles with cache dump

Hi

I want see what is in the cache.

So the following link does it but I remark strange behavior with it:

http://devcentral.f5.com/wiki/defau…trace.html

Independently what is configured in my http profiles the irule works sometimes and sometimes not?

When I execute the command:

b http show | grep “RAM cache (entries”

| RAM cache (entries, size, evict) = (15, 53974, 0)

I see hat there are 15 objects are in the ramcache.

But if I execute the iRule I just get the following:

CACHE DUMP

Cache size - 20321 
Cache count- 8 
  Entity - Pos (0008) Local Hits (00000/00000) Remote Hits (00000/00000) Served (027) Age (027) Score (0000) Key - 'www.mydom.net/imgweb/2/V5/misc/arrow_white.gif'
  Entity - Pos (0007) Local Hits (00000/00000) Remote Hits (00000/00000) Served (029) Age (029) Score (0000) Key - 'www.mydom.net/imgweb/2/v4/dyn/btn/Fondue-Raclette-Set_de.jpg'
  Entity - Pos (0006) Local Hits (00000/00000) Remote Hits (00000/00000) Served (029) Age (029) Score (0000) Key - 'www.mydom.net/pages/dynhp/de/hppic_2/3.htmlgzip,deflate,sdch'
  Entity - Pos (0005) Local Hits (00001/00000) Remote Hits (00001/00000) Served (000) Age (981) Score (0004) Key - 'www.mydom.net/favicon.ico'
  Entity - Pos (0004) Local Hits (00000/00000) Remote Hits (00000/00000) Served (1081) Age (1081) Score (0000) Key - 'www.mydom.net/pages/dynhp/de/btn/2.htmlgzip,deflate,sdch'
  Entity - Pos (0003) Local Hits (00000/00000) Remote Hits (00000/00000) Served (1081) Age (1081) Score (0000) Key - 'www.mydom.net/pages/dynhp/de/btn_3/3.htmlgzip,deflate,sdch'
  Entity - Pos (0002) Local Hits (00003/00000) Remote Hits (00003/00000) Served (1129) Age (1133) Score (0000) Key - 'www.mydom.net/ImgWeb/2/V3/mail/channels_de_ms.gif'
  Entity - Pos (0001) Local Hits (00000/00001) Remote Hits (00000/00001) Served (1133) Age (1133) Score (0000) Key - 'www.mydom.net/ImgWeb/2/V3/mail/logo.gif'
Why is that as different as I see???
thx for any help
bb

Hi Bigbrother,

I wonder if the cache dump run from an iRule returns just that TMM instance’s cache and the bigpipe command returns all TMMs’ cache info. Are you on a platform and version with two TMM’s running by chance?

You could open a support case to check on this.

Aaron

Hi hoolio

Yes the platfrom (LTM 6400) has more then one tmm instance as you can see:

Nov 4 04:15:39 local/tmm err tmm[4791]: 01010028:3: No members available for pool pool_webserver_test

Nov 4 04:15:39 local/tmm1 err tmm1[4792]: 01010028:3: No members available for pool pool_webserver_test

Thanx for your answer but the strange behavior is if I clear the ramcache…

“bigpipe profile http http_myprofile ramcache entry all delete”

…then I get still the same cache dump trace back even “b http show” tells me that no object is cached???

This profile (http_myprofile) is assigned to the virtual server which has also the irule for cache::trace assigned.

My only target is to check what is in the cache on the F5 box and what not. If I include or exclude something I want to check if this really happens.

That’s why I use this irule. Just to try to find a way to have more transparency on what is going on our LB.

What do you think about?

thanx for help

bb

Hrm… can you post the iRule you’re testing with?

Thanks, Aaron

Hi hoolio

Here is the rule:

when RULE_INIT {

set static::cache “”

}

when HTTP_REQUEST {

if { [HTTP::uri] ends_with “/aracache” } {

HTTP::respond 200 content “CACHE DUMP\r\n\r\n$static::cache\r\n\r\n”

}

}

when CACHE_RESPONSE {

CACHE::header insert X-Via F5-LB

set static::cache [CACHE::trace]

}

This does respond something but if I clear the cache then it still respond the same entries even if they are cleard???

Thanx for your help

bb

Hi BB,

I think the issue might be the use of a static variable to store the CACHE::trace output. Can you try this example instead to make a request to a URI which ends in /arachache. Until we figure this out, it would be safest to test this on a separate test virtual server.

when HTTP_REQUEST {

    Check if request is to our special cache dump URI
   if { [HTTP::uri] ends_with "/aracache" } {

       Force this request to be answered from cache
      CACHE::enable
      set cache_trace 1

   } else {
      set cache_trace 0      
   }
}
when CACHE_RESPONSE {

    Check if request was for a cache trace
   if { $cache_trace }{
      HTTP::respond content "Cache trace output:\r\n\r\n[CACHE::trace]\r\n\r\n"
   }
}

Thanks, Aaron

Hi Aaron

I tested your iRule like I did before with /aracache but I got a 404 response?

Thanx for your help