# traffic.exe: Traffic on Domain:

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

- register certain amount of traffic
- subtract certain amount of traffic
- register certain amount of traffic from batch
- reset traffic

## Location

`%plesk_cli%`

## Usage

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

## Example

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

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

## 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:
    plesk bin traffic.exe -a example.com -date 2008-10-17 -type http -value 100M -direction in
`--add-user or -au` | `<login>` | Registers specified amount of traffic as if being already used by client/reseller. Requires all options. | To add 100Mb of inbound HTTP traffic to the traffic of user with the login name jdoe:
    plesk bin traffic.exe -a jdoe -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:
    plesk bin traffic.exe -s example.com -date 2008-10-17 -type http -value 100M -direction in
`--sub-user or -su` | `<login>` | Subtracts specified amount of traffic from the amount registered for client/reseller. Requires all options. | To subtract 100Mb of inbound HTTP traffic from the traffic of user with the login name jdoe:
    plesk bin traffic.exe -s jdoe -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`:
    plesk bin 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
`--add-batch-user or -bu` | `<login>` | Registers in batch mode specified amount of traffic as if being already used by client/reseller. Requires all options. | To register traffic used by user with the login name jdoe using file `traf.conf`:
    plesk bin traffic.exe -b jdoe < 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:
    plesk bin traffic.exe -d example.com -date 2008-10-17 -type http -direction out
`--del-user or -d` | `<login>` | Resets the amount of traffic registered for this client/reseller to zero. Requires `-date`, `-type`, `-direction` options. | To reset outbound traffic for user with the login name jdoe:
    plesk bin traffic.exe -d jdoe -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:
    plesk bin 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:
    plesk bin 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>[B|K|M|G|T]` | Specifies the amount of added/subtracted traffic. |
`-direction` | `in|out` | Specifies the traffic direction. |