munin_apc.module 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. // $Id$
  3. /**
  4. * @file
  5. * APC instrumentation for Munin
  6. */
  7. /**
  8. * Implements hook_munin_api_info().
  9. *
  10. * @return
  11. * An array of Munin probes informations, index by probe name.
  12. */
  13. function munin_apc_munin_api_info() {
  14. $ret = array(
  15. 'munin_apc' => array(
  16. '#title' => t('PHP APC'),
  17. '#description' => t('Collect cache information for the Alternative PHP Cache'),
  18. 'total_size' => array(
  19. '#title' => t('Number of bytes allocated to APC'),
  20. '#type' => MUNIN_API_COUNTER,
  21. ),
  22. 'used_size' => array(
  23. '#title' => t('Number of bytes currently used by APC, either cached or deleted'),
  24. '#type' => MUNIN_API_COUNTER,
  25. ),
  26. 'num_hits' => array(
  27. '#title' => t('The number of hits since the last restart'),
  28. '#type' => MUNIN_API_COUNTER,
  29. ),
  30. 'num_misses' => array(
  31. '#title' => t('The number of misses since the last restart'),
  32. '#type' => MUNIN_API_COUNTER,
  33. ),
  34. 'hit_rate' => array(
  35. '#title' => t('This hit/miss ration since the last restart'),
  36. '#type' => MUNIN_API_GAUGE,
  37. ),
  38. 'num_insertions' => array(
  39. '#title' => t('The number of insertions since the last restart'),
  40. '#type' => MUNIN_API_COUNTER,
  41. ),
  42. 'cache_entries' => array(
  43. '#title' => t('The number of cache entries'),
  44. '#type' => MUNIN_API_GAUGE,
  45. ),
  46. 'deleted_entries' => array(
  47. '#title' => t('The number of deleted entries lingering'),
  48. '#type' => MUNIN_API_GAUGE,
  49. ),
  50. ),
  51. );
  52. return $ret;
  53. }