|
eZ Publish
[trunk]
|
Provides common information on the running system. More...
Public Member Functions | |
| attribute ($name) | |
| attributes () | |
| cpuSpeed () | |
| cpuType () | |
| eZSysInfo () | |
| hasAttribute ($name) | |
| isValid () | |
| memorySize () | |
| scan () | |
Public Attributes | |
| $CPUSpeed = false | |
| $CPUType = false | |
| $CPUUnit = false | |
| $IsValid = false | |
| $MemorySize = false | |
Private Member Functions | |
| scanDMesg ($dmesgPath=false) | |
| scanProc ($cpuinfoPath=false, $meminfoPath=false) | |
Provides common information on the running system.
The following information can be queried:
Definition at line 31 of file ezsysinfo.php.
| eZSysInfo::attribute | ( | $ | name | ) |
null if it does not exist. See attributes() for a list of available attributes. Definition at line 70 of file ezsysinfo.php.
Definition at line 48 of file ezsysinfo.php.
Referenced by hasAttribute().
Contains the speed of CPU, the type is taken directly from the OS and can vary a lot. The speed is just a number so use cpuUnit() to get the proper unit (e.g MHz).
false if no type was found. Definition at line 113 of file ezsysinfo.php.
Contains the type of CPU, the type is taken directly from the OS and can vary a lot.
false if no type was found. Definition at line 102 of file ezsysinfo.php.
Constructor
Definition at line 36 of file ezsysinfo.php.
| eZSysInfo::hasAttribute | ( | $ | name | ) |
true if the attribute named $name exists. See attributes() for a list of available attributes. Definition at line 61 of file ezsysinfo.php.
true if the system has been scanned correctly. Definition at line 92 of file ezsysinfo.php.
Contains the amount of system memory the OS has, the value is in bytes.
false if no type was found. Definition at line 123 of file ezsysinfo.php.
| eZSysInfo::scan | ( | ) |
Scans the system depending on the OS and fills in the information internally.
true if it was able to scan the system or false if it failed. Definition at line 132 of file ezsysinfo.php.
| eZSysInfo::scanDMesg | ( | $ | dmesgPath = false | ) | [private] |
Scans the dmesg.boot file which is created by the kernel. If this files are unavailable or could not be read it will return false.
| $dmesgPath | The path to the dmesg file, if false it uses '/var/run/dmesg.boot' which should be sufficient. |
Definition at line 272 of file ezsysinfo.php.
Referenced by scan().
| eZSysInfo::scanProc | ( | $ | cpuinfoPath = false, |
| $ | meminfoPath = false |
||
| ) | [private] |
Scans the /proc/cpuinfo and /proc/meminfo files for CPU and memory information. If this files are unavailable or could not be read it will return false.
| $cpuinfoPath | The path to the cpuinfo file, if false it uses '/proc/cpuinfo' which should be sufficient. |
| $meminfoPath | The path to the meminfo file, if false it uses '/proc/meminfo' which should be sufficient. |
Definition at line 197 of file ezsysinfo.php.
Referenced by scan().
| eZSysInfo::$CPUSpeed = false |
Definition at line 319 of file ezsysinfo.php.
| eZSysInfo::$CPUType = false |
Definition at line 320 of file ezsysinfo.php.
| eZSysInfo::$CPUUnit = false |
Definition at line 321 of file ezsysinfo.php.
| eZSysInfo::$IsValid = false |
Definition at line 318 of file ezsysinfo.php.
| eZSysInfo::$MemorySize = false |
Definition at line 322 of file ezsysinfo.php.