Accounting Guide 2.0
The accounting toolset visualizes and reports resource usage data, and allows their integration with chargeback and billing platforms. The toolset generates accounting reports using the information from the internal OpenNebula Database, and a set of policies and practices to integrate OpenNebula accounting tools within the data-centers accounting procedures.
These accounting tools and policies address three different aspects, namely:
This addons requires the following gems:
Download the addon, untar and execute 'install.sh' as the oneadmin user.
No configuration is needed for this addon.
Usage of a physical resource can be obtained for a given user or a given virtual machine. Accounting reports always show aggregated information, considering possible migration of a virtual machine to between physical resources.
oneacct host
- prints accounting information for the physical resources
<xterm>oneacct host [-h] [-x] [-d n|-w n|-m n|-t s] ←u user|-r host>
-h prints help -x outputs information in XML format -d n prints information for the last n days -w n prints information for the last n weeks -m n prints information for the last n months -t s prints information for the last s seconds in epoch months -r hostname or host ID for printing accounting information -u user name or user ID for printing accounting information </xterm>
Obtaining the accounting information for user john
<xterm> $ oneacct host -u john
HOST XFR RUNN VMS sun 00:00:05 00:18:40 2 rigil 00:00:05 00:00:02 1
schedar 00:00:02 198:17:53 1 </xterm>
The columns are:
Obtaining accounting information for host
<xterm> $ oneacct host -r rigil
USER XFR RUNN VMS admin 00:00:05 00:00:02 1 hugo 00:00:02 194:25:30 1
</xterm>
Accounting information for Virtual Machines can be obtained for a given user or a given virtual machine.
The current version of the virtual resources reports does not consider possible migration of a virtual machine to between physical resources.
oneacct vm
- prints accounting information for virtual machines
<xterm>oneacct vm [-h] [-x] [-d n|-w n|-m n|-t s] ←u user|-r host| vmid>
-h prints help -x outputs information in XML format -d n prints information for the last n days -w n prints information for the last n weeks -m n prints information for the last n months -t s prints information for the last s seconds in epoch months -r hostname or host ID for printing accounting information -u user name or user ID for printing accounting information vmid the ID or name of the VM for printing accounting information </xterm>
Obtaining the accounting information for a given VM
<xterm> $ oneacct vm 2
HOST XFR RUNN sun 00:00:01 00:00:21
schedar 00:00:02 198:17:53 </xterm>
The columns are:
Obtaining the accounting information for a given host
<xterm> $ oneacct vm -r rigil VMID NAME XFR RUNN
5 xee 2 194:25:30 6 phi 5 00:00:02
</xterm>
Obtaining the accounting information for a given user
<xterm> $ oneacct vm -u carroll VMID NAME XFR RUNN HOSTS
3 Ubuntu-9 00:00:01 00:02:54 3 4 Ubuntu-9 00:00:00 00:00:10 2
</xterm>
In this last example columns show agregated transfer and running times.