This replaces UPDATE IF SELECT ELSE INSERT by ON DUPLICATE KEY
UPDATE. In addition, queries have been consolidated by ordering
data in advance and then using executemany.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This implement to different minimum distances in seconds for the
router stats in general and the netif stats in particular.
The values are chosen so that they are 30 secs. shorter than the
desired timespans of 5 and 10 minutes, to allow for fluctuation
in when data arrives.
This fixes the data density increase caused by V2 Hoods with two
gateways.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This adds gateway stats which work similar to the detailed hood
statistics.
This requires changes to the MySQL database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Introduces two new query parameters:
gw:<mac> looks for routers being aware of the specified gateway
selected:<mac> looks for routers CONNECTED to the specified gw
Both variants support regex.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Minimum percentage for firmware increased to 2 per cent, for
routers increased to 3 per cent.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This includes various changes throughout the code. Additionally,
some fields are reordered.
This requires a change of the MySQL table router_neighbor!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Previously, I just deleted all entries and recreated them again
with INSERT. Although this is simple to write and actually includes
less queries, it causes a lot more write IO. Since most of the
neighbors and interfaces do NOT change frequently, it is worth the
extra effort to delete only those really gone since the last
update.
Only br-mesh will normally have assigned IPv6 addresses, thus
we just delete all IPv6 adresses of the other ones.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Previously, on restart the traffic of the last period before
the restart was reused.
Now, we use the logged traffic divided by the uptime.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This shows information about WiFi parameters (e.g. channel).
Except the Tx-Power, data is only available if a firmware with
a corresponding nodewatcher update is present (version 44).
This requires a change of the MySQL table router_netif!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Since all meshing interface have different MAC adresses, the
mac itself should be unique.
This is just a change of the database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is meant to reflect the order of the primary key.
This is just a change of the database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This is meant to reflect the order of the primary key.
This is just a change of the database!
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This introduces a serious of changes to code and database.
This patch requires changes to the MySQL database.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
If KeyXchange v1 routers are not shown, their popup windows are
now also disabled (as the user would expect); same for v2.
Fixes#95.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This index drastically reduces the time required for the DELETE
commands, while the other commands are not affected to strongly.
This is mainly a change to the database.
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>