Forum Discussion

scott_sams_8256's avatar
scott_sams_8256
Icon for Nimbostratus rankNimbostratus
May 18, 2010

tryin to understand the command structure for an incontrol command

i have been toying with the powershell/icontrol functions and wanted to do the following.

 

 

 

list a ram cache and evict a ram cache. the http profile with the name of "http" for this scenario.

 

 

i dont quite understand the syntax.

 

 

i think the command i want is

 

$ic.LocalLB.RAMCacheInformation

 

 

is that correct? when i enter this i get nothing back.

 

can someone help me just display the http profile and dump the cache on it?

 

 

thanks

 

 

 

7 Replies

  • $ic.LocalLBRamCacheInformation is the interface containing all of the iControl methods. You need to reference the methods in that interface. You can find the docs here

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/LocalLB__RAMCacheInformation.html

     

     

    Here's a quick script I whipped up showing how to query the entries in the RAM cache with the get_ramcache_entry() method.

     

     

    http://devcentral.f5.com/wiki/default.aspx/iControl/PowerShellRAMCache.html

     

     

    Hope that is enough to get you started. Post back here if you need help moving forward.

     

     

    -Joe

     

  • thanks, the script works great. i am by no means a programmer so i struggle with most of this. i will work to see if i can morph that into dumping the cache.

     

    i appreciate this!

     

    scott
  • No problem at all and I'm glad to help. Please let me know if you get stuck. I find it's better to give folks something to start with and then let them experiment a bit to get things working on their own. If you get stuck with the evicting of the cache, let me know and I'll give you some pointers. The key with PowerShell is allocating the structures properly with the New-Object cmdlet like I did in the referenced sample.

     

     

    -Joe

     

  • i am stuck. and i got woken up 4 times last night to flush ram cache while dev was doing changes. i wonder should they adjust their cache timeouts or is this normal?
  • Not sure how to answer that one. Typically, you decrease your cache times during maintenance windows but that will depend on how you are setup.

     

  • gotcha. i am a network guy so this is outside my realm. i was wondering if they could do that for their maintenance page - have it expire every 60 seconds or so.

     

     

    if you feel super motivated and wanted to show me how you do the dump cache with your quick skills it would be appreciated!
  • if anyone knows how to mod this to clear my entries, it would be appreciated. i am really in need of this ability.

     

    also, what level of user is required to clear ram cache? administrator?