Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

Stats Functions

For cPanel & WHM 11.32

noteNote: The Standardized Hooks documentation is currently under revision. You should check back shortly for improvements to this information.

This document contains hook insertion points for stats functions.

Stats::RunAll (pre)

Namespace Stats
Function RunAll
Stage pre
Runs as... root
Blocking No
Description This code block is run before cpanellogd execution is started for all users.

Stats::RunAll (post)

Namespace Stats
Function RunAll
Stage post
Runs as... root
Blocking No
Description This code block is run after cpanellogd execution is started for all users.

Stats::RunUser (pre)

Namespace Stats
Function RunUser
Stage pre
Runs as... The user whose stats are being processed by the system.
Blocking No
Description This block of code is run before an individual user's statistics are processed by cpanellogd.

Parameters

{
   'lastruntime' => "The Unix timestamp that indicates the last time stats were run for the user."
   'user' => "The user whose stats are being processed by the system."
   'homedir' => "The user's home directory."
   'rLOG_CONF' => "A hash reference that indicates which analytics programs will process each of the user's domains."
   'maindomain' => "The user's main domain."
   'rALLDOMAINS' => "An array reference that contains all of the cPanel user's domains."
   'logfiledesc' => "An array of hash references that contain an entry for each domain processed by cpanellogd. Not all of the user's domains are contained in this array. The array has 3 entries for each domain:"
   { 
       'domain' => "The domain being processed."
       'filename' => "The log file's filename."
       'logfile' => "The location of the log file being processed. Usually, this is a .bkup file. This file should be used for processing, rather than the file in domlogs."
   };
};

Stats::RunUser (post)

Namespace Stats
Function RunUser
Stage post
Runs as... The user whose stats are being processed by the system.
Blocking No
Description This block of code is run after an individual user's statistics are processed by cpanellogd.

Parameters

{
   'lastruntime' => "The Unix timestamp that indicates the last time stats were run for the user."
   'user' => "The user whose stats are being processed by the system."
   'homedir' => "The user's home directory."
   'rLOG_CONF' => "A hash reference that indicates which analytics programs will process the user's domains."
   'maindomain' => "The user's main domain."
   'rALLDOMAINS' => "An array reference that contains all of the cPanel user's domains."
   'logfiledesc' => "An array of hash references that contain an entry for each domain processed by cpanellogd. Not all of the user's domains are contained in this array. The array has 3 entries for each domain:"
   { 
       'domain' => "The domain being processed."
       'filename' => "The log file's filename."
       'logfile' => "The location of the log file being processed. Usually, this is a .bkup file. This file should be used for processing, rather than the file in domlogs."
   };
};

Stats::RunUser (post)

Namespace Stats
Function RunUser
Stage post
Runs as... The user whose stats are being processed by the system.
Blocking No
Description This block of code is run after an individual user's statistics are processed by cpanellogd.

Parameters

{
   'lastruntime' => "The Unix timestamp that indicates the last time stats were run for the specified user."
   'user' => "The user whose stats are being processed by the system."
   'homedir' => "The user's home directory."
   'rLOG_CONF' => "A hash reference that indicates which analytics programs will process the user's domains."
   'maindomain' => "The user's main domain."
   'rALLDOMAINS' => "An array reference that contains all of the cPanel user's domains."
   'logfiledesc' => "An array of hash references that contain an entry for each domain processed by cpanellogd. Not all of the user's domains are contained in this array. The array has 3 entries for each domain:"
   { 
       'domain' => "The domain being processed."
       'filename' => "The log file's filename."
       'logfile' => "The location of the log file being processed. Usually, this is a .bkup file. This file should be used for processing, rather than the file in domlogs."
   };
};

Topic revision: r10 - 20 Jan 2012 - 16:50:30 - Main.JustinSchaefer
SoftwareDevelopmentKit.StndHooksStatsFunctions moved from Sandbox.StndHooksStatsFunctions on 01 Nov 2011 - 21:27 by Main.JustinSchaefer - put it back