Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 3036 → Rev 3037

/web/acc/phpsysinfo/includes/os/class.HPUX.inc.php
27,6 → 27,11
class HPUX extends OS
{
/**
* uptime command result.
*/
private $_uptime = null;
 
/**
* Virtual Host Name
*
* @return void
33,7 → 38,7
*/
private function _hostname()
{
if (PSI_USE_VHOST === true) {
if (PSI_USE_VHOST) {
if (CommonFunctions::readenv('SERVER_NAME', $hnm)) $this->sys->setHostname($hnm);
} else {
if (CommonFunctions::executeProgram('hostname', '', $ret)) {
62,8 → 67,8
*/
private function _uptime()
{
if (CommonFunctions::executeProgram('uptime', '', $buf)) {
if (preg_match("/up (\d+) days,\s*(\d+):(\d+),/", $buf, $ar_buf)) {
if (($this->_uptime !== null) || CommonFunctions::executeProgram('uptime', '', $this->_uptime)) {
if (preg_match("/up (\d+) days,\s*(\d+):(\d+),/", $this->_uptime, $ar_buf)) {
$min = $ar_buf[3];
$hours = $ar_buf[2];
$days = $ar_buf[1];
80,8 → 85,8
*/
private function _loadavg()
{
if (CommonFunctions::executeProgram('uptime', '', $buf)) {
if (preg_match("/average: (.*), (.*), (.*)$/", $buf, $ar_buf)) {
if (($this->_uptime !== null) || CommonFunctions::executeProgram('uptime', '', $this->_uptime)) {
if (preg_match("/average: (.*), (.*), (.*)$/", $this->_uptime, $ar_buf)) {
$this->sys->setLoad($ar_buf[1].' '.$ar_buf[2].' '.$ar_buf[3]);
}
}
125,7 → 130,6
case 'bogomips':
case 'cpu0bogo':
$dev->setBogomips($arrBuff[1]);
break;
}
}
}
358,7 → 362,7
*
* @see PSI_Interface_OS::build()
*
* @return Void
* @return void
*/
public function build()
{
377,9 → 381,6
$this->_scsi();
$this->_usb();
}
if (!$this->blockname || $this->blockname==='network') {
$this->_network();
}
if (!$this->blockname || $this->blockname==='memory') {
$this->_memory();
}
386,5 → 387,8
if (!$this->blockname || $this->blockname==='filesystem') {
$this->_filesystems();
}
if (!$this->blockname || $this->blockname==='network') {
$this->_network();
}
}
}