Path

ez components / documentation / api reference / 1.1 / system


eZ Components 1.1

SystemInformation

[ Tutorial ] [ Class tree ] [ Element index ] [ ChangeLog ] [ Credits ]

eZ components - System Information

Introduction

The System Information component provides access to common system variables, such as CPU type and speed, available amount of memory etc. Currently, the system information supports Linux, FreeBSD and Windows systems.

Class overview

ezcSystemInfo
This class provides the main API for accessing common system variables. Variables that ara not available from PHP directly are fetched using readers specific for each supported system. The corresponding reader is automatically detected, attached and forced to scan the systems information.
ezcSystemInfoReader
The ezcSystemInfoReader represents a common abstract interface for OS info readers. A particular reader implements the ezcSystemInfoReader interface and scana system infoformation specifically for each supported OS.

More information about these classes can be found in the documentation of the classes itself.

Usage

The following example demonstrate how to use the System Information component.

Getting CPU type and CPU speed for the current system

  1. <?php
  2. require_once 'tutorial_autoload.php';
  3. 
  4. $info ezcSystemInfo::getInstance();
  5. echo $info->cpuType"\n";
  6. echo $info->cpuSpeed"\n";
  7. 
  8. ?>

More Information

For more information, see the System Information API documentation.

Last updated: Wed, 28 Nov 2007