Robert Eisele
Systems Engineer, Architect and DBA

PHP Sysload Extension

PHP Sysload is a simple monitoring Extension for PHP backends behind a reverse proxy server or for other tasks where you have a need to send a specified HTTP header on overrun.

Overview

With this Extension you have the possebility to check the loadavg values and send a specified Header to the Client or the proxy if one of the check value is overrun. You can also disable the force-exit, but I don't recommend this!

Configuration

sysload.one-minute = 1.0
sysload.five-minutes = 0.5
sysload.ten-minutes = 0.3
sysload.header = "X-Sysload: Critical"
sysload.force-exit = 1

Installation

Installing with `pecl` command-line utility

  1. Execute command "pecl install sysload"
  2. Make sure you have extension=sysload.so in your php.ini
  3. Add the configuration lines from above in your php.ini

Installing from sources

  1. Download sysload source package
  2. Unpack sysload source package
  3. Go to sysload folder and type "phpize && ./configure && make && make install"
  4. Make sure you have extension=sysload.so in your php.ini
  5. Add the configuration lines from above in your php.ini

Compiling Sysload into PHP

  1. Download sysload source package
  2. Unpack sysload source package to $PHP_SOURCE_DIR/ext/sysload
  3. In php source root directory run commands: "rm configure && ./buildconf --force"
  4. Configure PHP with command "./configure --with-sysload"
  5. Run make && make install
  6. Add the configuration lines from above in your php.ini

Links