4 return date(DATE_RFC822,
$input);
8 if (
$input < 60)
return number_format(
$input, 2) .
' sec';
9 if (
$input < 60*60)
return number_format((
$input/60),2) .
' min';
10 if (
$input < 24*60*60)
return number_format((
$input/(60*60)),2) .
' hours';
11 return number_format(
$input/(24*60*60),2) .
' days';
21 if (
$input >= (1024*1024*1024*1024*1024*1024*1024*100)) {
22 $output = sprintf(
"%5ldEi",
$input / (1024*1024*1024*1024*1024*1024) );
23 }
else if (
$input >= (1024*1024*1024*1024*1024*1024*10)) {
24 $output = sprintf(
"%5.1fEi",
$input / (1024.0*1024.0*1024.0*1024.0*1024.0*1024.0) );
25 }
else if (
$input >= (1024*1024*1024*1024*1024*1024)) {
26 $output = sprintf(
"%5.2fEi",
$input / (1024.0*1024.0*1024.0*1024.0*1024.0*1024.0) );
29 }
else if (
$input >= (1024*1024*1024*1024*1024*100)) {
30 $output = sprintf(
"%5ldPi",
$input / (1024*1024*1024*1024*1024) );
31 }
else if (
$input >= (1024*1024*1024*1024*1024*10)) {
32 $output = sprintf(
"%5.1fPi",
$input / (1024.0*1024.0*1024.0*1024.0*1024.0) );
33 }
else if (
$input >= (1024*1024*1024*1024*1024)) {
34 $output = sprintf(
"%5.2fPi",
$input / (1024.0*1024.0*1024.0*1024.0*1024.0) );
36 }
else if (
$input >= (1024*1024*1024*1024*100)) {
38 }
else if (
$input >= (1024*1024*1024*1024*10)) {
39 $output = sprintf(
"%5.1fTi",
$input / (1024.0*1024.0*1024.0*1024.0) );
40 }
else if (
$input >= (1024*1024*1024*1024)) {
41 $output = sprintf(
"%5.2fTi",
$input / (1024.0*1024.0*1024.0*1024.0) );
44 }
else if (
$input >= (1024*1024*1024*100)) {
46 }
else if (
$input >= (1024*1024*1024*10)) {
47 $output = sprintf(
"%5.1fGi",
$input / (1024.0*1024.0*1024.0) );
48 }
else if (
$input >= (1024*1024*1024)) {
49 $output = sprintf(
"%5.2fGi",
$input / (1024.0*1024.0*1024.0) );
51 }
else if (
$input >= (1024*1024*100)) {
53 }
else if (
$input >= (1024*1024*10)) {
55 }
else if (
$input >= (1024*1024)) {
58 }
else if (
$input >= (1024 * 100)) {
60 }
else if (
$input >= (1024 * 10)) {
62 }
else if (
$input >= (1024)) {
82 'bytes' =>
'humanreadable',
83 'bytes_read' =>
'humanreadable',
84 'bytes_written' =>
'humanreadable',
85 'limit_maxbytes' =>
'humanreadable',
97 foreach($entry AS $k => $val) {
98 $entry[$k] = $func($val);
106 'accepting_conns' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:accepting_conns}'),
107 'auth_cmds' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:auth_cmds}'),
108 'auth_errors' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:auth_errors}'),
109 'bytes' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:bytes}'),
110 'bytes_read' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:bytes_read}'),
111 'bytes_written' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:bytes_written}'),
112 'cas_badval' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:cas_badval}'),
113 'cas_hits' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:cas_hits}'),
114 'cas_misses' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:cas_misses}'),
115 'cmd_flush' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:cmd_flush}'),
116 'cmd_get' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:cmd_get}'),
117 'cmd_set' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:cmd_set}'),
118 'cmd_touch' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:cmd_touch}'),
119 'connection_structures' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:connection_structures}'),
120 'conn_yields' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:conn_yields}'),
121 'curr_connections' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:curr_connections}'),
122 'curr_items' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:curr_items}'),
123 'decr_hits' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:decr_hits}'),
124 'decr_misses' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:decr_misses}'),
125 'delete_hits' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:delete_hits}'),
126 'delete_misses' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:delete_misses}'),
127 'expired_unfetched' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:expired_unfetched}'),
128 'evicted_unfetched' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:evicted_unfetched}'),
129 'evictions' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:evictions}'),
130 'get_hits' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:get_hits}'),
131 'get_misses' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:get_misses}'),
132 'hash_bytes' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:hash_bytes}'),
133 'hash_is_expanding' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:hash_is_expanding}'),
134 'hash_power_level' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:hash_power_level}'),
135 'incr_hits' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:incr_hits}'),
136 'incr_misses' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:incr_misses}'),
137 'libevent' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:libevent}'),
138 'limit_maxbytes' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:limit_maxbytes}'),
139 'listen_disabled_num' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:listen_disabled_num}'),
140 'pid' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:pid}'),
141 'pointer_size' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:pointer_size}'),
142 'reclaimed' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:reclaimed}'),
143 'reserved_fds' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:reserved_fds}'),
144 'rusage_system' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:rusage_system}'),
145 'rusage_user' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:rusage_user}'),
146 'threads' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:threads}'),
147 'time' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:time}'),
148 'total_connections' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:total_connections}'),
149 'total_items' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:total_items}'),
150 'touch_hits' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:touch_hits}'),
151 'touch_misses' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:touch_misses}'),
152 'uptime' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:uptime}'),
153 'version' => \
SimpleSAML\Locale\Translate::noop(
'{memcacheMonitor:memcachestat:version}'),
155 $t->data[
'title'] =
'Memcache stats';
foreach($stats AS $key=> &$entry) $t
static requireAdmin()
Require admin access to the current page.
Attribute-related utility methods.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
static getStats()
This function retrieves statistics about all memcache server groups.