mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
14 lines
261 B
Perl
Executable File
14 lines
261 B
Perl
Executable File
# alive-monitor.pl
|
|
# Always returns OK - useful for remote monitoring
|
|
|
|
sub get_alive_status
|
|
{
|
|
local $out = &backquote_command("uptime 2>/dev/null");
|
|
return { 'up' => 1,
|
|
'desc' => $out =~ /\s+up\s+([^,]+),/ ? &text('alive_up', "$1")
|
|
: undef };
|
|
}
|
|
|
|
|
|
|