(Click to open topic with navigation)
A usage charge debits the appropriate allocations based on the attributes of the usage. The charge is calculated based on factors including the resources and services used, the usage time, and other quality-based factors (see Managing charge rates). By default, any liens associated with the charge will be removed. The incremental option may be specified if you want associated liens to be reduced instead of removed. If a usage record already exists for the instance being charged it will be updated with the data properties passed in with the charge request, otherwise a new usage record will be created.
A quote id can be specified to use a previously quoted set of charge rates. This will also ensure the charge will update the usage record instantiated with the quote. A lien id can be specified to help match up a charge with its lien (this may assist in deleting the correct lien if instance ids are not unique). This will also ensure the charge will update the usage record that may have been instantiated by the lien.
Although, by default, Moab Accounting Manager will calculate the charge for the usage using its default charge rates or using the charge rates saved by a referenced quote or quote template, it is possible to specify override charge rates via the rate option. Alternatively, it is possible to designate an externally calculated charge by specifying the charge amount with the Charge option (-z option to gcharge).
To charge for a usage use the command gcharge:
gcharge [-T usage_record_type] [-S service_id] [-u user_name] [-g group_name] [-a account_name] [-o organization_name] [-c class_name] [-Q quality_of_service] [-m machine_name] [-N nodes] [-P processors] [-C cpu_time] [-M memory] [-D disk] [-x usage_state] [-X, --extension property=value]... [-t charge_duration] [-s charge_start_time] [-e charge_end_time] [-d charge_description] [-z charge_amount] [-f fund_id] [--incremental] [-R charge_rate_name[{charge_rate_value}]=charge_rate_amount,...]... [h, --hours] [--itemize] [--debug] [--site site_name] [--help] [--man] [--quiet] [--verbose] [--version] [[-j] usage_record_id] [-q quote_id] [-l lien_id] {-J instance_name|job_id}
Example 10-8: Issuing a usage charge
$ gcharge -J PBS.1234.0 -a chemistry -u amy -m colony -P 2 -t 1234
Successfully charged 2468 credits for instance PBS.1234.0
1 lien was removed
Related topics