OpenMediaVault  0.6 (Kralizec)
The open network attached storage solution
 All Classes Functions Variables Groups Pages
Static Public Member Functions | List of all members
OMVSystem Class Reference
Inheritance diagram for OMVSystem:
OMVObject

Static Public Member Functions

static getRootDeviceFile ()
 
static isRootDeviceFile ($deviceFile)
 
static getLoginDefs ()
 
static getNextDevice ($type, $name)
 
static uptime ($indexed=FALSE)
 
static getLoadAverage ()
 
static getMemoryStats ()
 
static getCPUStats ()
 

Additional Inherited Members

- Public Member Functions inherited from OMVObject
 __construct ()
 
 getLastError ()
 
- Protected Member Functions inherited from OMVObject
 setLastError ($error)
 
 debug ()
 

Detailed Description

This file is part of OpenMediaVault.

License:
http://www.gnu.org/licenses/gpl.html GPL Version 3
Author
Volker Theile volke.nosp@m.r.th.nosp@m.eile@.nosp@m.open.nosp@m.media.nosp@m.vaul.nosp@m.t.org

OpenMediaVault is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

OpenMediaVault is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with OpenMediaVault. If not, see http://www.gnu.org/licenses/. Helper class that provides various functions regarding the Linux system.

Member Function Documentation

static OMVSystem::getCPUStats ( )
static

Get CPU statistics.

Returns
The memory statistics as array or FALSE on failure. array( modelname => xxx, usage => xxx (percent) )
static OMVSystem::getLoadAverage ( )
static

Get load average in regard to both the CPU and IO over time.

Returns
The CPU and IO utilization of the last one, five, and 10 minute periods or FALSE on failure.
static OMVSystem::getLoginDefs ( )
static

Get the /etc/login.defs configuration

Returns
Array containing the configuration as key/value pairs or FALSE on failure.
static OMVSystem::getMemoryStats ( )
static

Get memory statistics.

Returns
The memory statistics as array or FALSE on failure. array( mem ( total => xxx, (bytes) used => xxx, (bytes) free => xxx, (bytes) shared => xxx, (bytes) buffers => xxx, (bytes) cached => xxx, (bytes) ) wobufferscache ( used => xxx, (bytes) free => xxx, (bytes) ) swap ( total => xxx, (bytes) used => xxx, (bytes) free => xxx, (bytes) ) total ( total => xxx, (bytes) used => xxx, (bytes) free => xxx, (bytes) ) )
static OMVSystem::getNextDevice (   $type,
  $name 
)
static

Get the next free device name.

Parameters
typeThe type of the device, e.g. disk or iface
nameThe device name, e.g. sda, hda, md, eth or bond
Returns
The next free device name, e.g. md3
static OMVSystem::getRootDeviceFile ( )
static

Get the device file where the operating system is installed on (e.g. /dev/sda1).

Returns
Returns the device file where the operating system is installed on or FALSE on failure.
static OMVSystem::isRootDeviceFile (   $deviceFile)
static

Check if the given device file contains the operating system.

Parameters
deviceFileThe devicefile to check, e.g. /dev/sda1.
Returns
Returns TRUE if the device file contains the operating system, otherwise FALSE.
static OMVSystem::uptime (   $indexed = FALSE)
static

Tell how long the system has been running.

Parameters
indexedSet to FALSE to get the uptime as string, otherwise an indexed array with the fields seconds, minutes, hours and days will be returned. Defaults to FALSE.
Returns
The uptime as formated string, indexed array or FALSE on failure.

The documentation for this class was generated from the following file: