4 1. ERD - Entity relation diagram
8 5. Effective quota entity
13 +----------------------------+ +--------------------+ +-------------+
14 | restrictions | | statistics | | quotas |
15 |----------------------------| |--------------------| |-------------|
16 |binpath: TEXT |<--->|binpath: TEXT |<-->|binpath |
17 |cpu: INT | | |received: BIGINT | |sent_quota |
18 |mem: INT | | |sent: BIGINT | |rcv_quota |
19 |incomming_rate: INT | | |time_stamp: BIGINT | |time_period |
20 |outgoing_rate: INT | | |ifname: TEXT | |start_time |
21 | | | |ifmac: TEXT | +-------------+
24 +----------------------------+ | +--------------------+
27 | +---------------------------+
29 | |---------------------------|
36 +---------------------------+
40 Holds information about counted traffic per time points, time_stamp - it's time
41 point. Accumulation of the information proceses in main loop of perf-controld.
44 3. Restrictions entity
45 ----------------------
46 Holds information about restriction see set_restriction function. Every time we
47 set restriction we store it in the database, it give us an ability to apply
48 restriction for example after reboot.
49 TODO: Possible bug. We don't separate quota based restriction and user based.
50 User based restriction should be applied without conditions, quota based should
51 be checked is quota active.
56 Holds information about quota.
59 5. Effective quota entity
60 -------------------------
61 Holds information about active quota. One enty per quotas time interval.
64 | time period | time period | time period |
65 ------------------------------------------------------------------------------>
67 start time finish time finish time