Please note that X-Ray is a new experimental tool. It is in beta testing now. If you’d like to be a beta tester, please fill out this form. You will be able to use the X-Ray tool after receiving the CLN manager approval.
X-Ray is available only for CloudLinux OS licenses purchased directly, NOT VIA RESELLERS.
X-Ray is available for cPanel and Plesk.
X-Ray is a tool developed for website performance monitoring and performance issues detection.
X-Ray can gather and visualize information about top N slowest system functions, external requests, software modules and database queries of the client’s website.
First release of X-Ray is offered for cPanel administrators and support to find the cause of website performance issues.
X-Ray can monitor websites that were developed on cPanel hosts and use PHP (see PHP version list) or WordPress.
Make sure you have installed LVE Manager version 6.2 or later. You can install it with the following command:
# yum install lvemanager --enablerepo=cloudlinux-updates-testing
Run the following command:
rhn_check command is not found, run the following command:
# yum install rhn-check rhn-setup --enablerepo=cloudlinux-updates-testing
Then install the
Via user interface
Via SSH by running the following command:
# yum install lvemanager alt-php-xray --enablerepo=cloudlinux-updates-testing
After installation, use the Start tracing button to create your first tracing task for a slow site.
URL should be a valid URL of the domain which exists on the current hosting server. The URL field supports wildcard matching. To learn more about wildcard matching, click How to use special characters.
Advanced settings allow you to set an IP address and tracing options: by time or by number of queries.
After creating, the task appears in the list of tracing tasks.
A tracing task can have the following statuses:
Click to stop the tracing task.
The tracing task status will be changed to Stopped. Data will not be collected anymore but you can see already collected information or continue tracing later by clicking .
Click to delete the tracing task.
When you have deleted a tracing task, all collected data will be unavailable.
Collected requests are available in the UI for two weeks.
Click to open a list of collected requests.
The slowest request is highlighted.
X-Ray collects the following data for each request:
The Software modules/plugins section displays the following data:
The Database queries section displays the following data:
The External requests section displays the following data:
The System functions section displays the following data:
X-Ray client is a PHP extension named
xray.so. It analyzes the processing time of the entire request and its parts and then sends the data to the X-Ray agent.
The list of currently supported PHP versions:
|ALT PHP:||EA PHP:||Plesk PHP|
| || |
It may be any PHP system function which can be related to a PHP engine or other PHP extension, for example
json_encode(). A list of these functions can be found here.
Description: Enable or disable X-Ray extension from php.ini
Description: The number of the slowest SQL queries which will be sent to the X-Ray agent. The min value is 0 and the max value is 100. If the variable value is more, the default value will be used.
Description: The number of the slowest external requests (the curl_exec function) which will be sent to the X-Ray agent. The min value is 0 and the max value is 100. If the variable value is more, the default value will be used.
Description: The number of the slowest system functions which will be sent to the X-Ray agent. The min value is 0 and the max value is 100. If the variable value is more, the default value will be used.
Description: The backtrace depth to the main() function which will be sent to the X-Ray agent. The min value is 0 and the max value is 20. If the variable value is more, the default value will be used.
Description: Tells the X-Ray client which processor to use. The new processors may be added in the future. The default processor is xray which means to send data to the X-Ray agent.
Default: no value
Description: The current tracing tasks for the given PHP request. This directive is added automatically by the X-Ray manager when creating a task. It is not allowed to edit manually, as X-Ray may stop working.
Description: Only for debug purposes. Writes to a file data which is sent to the processor.
Description: Only for debug purposes. Enables debug output during request processing. In the On mode can slow down the domain.
Description: Only for debug purposes. Specifies a file for logging debug information.
This is a service that receives data from the X-Ray client and sends it to the remote storage.
The X-Ray agent is managed by the
To start the X-Ray agent, run the following command:
# service xray-agent start
To stop the X-Ray agent, run the following command:
# service xray-agent stop
To restart the X-Ray agent, run the following command:
# service xray-agent restart
X-Ray affects website performance. Our tests show 5-10 % overhead from a website loading time with X-Ray tracing enabled. X-Ray allows you to find website performance issues and should not be enabled permanently. If your website is very slow, you can enable X-Ray to find the cause and then disable it.
This warning means that you already have a task to trace this URL in the list of your tracing tasks. If you see this warning, a new task can be created only with the On hold status and you will be able to run it only when the previous task with the same URL will be completed.
Note that the URL field supports wildcard matching and you can have a case when X-Ray is tracing the
URL=domain.com/* and you are trying to create a new task with
URL=domain.com/xray.php. In this case, you will see that warning because the
* URLs array includes
Check that xray extension is enabled for the domain. To do so, go to the
phpinfo() page and make a request. In the phpinfo output try to find the following section:
If you cannot see that section, try to restart PHP processes for that user (the simplest way is to restart Apache) and check that you can see the xray extension.
If you can see the xray extension in the phpinfo, check that X-Ray agent service is running with the service xray-agent status command. If it is not running, start it with the
service xray-agent start command.
If you set a client’s IP when creating the tracing task, check that your requests come to the server with this IP via phpinfo (since there may be NAT between your local machine and the server).
If, after checking the previous items, the issue persists, contact our support team.
If you managed to create a tracing task, this means that the
xray.ini file was created in a system. Therefore, there may be two reasons why it did not appear in the phpinfo page of the domain.
PHP process wasn't reloaded after adding the xray.ini. To solve this, you should restart the Apache or fpm service for the domain on which the tracing was started. At the moment, this is done automatically by the X-Ray manager after creating the task.
Your domain uses a PHP version different from the one which was detected by the X-Ray manager. To solve this, check the scan dir for additional ini files for your domain.
Then check the
ini_location that was passed to the X-Ray manager by running the following command:
# cat /usr/share/alt-php-xray/manager.log | grep ini_location
Find your tracing task in the output and check that the
xray.ini exists in this directory, also check that the
ini path is the same in the phpinfo page output and in the
ini_location directive for your tracing task. If they are the same, you should reload your PHP. If they are different that means that the X-Ray manager could not correctly determine the PHP version your domain uses. In this case, contact our support team at https://cloudlinux.zendesk.com/hc/requests/new.
Check for the
CacheLookup on option in the
htaccess file for your domain.
If the option is there, LiteSpeed processes requests bypassing the PHP X-Ray extension.
In this case, to get tracing information, you should remove the
CacheLookup on option.