help with stat

josh rotenberg joshrotenberg at gmail.com
Wed May 16 17:09:07 UTC 2007


>From the Cache::Memcached docs:

"Returns a hashref of statistical data regarding the memcache server(s) ... "

The result is a hash reference. If you want to get to certain values, try:

print $result->{cmd_get} . "\n";

etc.


On 5/16/07, Jeremy Reingold <jeremy.reingold at amd.com> wrote:
> Hi,
>
> I'm having trouble getting output from the stat function. Below is code:
>
> sub stat(){
>
>     $result = $mem->stats();
>     if(!$result){
>         print "Error in receiving stats\n";
>     }
>     else{
>         print "\nStatistics:\n";
>         print "$result\n";
>     }
>
> }
>
> Output:
>
> Statistics:
> HASH(0x824e254)
>
> Help.
>
> Thanks,
>
> --Jeremy
>
>
>


More information about the memcached mailing list