<?php $memcache_host="127.0.0.1"; $memcache_port="11211"; $memcache = new Memcache; $memcache->connect($memcache_host,$memcache_port) or die ("Cannot connect"); $return=($memcache->getStats()); foreach ($return as $key => $value) { echo $key." : ".$value."<br>"; } ?>
A Linux blog by ioMeWeekly, includes tutorials, news, help, programming, tips and how-to guides for opensource applications.
Monday 8 April 2013
How to display memcache statistics with php
To display memcache statistics, you can create a php script as shown below. This scripts uses "getStats" command to display the statistics. You can also format it into a html table.
Labels:
memcache
,
php
,
statistics
,
status
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment