Subversion Repositories ALCASAR

Rev

Rev 2770 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2770 Rev 2976
Line 69... Line 69...
69
            if (!empty($ar_buf_b[0]) && (!empty($ar_buf_n[3]) || ($ar_buf_n[3] === "0"))) {
69
            if (!empty($ar_buf_b[0]) && (!empty($ar_buf_n[3]) || ($ar_buf_n[3] === "0"))) {
70
                $dev = new NetDevice();
70
                $dev = new NetDevice();
71
                $dev->setName($ar_buf_b[0]);
71
                $dev->setName($ar_buf_b[0]);
72
                $dev->setTxBytes($ar_buf_b[4]);
72
                $dev->setTxBytes($ar_buf_b[4]);
73
                $dev->setRxBytes($ar_buf_b[3]);
73
                $dev->setRxBytes($ar_buf_b[3]);
-
 
74
                if (sizeof($ar_buf_n) == 9) {
74
                $dev->setErrors($ar_buf_n[4] + $ar_buf_n[6]);
75
                    $dev->setErrors($ar_buf_n[4] + $ar_buf_n[6]);
75
                $dev->setDrops($ar_buf_n[8]);
76
                    $dev->setDrops($ar_buf_n[8]);
-
 
77
                } elseif (sizeof($ar_buf_n) == 8) {
-
 
78
                    $dev->setDrops($ar_buf_n[4] + $ar_buf_n[6]);
-
 
79
                }
76
                if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS) && (CommonFunctions::executeProgram('ifconfig', $ar_buf_b[0].' 2>/dev/null', $bufr2, PSI_DEBUG))) {
80
                if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS) && (CommonFunctions::executeProgram('ifconfig', $ar_buf_b[0].' 2>/dev/null', $bufr2, PSI_DEBUG))) {
77
                    $speedinfo = "";
81
                    $speedinfo = "";
78
                    $bufe2 = preg_split("/\n/", $bufr2, -1, PREG_SPLIT_NO_EMPTY);
82
                    $bufe2 = preg_split("/\n/", $bufr2, -1, PREG_SPLIT_NO_EMPTY);
79
                    foreach ($bufe2 as $buf2) {
83
                    foreach ($bufe2 as $buf2) {
80
                        if (preg_match('/^\s+lladdr\s+(\S+)/i', $buf2, $ar_buf2)) {
84
                        if (preg_match('/^\s+lladdr\s+(\S+)/i', $buf2, $ar_buf2)) {