Top
ServerView Resource Orchestrator Cloud Edition V3.0.0 Operation Guide

12.5 Accounting Calculation

This section explains how to calculate the accounting.

The account manager calculate the amount of accounting based on the accounting information file and the metering log file, and send the calculated billing statement for each tenant.

The basic flow to calculate the accounting is shown below.

  1. Use the product master maintenance command to output the accounting information file.
    Refer to "3.4 productmaintain (Product Master Maintenance)" in the Reference Guide CE for information on the product master maintenance command.

  2. Use the output metering logs command to output the periodic log of the start date of the accounting calculation, and event log for the period of calculation (i.e., from the start date of the accounting calculation to the end date of the accounting calculation).
    Refer to "3.1 ctchg_getmeterlog (Output Metering Logs)" in the Reference Guide CE for information on the Output metering log command.

  3. Sort the metering log in the order of virtual system (vsys_id) and the event occurrence time (event_time).

  4. Extract the contents of the periodic log as the accounting target products for each virtual system.

  5. Reference the metering log in the order of time for each virtual system. Calculate the accounting for the accounting target products for the duration between the time of occurrence of an event and the time of the previous event (or the time of the periodic log if the event is the first one).
    Perform following calculations for all of the accounting target products, and sum up the amount.

    Unit price of the product * Unit amount (amount of usage per unit code) * Quantity

    The correspondence relationship between the accounting information and the metering log is shown below.

    Accounting information

    Metering log

    Category code

    Category code

    Component resource type
    (resource_type)

    Item ID

    Item ID of quantity

    cpu

    VM pool name

    vserver

    vm_pool

    cpu_num

    Server pool name

    pserver

    server_pool

    cpu_num

    cpu_clock

    VM pool name

    vserver

    vm_pool

    cpu_perf

    Server pool name

    pserver

    server_pool

    cpu_perf

    memory

    VM pool name

    vserver

    vm_pool

    memory_size

    Server pool name

    pserver

    server_pool

    memory_size

    vm

    Image name

    vserver

    image_name

    -

    pm

    Image name

    pserver

    image_name

    -

    disk

    Storage pool name

    vdisk

    storage_pool

    disk_size

    template

    Template ID

    vsys

    base_template_id

    -

  6. Modify the status of the accounting target product according to the occurred event. For example, delete it from the accounting target products if the event is cancellation (DELETE).

  7. Repeat the steps 5 and 6 until the end data of the accounting calculation.

  8. Repeat the steps 4 through 7 for each virtual system.

Note

  • Do not include the software and system disk in the accounting calculation target because they do not exist in the accounting information.

  • In the case where the accounting information was modified within the accounting target period, clarify how to handle the accounting calculation after the applicable date before performing accounting calculation.

  • The log that shows the tenant that own the system has been changed is output as the event log (CHANGE) when the management source tenant have been changed by the change management source for the L-Platform. Change the tenant to be charged if this accounting event is detected.