ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
hook_sanitycheck.php File Reference

Go to the source code of this file.

Functions

 memcacheMonitor_hook_sanitycheck (&$hookinfo)
 Sanity check for memcache servers. More...
 

Function Documentation

◆ memcacheMonitor_hook_sanitycheck()

memcacheMonitor_hook_sanitycheck ( $hookinfo)

Sanity check for memcache servers.

This function verifies that all memcache servers work.

Parameters
array&$hookinfohookinfo

Definition at line 10 of file hook_sanitycheck.php.

10 {
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}
static getRawStats()
Retrieve statistics directly in the form returned by getExtendedStats, for all server groups.
Definition: Memcache.php:481
$hookinfo
Definition: index.php:7
$server
Definition: sabredav.php:48

References $hookinfo, $server, and SimpleSAML_Memcache\getRawStats().

+ Here is the call graph for this function: