Traffic on Domain: traffic.exe

The traffic.exe utility serves to manage traffic usage statistics for domains. Using this utility, you can perform the following tasks:

Note: The utility is available since Plesk 9.

 

Location

%plesk_cli% 

 

Usage

traffic.exe <command> [<param>] [
<option 1> <param> [<option 2> <param> … [<option N> <param>]
]

 

Example

 

Commands

Command

Parameter

Description

Example

--add or -a

<domain name>

Registers specified amount of traffic as if being already used by domain.

Requires all options.

To add 100Mb of inbound HTTP traffic to example.com traffic:

>traffic.exe -a example.com -date 2008-10-17 -type http -value 100M -direction in

 

--sub or -s

<domain name>

Subtracts specified amount of traffic from the amount registered for domain.

Requires all options.

To subtract 100Mb of inbound HTTP traffic from example.com traffic:

>traffic.exe -s example.com -date 2008-10-17 -type http -value 100M -direction in

--add-batch or -b

<domain name>

Registers in batch mode specified amount of traffic as if being already used by domain.

Requires all options.

To register traffic on example.com using file traf.conf:

>traffic.exe -b example.com < traf.conf

 

The contents of traf.conf can be as follows:

-date 2008-10-17 -type http -value 10M -direction in

 

--del or -d

<domain name>

Resets the amount of traffic registered for this domain to zero.

Requires -date, -type, -direction options.

To reset outbound traffic for example.com:

>traffic.exe -d example.com -date 2008-10-17 -type http -direction out

--help or -h

Displays help on the utility usage.

To view the help info on the use of this utility:

>traffic.exe --help

 

Options

Option

Parameter

Description

Example

-date

<YYYY-MM-DD>

Sets timestamp for the traffic statistics change being performed.

 

To add 100Mb of inbound HTTP traffic to example.com traffic:

>traffic.exe -a example.com -date 2008-10-17 -type http -value 100M -direction in

-type

http|ftp|pop3-imap|smtp>

Specifies the traffic type.

-value

<number>[K|M|G|T]

Specifies the amount of added/subtracted traffic.

-direction

in|out

Specifies the traffic direction.