Merge branch '1.8.2' into devel
Conflicts: airtime_mvc/application/models/Dashboard.php python_apps/media-monitor/airtime-media-monitor-start python_apps/pypo/airtime-pypo-start python_apps/show-recorder/airtime-show-recorder-start
This commit is contained in:
commit
1540e593e4
12 changed files with 287 additions and 195 deletions
|
@ -7,6 +7,8 @@ require_once "$airtime_base_dir/library/php-amqplib/amqp.inc";
|
|||
|
||||
set_error_handler("myErrorHandler");
|
||||
|
||||
AirtimeCheck::GetCpuInfo();
|
||||
AirtimeCheck::GetRamInfo();
|
||||
AirtimeCheck::CheckOsTypeVersion();
|
||||
|
||||
AirtimeCheck::CheckConfigFilesExist();
|
||||
|
@ -157,6 +159,32 @@ class AirtimeCheck {
|
|||
output_status("ICECAST_PROCESS_ID", $status);
|
||||
}
|
||||
|
||||
public static function GetCpuInfo()
|
||||
{
|
||||
$command = "cat /proc/cpuinfo |grep -m 1 'model name' ";
|
||||
exec($command, $output, $result);
|
||||
|
||||
$choppedStr = split(":", $output[0]);
|
||||
$status = trim($choppedStr[1]);
|
||||
output_status("CPU", $status);
|
||||
}
|
||||
|
||||
public static function GetRamInfo()
|
||||
{
|
||||
$command = "cat /proc/meminfo |grep 'MemTotal' ";
|
||||
exec($command, $output, $result);
|
||||
$choppedStr = split(":", $output[0]);
|
||||
$status = trim($choppedStr[1]);
|
||||
output_status("Total RAM", $status);
|
||||
|
||||
$output = null;
|
||||
$command = "cat /proc/meminfo |grep 'MemFree' ";
|
||||
exec($command, $output, $result);
|
||||
$choppedStr = split(":", $output[0]);
|
||||
$status = trim($choppedStr[1]);
|
||||
output_status("Free RAM", $status);
|
||||
}
|
||||
|
||||
public static function CheckConfigFilesExist()
|
||||
{
|
||||
//echo PHP_EOL."Verifying Config Files in /etc/airtime".PHP_EOL;
|
||||
|
@ -381,6 +409,12 @@ class AirtimeCheck {
|
|||
$os_string = "Unknown";
|
||||
}
|
||||
|
||||
// Figure out if 32 or 64 bit
|
||||
$command = "file -b /sbin/init";
|
||||
exec($command, $output, $result);
|
||||
$splitStr = split(",", $output[0]);
|
||||
$os_string .= $splitStr[1];
|
||||
|
||||
output_status("OS", $os_string);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue