ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
hook_sanitycheck.php
Go to the documentation of this file.
1<?php
2
11 assert('is_array($hookinfo)');
12 assert('array_key_exists("errors", $hookinfo)');
13 assert('array_key_exists("info", $hookinfo)');
14
15 try {
17 } catch (Exception $e) {
18 $hookinfo['errors'][] = '[memcacheMonitor] Error parsing memcache configuration: ' . $e->getMessage();
19 return;
20 }
21
22 $allOK = TRUE;
23 foreach ($servers as $group) {
24 foreach ($group as $server => $status) {
25 if ($status === FALSE) {
26 $hookinfo['errors'][] = '[memcacheMonitor] No response from server: ' . $server;
27 $allOK = FALSE;
28 }
29 }
30 }
31
32 if ($allOK) {
33 $hookinfo['info'][] = '[memcacheMonitor] All servers responding.';
34 }
35}
An exception for terminatinating execution or to throw for unit testing.
static getRawStats()
Retrieve statistics directly in the form returned by getExtendedStats, for all server groups.
Definition: Memcache.php:482
$server
Definition: getUserInfo.php:12
$hookinfo
Definition: index.php:7
memcacheMonitor_hook_sanitycheck(&$hookinfo)
Sanity check for memcache servers.