2024-09-01 13:29:59 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// get nginx data
|
|
|
|
function getNginxStatus() {
|
|
|
|
$status = trim(shell_exec('systemctl is-active nginx'));
|
|
|
|
return ($status === 'active') ? 'running' : 'not running';
|
|
|
|
}
|
|
|
|
function getNginxConnections() {
|
|
|
|
$connections = shell_exec("netstat -an | grep ':80' | wc -l");
|
|
|
|
return intval(trim($connections));
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-09-01 13:40:47 +00:00
|
|
|
// get prosody data
|
2024-09-01 13:29:59 +00:00
|
|
|
function getProsodyStatus() {
|
|
|
|
$status = trim(shell_exec('systemctl is-active prosody'));
|
|
|
|
return ($status === 'active') ? 'running' : 'not running';
|
|
|
|
}
|
2024-09-01 13:40:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
// get jicofo data
|
2024-09-01 13:29:59 +00:00
|
|
|
function getJicofoStatus() {
|
|
|
|
$status = trim(shell_exec('systemctl is-active jicofo'));
|
|
|
|
return ($status === 'active') ? 'running' : 'not running';
|
|
|
|
}
|
|
|
|
|
2024-09-01 13:40:47 +00:00
|
|
|
|
|
|
|
// get JVB data
|
|
|
|
function getJVBStatus() {
|
|
|
|
$status = trim(shell_exec('systemctl is-active jitsi-videobridge'));
|
|
|
|
return ($status === 'active') ? 'running' : 'not running';
|
|
|
|
}
|
|
|
|
|
2024-09-01 13:29:59 +00:00
|
|
|
?>
|