CC-3797: Feedback Metrics "Show Me What I Am Sending" doesnt show all of the fields that are being sent

- system info from airtime-check-system now displays in "Show Me What I Am Sending"
This commit is contained in:
denise 2012-05-14 18:10:20 -04:00
parent c24a8a2308
commit 6add79268f
2 changed files with 7 additions and 3 deletions

View File

@ -400,7 +400,6 @@ class Application_Model_Preference
public static function GetSystemInfo($returnArray=false, $p_testing=false)
{
exec('/usr/bin/airtime-check-system --no-color', $output);
$output = preg_replace('/\s+/', ' ', $output);
$systemInfoArray = array();
@ -409,7 +408,12 @@ class Application_Model_Preference
if(isset($info[1])){
$key = str_replace(' ', '_', trim($info[0]));
$key = strtoupper($key);
$systemInfoArray[$key] = $info[1];
if ($key == 'WEB_SERVER' || $key == 'CPU' || $key == 'OS' || $key == 'TOTAL_RAM' ||
$key == 'FREE_RAM' || $key == 'AIRTIME_VERSION' || $key == 'KERNAL_VERSION' ||
$key == 'MACHINE_ARCHITECTURE' || $key == 'TOTAL_MEMORY_MBYTES' || $key == 'TOTAL_SWAP_MBYTES' ||
$key == 'PLAYOUT_ENGINE_CPU_PERC' ) {
$systemInfoArray[$key] = $info[1];
}
}
}

View File

@ -34,7 +34,7 @@ class AirtimeCheck {
{
// Need to check that we are superuser before running this.
$euid = posix_geteuid();
$user = posix_getlogin();
$user = exec('whoami');
if($euid != 0 && $user != "www-data"){
echo "Must be root user.\n";
exit(1);