first time user with out of memory question
timeless
time at digg.com
Tue Jun 13 06:32:36 UTC 2006
dormando at rydia.net wrote:
>Alright, I just noticed something odd about your rusage numbers, sorry :)
>The protocol doc confirms that the stat is 'seconds.useconds'
>
>
Aha! You win. I was using a PHP stats collector for interfacing
Memcached to Cacti.
>Are you parsing the memcached stats with something that's goofing a bit? telnet to it and compare the numbers.
>
>
Indeed. Telnet says:
STAT rusage_user 5251.583637
STAT rusage_system 23525.710548
PHP script says:
foreach ($result as $serverStats) {
foreach ($serverStats as $statKey => $statVal) {
if ($statKey == "rusage_user" || $statKey == "rusage_system") {
$statVal = round($statVal * 1000);
}
echo "$statKey:$statVal ";
}
}
Thanks for the help with this. It'll make the Cacti graphs a bit more
clear. To avoid doing much work here, I'll probably modify the PHP stats
collector to do $statVal *= 1000000. It's losing 3 digits of precision
with that round().
--
timeless
More information about the memcached
mailing list