Zeta Components - high quality PHP components

eZ Components - SystemInformation


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

Class overview

This class provides the main API for accessing common system variables. Variables that are not available directly from PHP are fetched using readers specific to each supported system. The corresponding reader is automatically detected and used to scan system information.
ezcSystemInfoReader represents a common abstract interface for operating system (OS) information readers. A particular reader implements the ezcSystemInfoReader interface and scans system information specifically for each supported OS.

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


The following example demonstrates how to use the SystemInformation component.

Getting CPU type and CPU speed for the current system

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

More information

For more information, see the SystemInformation API documentation.