Skip to main content

PHP Agent Introduction

Usage Steps

  1. Ensure your system meets the compatibility requirements.
  2. If you do not have a Guanyun account, please register for one.
  3. Download and install the Collector component from the report management interface.
  4. Download and install the UniAgent Agent or PHP Agent.
  5. Restart the PHP host process (Apache or PHP-FPM).
  6. View data through the report page. If you encounter any issues, please refer to FAQ.

Compatibility Requirements

Before installing the PHP Agent, please make sure your system meets the following conditions:

  • Linux operating system, meeting one of the following:

    • RedHat Enterprise Linux (RHEL) 6.0 x86_64 or above
    • CentOS 6.0 x86_64 or above
    • Suse Linux 10.0 x86_64 or above
    • Debian 6.0 x86_64 or above
    • Ubuntu 9.10 x86_64 or above
    • Any other Linux x86_64 distribution with kernel version above 2.6.32 and GLIBC version above 2.12.
  • PHP, meeting one of the following:

    • PHP 5.3
    • PHP 5.4
    • PHP 5.5
    • PHP 5.6
    • PHP 7.0
    • PHP 7.1
    • PHP 7.2
    • PHP 7.3
    • PHP 7.4
    • PHP 8.0
    • PHP 8.1
    • PHP 8.2
  • Web server, meeting one of the following:

    • Apache 2.2 or above (apache module mode)
    • Nginx + PHP-FPM (FastCGI mode)
    • Any other PHP server supporting FastCGI

Agent Architecture

  • Agent file composition

    • Aggregator process: ./bin/php-daemon
    • PHP extension: ./lib/tingyun-*.so
    • Log path: ./logs/
  • PHP extension module

    • Responsible for collecting PHP runtime performance and sending performance data to the aggregator process.
    • The PHP extension itself does not exchange data with the Tingyun backend. It sends data to the aggregator process for processing to reduce system resource consumption.
  • Aggregator process

    • Acts as an intermediary between the Tingyun backend and the PHP extension, receiving runtime performance data from the PHP extension, compressing it, and sending it to the Tingyun backend.
    • If the aggregator process is not enabled, no data will be sent to the Tingyun backend.
    • The aggregator process is automatically started by PHP and does not require manual startup by the user.