In OnApp version 4.x.x in Tools –> Stats –> Cloud Usage disk I/o and data and bandwidth usage can be found.
—————————————————————–
To get a total usage for a VM will require pulling information out of the database.
==================================================
mysql> select id from virtual_machines where identifier=’g223apmi23oo15′;
+—-+
| id |
+—-+
| 67 |
+—-+
1 row in set (0.00 sec)
mysql> select id from network_interfaces where virtual_machine_id=67;
+—-+
| id |
+—-+
| 69 |
+—-+
1 row in set (0.00 sec)
mysql>select * from interface_usage_statistics where network_interface_id=69\G
This will pull a lot of data, so you may want to tailor your query:
mysql> explain interface_usage_statistics;
+———————-+————–+——+—–+———+—————-+
| Field | Type | Null | Key | Default | Extra |
+———————-+————–+——+—–+———+—————-+
| id | int(11) | NO | PRI | NULL | auto_increment |
| network_interface_id | int(11) | YES | | NULL | |
| data_sent_raw | bigint(20) | YES | | NULL | |
| data_received_raw | bigint(20) | YES | | NULL | |
| data_sent | bigint(20) | YES | | NULL | |
| data_received | bigint(20) | YES | | NULL | |
| created_at | datetime | YES | | NULL | |
| updated_at | datetime | YES | | NULL | |
| elapsed_time | int(11) | YES | | NULL | |
| period | varchar(255) | YES | MUL | NULL | |
+———————-+————–+——+—–+———+—————-+
10 rows in set (0.00 sec)
( Also, please note that this is in KB. )
mysql> select sum(data_sent), sum(data_received) from net_hourly_stats where network_interface_id = 976 and stat_time >= ‘2015-05-01 00:00:00’ and stat_time < ‘2015-06-01 00:00:00’;
+—————-+——————–+
| sum(data_sent) | sum(data_received) |
+—————-+——————–+
| 320631075 | 37234022 |
+—————-+——————–+
1 row in set (0.05 sec)
====================================================