Recording Balance Changes and Calculating the Average Usage Rate (SRC CLI)

You can configure the db-engine processor to record account balance changes and calculate the average rate at which the subscriber is consuming volume in units per second, called the averageUsageRate.

The session-history-depth option determines the number of historical service session records that are used to calculate the averageUsageRate for a service. When you configure the interim accounting interval, you can specify the variable averageUsageRate_serviceName. If this variable is specified, the SRC VTA calculates the averageUsageRate for the specified service by querying the history sessions of the service over the most recent X hours, where X is defined by the session-history-depth option.

For more information, see Configuring the Interim Account Interval and Usage Metric of a Service in the External Database (SRC CLI) and Variables Used to Define the Interim Accounting Interval for Services.

Use the following statements to configure the SRC VTA to record balance changes and specify the session history depth:

shared vta group name processor db-engine {record-balance-change;session-history-depth;}

Note: The CLI editing level must be set to expert to set the session-history-depth option.

To configure the SRC VTA to record balance changes and specify the session history depth:

  1. From configuration mode, access the statement used to configure the db-engine processor. For example, to configure the db-engine processor for the SRC VTA group called vta1:
    [edit]user@host# edit shared vta group vta1 processor db-engine
  2. (Optional) Configure the SRC VTA to record balance changes.
    [edit shared vta group vta1 processor db-engine]user@host# set record-balance-change

    This option is set or not set. If it is set, every account balance change action is recorded in the database. Not setting this option requires fewer database updates and less database space.

  3. (Optional) Specify the session-history-depth (in hours) used to calculate the averageUsageRate for a service.
    [edit shared vta group vta1 processor db-engine]user@host# set session-history-depth

Related Documentation