Introduction
The Stats
category's events occur during statistics processing.
RunAll
This event takes place when the system processes statistics for all of the server's cPanel accounts.
Available Stages:
pre
— Hook action code runs before the system processes cPanel statistics.post
— Hook action code runs after the system processes cPanel statistics.
Action Code Runs As:
root
Blocking Attribute:
Escalate Privileges Attribute:
N/A
Output parameters
This event does not return output.
RunUser
This event takes place when the system processes statistics for a specific cPanel account.
Available Stages:
pre
— Hook action code runs before the system processes cPanel statistics.post
— Hook action code runs after the system processes cPanel statistics.
Action Code Runs As:
The cPanel user.
Blocking Attribute:
Escalate Privileges Attribute:
Output parameters
Note:
The chosen stage determines the event's output. Select the appropriate tab to view output parameters for that stage.
Pre
Parameter |
Type |
Description |
Possible values |
Example |
lastruntime |
integer |
The last time at which the system processed the user's statistics. |
A valid Unix timestamp. |
1417584474 |
user |
string |
The cPanel account username. |
A valid cPanel username. |
username |
homedir |
string |
The cPanel account's home directory. |
An absolute directory path. |
/home/username/ |
rLOG_CONF |
hash reference |
A hash reference that indicates which analytics programs will process each of the user's domains. |
A valid hash reference. |
|
maindomain |
string |
The cPanel account's main domain. |
A valid domain. |
example.com |
rALLDOMAINS |
array reference |
An array reference that contains all of the user's domains. |
A valid array reference. |
|
logfiledesc |
array |
An array of hashes for each domain that thecpanellogddaemon will process. |
This array contains a hash for each domain. Each hash contains thedomain,filename, andlogfileparameters. |
|
domain |
string |
A domain on the cPanel account. The event returns this parameter in eachlogfiledeschash. |
A valid domain. |
seconddomain.com |
filename |
string |
The log file's filename. The event returns this parameter in eachlogfiledeschash. |
A valid filename. |
logfile |
logfile |
string |
The log file's absolute path. The event returns this parameter in eachlogfiledeschash. |
A valid file path. |
/home/users/logfile |
Post
Parameter |
Type |
Description |
Possible values |
Example |
lastruntime |
integer |
The last time at which the system processed the user's statistics. |
A valid Unix timestamp. |
1417584474 |
user |
string |
The cPanel account username. |
A valid cPanel username. |
username |
homedir |
string |
The cPanel account's home directory. |
An absolute directory path. |
/home/username/ |
rLOG_CONF |
hash reference |
A hash reference that indicates which analytics programs processed each of the user's domains. |
A valid hash reference. |
|
maindomain |
string |
The cPanel account's main domain. |
A valid domain. |
example.com |
rALLDOMAINS |
array reference |
An array reference that contains all of the user's domains. |
A valid array reference. |
|
logfiledesc |
array |
An array of hashes for each domain that the cpanellogd daemon processed. |
This array contains a hash for each domain. Each hash contains the domain,filename, and logfile parameters. |
|
domain |
string |
A domain on the cPanel account. The event returns this parameter in each logfiledesc hash. |
A valid domain. |
seconddomain.com |
filename |
string |
The log file's filename. The event returns this parameter in each logfiledesc hash. |
A valid filename. |
logfile |
logfile |
string |
The log file's absolute path. The event returns this parameter in each logfiledesc hash. |
A valid file path. |
/home/users/logfile |