Statistics Calculation: statistics.exe

The statistics.exe utility serves to calculate statistics on system resources used by Parallels Plesk Panel domains. The utility allows performing the following tasks:

 

It is important to keep in mind that when the utility is processing a domain, it writes to the AWStats configuration file for this domain (in case that AWStats is a working web statistics application on the domain) the Parallels Plesk Panel default values of the following fields: LogType, LogFormat, SiteDomain, HostAliases, DNSLookup, DirData, DirCgi, DirIcons, SaveDatabaseFilesWithPermissionsForEveryone, DefaultFile, LogFile, HTMLEndSection.

The domain AWStats configuration file has name awstats.<domain name>.conf, it is located at the %plesk_dir%Additional\AWStats\wwwroot\cgi-bin\ directory and its copy in the %plesk_vhosts%<domain name>\statistics\webstat\AWStats\cgi-bin\ folder. Each time statistics.exe processes the domain, it overwrites the above mentioned fields in the domain AWStats configuration file located at %plesk_dir%Additional\..., and then copies it to the %plesk_vhosts%<domain name>\...\ directory replacing the config that existed there before.

 

Location

%plesk_bin%

Usage

statistics.exe [
<option 1>=<param 1>[;<param 2>;…;<param n>]
[<option 2>=<param 1>[;<param 2>;…;<param n>]]
… [<option N>=<param 1>[;<param 2>;…;<param n>]]
]

 

Example

The following command calculates FTP and HTTP traffic used by all domains containing a string ample in their names (e.g., example.com, sample.net, so on):

>statistics.exe --http-traffic --ftp-traffic --process-domain-mask=%ample%

 

Options

Option

Parameter

Description

Example

<none>

 

Equal to the --all option, see below.

>statistics.exe

--disk-usage

 

Calculates the amount of disk space used by specified or all domains and amount of disk space used by every mailbox on specified or all domains.

To calculate the amount of disk space used by all domains which names end with ample.com and amount of disk space used by every mailbox on these domains :

>statistics.exe --disk-usage --process-domain-mask=%ample.com

--mailbox-usage

 

Calculates the amount of disk space used by every mailbox on specified or all domains.

Calculates the amount of disk space used by every mailbox on example.com:

>statistics.exe --mailbox-usage --process-domains=example.com

--http-traffic

 

Calculates the amount of HTTP traffic used by specified or all domains.

To calculate HTTP traffic for all domains matching the pattern sm_th% (smyth.com, smath.org, smuth.net, etc.) except for the domains smyths.org and smyths.info:

>statistics.exe --http-traffic --process-domain-mask=sm_th% --skip-domains=smyths.org;smyths.info

--ftp-traffic

 

Calculates the amount of FTP traffic used by specified or all domains.

To calculate the amount of FTP traffic used by domains example.com and sample.net:

>statistics.exe --ftp-traffic --process-domains=example.com;sample.net

--mail-traffic

 

Calculates the amount of mail traffic used by all domains.

>statistics.exe --mail-traffic

--notify

 

Calculates disk space, FTP, HTTP and mail traffic usage for all domains; Checks if domains expired and if the resources usage is within limits defined for the domains; Sends mail notifications about the domain expiration and/or exceeded limits.

>statistics.exe --notify

--update-actions

 

Calculates disk space, FTP, HTTP and mail traffic usage for all domains; Checks if domains expired and if the resources usage is within limits defined for the domains; Rotates action log and launches the "limit reached" event actions.

>statistics.exe --update-actions

--all

 

Performs all the actions made by the previously mentioned options: Calculates disk space, FTP, HTTP and mail traffic usage for all domains; Checks if domains expired and if the resources usage is within limits defined for the domains; Sends e-mail notifications about the domain expiration and/or exceeded limits; rotates action log and launches the limit reached event actions.

>statistics.exe --all

--process-domains

<domain name>

Specifies the names of the domains for which the statistics must be calculated.

Affects the --disk-usage, --ftp-traffic and --http-traffic options when they are used separately, or within the --all option.

To calculate the amount of FTP traffic used only by domains example.com, sample.net:

>statistics.exe --ftp-traffic --process-domains=example.com;sample.net

--process-domain-mask

<pattern>

Specifies in a form of the mask the domains for which the statistics must be calculated.

The pattern is an SQL LIKE clause -- a string containing the % and _ wildcards which stand for a string and a character, correspondingly.

Affects the --disk-usage, --ftp-traffic and --http-traffic options when they are used separately, or within the --all option.

To calculate the amount of disk space used by all domains which names end with ample.com (sample.com, example.com, etc.):

>statistics.exe --disk-usage --process-domain-mask=%ample.com

To calculate HTTP traffic for all domains matching the pattern sm_th% (smyth.com, smath.org, smuth.net, etc.):

>statistics.exe --http-traffic --process-domain-mask=sm_th%

--skip-domains

<domain name>

Specifies the names of the domains for which the statistics will not be calculated.

Affects the --disk-usage, --ftp-traffic and --http-traffic options when they are used separately, or within the --all option.

To calculate HTTP traffic for all domains matching the pattern sm_th% (smyth.com, smath.org, smuth.net, etc.) except for the domains smyths.org and smyths.info:

>statistics.exe --http-traffic --process-domain-mask=sm_th% --skip-domains=smyths.org;smyths.info

--skip-domain-mask

<pattern>

Specifies in a form of the mask the domains for which the statistics must not be calculated.

The pattern is an SQL LIKE clause -- a string containing the % and _ wildcards which stand for a string and a character, correspondingly.

To calculate FTP traffic for all domain names not in a com zone:

>statistics.exe --ftp-traffic --skip-domain-mask=%com

--single-notify

 

Specifies that a notification about expired domain or exceeded limits must be sent only once.

Has sense when used only with the --notify or --all options.

>statistics.exe --notify --single-notify

--antivirus

 

Calculates spam and antivirus statistics for specified or all domains.

To calculate spam and antivirus statistics for domain example.com:

>statistics.exe --antivirus --process-domains=example.com

--verbose

 

Specifies that a utility should be run in the verbose mode in which more information is added to the statistics report.

>statistics.exe --verbose