Hey guys.
One Question I have in terms of the billing Module: in the Database I noticed that its saving the data in bytes:
MariaDB [librenms]> desc bills;
±-----------------±-------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±-----------------±-------------±-----±----±--------±---------------+
| bill_id | int(11) | NO | PRI | NULL | auto_increment |
| bill_name | text | NO | | NULL | |
| bill_type | text | NO | | NULL | |
| bill_cdr | bigint(20) | YES | | NULL | |
| bill_day | int(11) | NO | | 1 | |
| bill_quota | bigint(20) | YES | | NULL | |
| rate_95th_in | bigint(20) | NO | | NULL | |
| rate_95th_out | bigint(20) | NO | | NULL | |
| rate_95th | bigint(20) | NO | | NULL | |
| dir_95th | varchar(3) | NO | | NULL | |
| total_data | bigint(20) | NO | | NULL | |
| total_data_in | bigint(20) | NO | | NULL | |
| total_data_out | bigint(20) | NO | | NULL | |
| rate_average_in | bigint(20) | NO | | NULL | |
| rate_average_out | bigint(20) | NO | | NULL | |
| rate_average | bigint(20) | NO | | NULL | |
| bill_last_calc | datetime | NO | | NULL | |
| bill_custid | varchar(64) | NO | | NULL | |
| bill_ref | varchar(64) | NO | | NULL | |
| bill_notes | varchar(256) | NO | | NULL | |
| bill_autoadded | tinyint(1) | NO | | NULL | |
±-----------------±-------------±-----±----±--------±---------------+
21 rows in set (0.00 sec)
Example: I have this customer “CustB” that has a Quota type of billing with 2TB
| 2 | CustB | quota | 0 | 1 | 2000000000000 | 13941315 | 32700849 | 32700849 | out | 1999468072891 | 560964431339 | 1438503641552 | 5460438 | 14002420 | 19462858 | 2016-11-27 06:01:01 | CustB | | | 0 |
I noticed that 2TB is converted into 2000000000000 in the DB however 2000000000000 is only 1.8TB in real calculation !
Am I missing something here - or these values are just for reference in the Database.
Thanks