Subversion Repositories ALCASAR

Rev

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

Rev 2770 Rev 2976
Line 145... Line 145...
145
     *
145
     *
146
     * @return void
146
     * @return void
147
     */
147
     */
148
    private function _kernel()
148
    private function _kernel()
149
    {
149
    {
150
        if (CommonFunctions::executeProgram('uname', '-s', $os, PSI_DEBUG) && ($os!="")) {
150
        if (CommonFunctions::executeProgram('uname', '-s', $kernel, PSI_DEBUG) && ($kernel != "")) {
151
            if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version!="")) {
151
            if (CommonFunctions::executeProgram('uname', '-r', $version, PSI_DEBUG) && ($version != "")) {
152
                $os.=' '.$version;
152
                $kernel.=' '.$version;
153
            }
153
            }
154
            if (CommonFunctions::executeProgram('uname', '-v', $subversion, PSI_DEBUG) && ($subversion!="")) {
154
            if (CommonFunctions::executeProgram('uname', '-v', $subversion, PSI_DEBUG) && ($subversion != "")) {
155
                $os.=' ('.$subversion.')';
155
                $kernel.=' ('.$subversion.')';
156
            }
156
            }
157
            if (CommonFunctions::executeProgram('uname', '-i', $platform, PSI_DEBUG) && ($platform!="")) {
157
            if (CommonFunctions::executeProgram('uname', '-i', $platform, PSI_DEBUG) && ($platform != "")) {
158
                $os.=' '.$platform;
158
                $kernel.=' '.$platform;
159
            }
159
            }
160
            $this->sys->setKernel($os);
160
            $this->sys->setKernel($kernel);
161
        }
161
        }
162
    }
162
    }
163
 
163
 
164
    /**
164
    /**
165
     * UpTime
165
     * UpTime
Line 336... Line 336...
336
    {
336
    {
337
        $pagesize = $this->_kstat('unix:0:seg_cache:slab_size');
337
        $pagesize = $this->_kstat('unix:0:seg_cache:slab_size');
338
        $this->sys->setMemTotal($this->_kstat('unix:0:system_pages:pagestotal') * $pagesize);
338
        $this->sys->setMemTotal($this->_kstat('unix:0:system_pages:pagestotal') * $pagesize);
339
        $this->sys->setMemUsed($this->_kstat('unix:0:system_pages:pageslocked') * $pagesize);
339
        $this->sys->setMemUsed($this->_kstat('unix:0:system_pages:pageslocked') * $pagesize);
340
        $this->sys->setMemFree($this->_kstat('unix:0:system_pages:pagesfree') * $pagesize);
340
        $this->sys->setMemFree($this->_kstat('unix:0:system_pages:pagesfree') * $pagesize);
-
 
341
        if (($swap=$this->_kstat('unix:0:vminfo:swap_avail')) > 0) {
341
        $dev = new DiskDevice();
342
            $dev = new DiskDevice();
342
        $dev->setName('SWAP');
343
            $dev->setName('SWAP');
343
        $dev->setFsType('swap');
344
            $dev->setFsType('swap');
344
        $dev->setMountPoint('SWAP');
345
            $dev->setMountPoint('SWAP');
345
        $dev->setTotal($this->_kstat('unix:0:vminfo:swap_avail') / 1024);
346
            $dev->setTotal($swap / 1024);
346
        $dev->setUsed($this->_kstat('unix:0:vminfo:swap_alloc') / 1024);
347
            $dev->setUsed($this->_kstat('unix:0:vminfo:swap_alloc') / 1024);
347
        $dev->setFree($this->_kstat('unix:0:vminfo:swap_free') / 1024);
348
            $dev->setFree($this->_kstat('unix:0:vminfo:swap_free') / 1024);
348
        $this->sys->setSwapDevices($dev);
349
            $this->sys->setSwapDevices($dev);
-
 
350
        }
349
    }
351
    }
350
 
352
 
351
    /**
353
    /**
352
     * filesystem information
354
     * filesystem information
353
     *
355
     *