Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Variables Used to Define the Interim Accounting Interval for Services

    Current Service Variables

    Use the variables described in this section to define a formula for the interim accounting interval.

    lastInterimTime

    • Last interim time interval.
    • Value—Number of seconds in the range 1–2147483647

    sessionLength

    • Length of the current session.
    • Value—Number of seconds in the range 0–2147483647; value is 0 when the SRC VTA is calculating the interim time of start events. For other events, value is set by the PA_SESSION_TIME attribute.

    maxUsageRate

    • Maximum rate at which the subscriber can use network resources according to the formula described in Table 1.
    • Value—Integer in the range 0–9223372036854775807
    • Guidelines—This formula corresponds to the usage formula for the same service as the interim formula.

    The maxUsageRate variable is calculated for a service by means of the following values for the variables in the corresponding usage formula:

    • upStreamBytes=PA_UPSTREAM_BANDWIDTH
      • downStreamBytes=PA_DOWNSTREAM_BANDWIDTH
      • interimTime=lastInterimTime
      • upStreamPackets=0
      • downStreamPackets=0

    If you use the parameters upStreamPackets (PA_IN_PACKETS) and downStreamPackets (PA_OUT_PACKETS) in the usage formula and at the same time maxUsageRate in the interim interval formula, the maxUsageRate is not accurate, because the values for maximum upStreamPackets and downStreamPackets are unknown.

    averageUsageRate

    • Average rate at which the subscriber is consuming volume in units per second. The unit can be a value such as dollars, bytes, or packets. The type of unit depends on the value specified in the formula. Measurement begins when the service starts.
    • Value—Integer in the range 0–9223372036854775807; the value is 0 when the SRC VTA is calculating the interim time of start events.

    For other events, the value is the usage formula divided by PA_SESSION_TIME. The usage formula is calculated from PA_IN_PACKETS, PA_OUT_PACKETS, PA_OUT_OCTETS, PA_IN_OCTETS, and PA_SESSION_TIME.

    latestUsageRate

    • Rate of service usage since the last usage report.
    • Value—Integer in the range 0–9223372036854775807; the value is 0 when the SRC VTA is calculating the interim time of start events.

    The value is calculated by using the result of the usage formula divided by the length of the service session since the previous usage report for the same service.

    Other Service Variables

    Use the variables described in this section to define an interim accounting formula that depends on usage of another service tracked by the SRC VTA.

    System requirements to calculate service usage, in the form of the averageUsageRate and the sessionLength variables, can affect system performance. Using a longer interim interval means that there are fewer interim events to process, which requires fewer system resources.

    averageUsageRate_<serviceName>

    • Average rate at which the service is consuming volume in units per second. The unit can be a value such as dollars, bytes, or packets. The type of unit depends on the value specified in the interim accounting formula. Measurement begins when the service starts.
    • Value—Integer in the range 0–9223372036854775807; the value is 0 when the SRC VTA is calculating the interim time of start events.
    • Guidelines—Service names can contain alphanumeric characters and dashes (–).

    sessionLength_<serviceName>

    • Length of a service session for the service.
    • Value—Integer in the range 0–2147483647; the value is 0 when the SRC VTA is calculating the interim time of start events.
    • Guidelines—Service names can contain alphanumeric characters and dashes (–).

    Account Balance Variable

    Use the variable described in this section to obtain balance information from each of the subscriber’s accounts.

    balance_<accountName>

    • Balance for the specified account before the new usage value is applied.
    • Value—Integer in the range 0–9223372036854775807
    • Example—balance_PeriodicQuota refers to the balance for the PeriodicQuota account.

    Sample Formulas for Interim Accounting Interval

    Table 1 provides examples of formulas to dynamically adjust the interim accounting interval for a service.

    Table 1: Examples of Interim Accounting Interval

    Formula

    Description

    return 900

    Accounting interval is fixed at 900 seconds (15 minutes).

    return (<balance_Periodic> + <balance_Bought>) /<maxUsageRate>

    Minimum time required for the subscriber to empty the periodic and bought accounts.

    return <sessionLength> >= 60*15 ? (<balance_Periodic> + <balance_Bought>) /<averageUsageRate>/2 :
    (<balance_Periodic> + <balance_Bought>) /<maxUsageRate>

    Half the time required for the subscriber to empty the accounts at the current average rate, or the minimum time if the session is shorter than 15 minutes.

    Because the average rate may not be representative early in the session, check when the account is half empty.

    Published: 2014-06-19