Despite Zend’s OPcache being available in PHP 5.5, a lot of people – myself included – still use the tried and tested Alternative PHP Cache (APC) on older versions of PHP. Although APC tries its best to have a ‘set it and forget it’ approach with very sensible and effective defaults, if you want to get the best performance out of it then you should consider monitoring the status of the cache.
I use Cacti almost exclusively on my linux machines to monitor the status of various system processes. Despite usually having no problem finding scripts to monitor just about everything, I’ve been relatively disappointed in the availability of APC monitoring scripts for Cacti so I’ve created my own. Only requirements are wget on the server hosting Cacti (you likely already have this) and the ability for said server to access a webpage on the PHP server being monitored. (more…)