Commit Graph
100 Commits
Author SHA1 Message Date
Herbert Wolverson 36440bdd9c Handle cases where the field isn't present in network.json for backwards compatibility. 2023-04-24 13:48:19 +00:00
Herbert Wolverson 629ebb0293 Hotfix: handle node "type" entry
Adding "type" to `network.json` is awesome, but it broke a bit of
Rust. This patch adds support for the `type` field, and fixes
a rare "none" issue that mostly seems to affect my UISP setup.
2023-04-24 13:28:37 +00:00
Herbert Wolverson 77ecb8afcd Merge branch 'develop' 2023-04-12 14:03:15 +00:00
Herbert Wolverson a526555a45 Merge in UISP quick fix 2023-04-12 13:55:18 +00:00
Herbert Wolverson 0fcc5d0bac Add a lot of is not None tests to the nodeOffPtmp code, to account for offline devices and 'other' devices that don't have all of the required data. 2023-04-12 13:46:04 +00:00
Herbert Wolverson 6df648e299 Allow integrationUISProutes.csv to override default costs in UISP route determination.
Requested by D. Denson.

Now that the UISP network tree is built as a spanning tree, with 10
cost per hop we can reliably flip the tree from A->B->C to C->B->A
depending upon root positioning.

This addition allows you to specify additional routes (that MUST
exist!) e.g. A->C and specify a cost to use instead of the default
10. This allows for topologies in which A-B-C is actually faster
than a direct A-C route (for example, becuase of short 60ghz
hops).
2023-04-12 13:29:33 +00:00
Herbert Wolverson 2d3874e812 Build complete spanning tree for data links and use it to orient tree
Rather than obeying the "parent" field, which leads to wrong-way up
graphs when building from a non-root site - instead build a complete
cost-based spanning tree from the specified root node. Then use
the generated tree - falling back on parent if nothing is found -
to populate the tree in order.

Tested on Herbert's network, correctly generates topology from several
different locations.

Still to come: adding a mechanism for providing parenting overloads
to allow for cases where a long path is actually optimal, but we
have no way of knowing that.
2023-04-12 13:29:33 +00:00
Herbert Wolverson d2aa804ace Use dot renderer for PDF 2023-04-12 13:29:33 +00:00
Herbert Wolverson 6e15181fab Add a couple of 'is none' checks to remove crashes I experienced. 2023-04-12 13:29:33 +00:00
Herbert Wolverson 0cc1a6eaee Add documentation headers for Queue Tracker. 2023-04-12 13:29:33 +00:00
Herbert Wolverson 6106c26899 Add documentation headers for Heimdall. 2023-04-12 13:29:33 +00:00
Herbert Wolverson f56581f1d6 Add some unit tests and documentation to the crate. No functional changes. 2023-04-12 13:29:33 +00:00
Herbert Wolverson c9025f654c Add a couple of unit test. 2023-04-12 13:29:33 +00:00
Herbert Wolverson a16bc66d79 Format-preserving TOML editing
Restore the automatic generation of a node_id if one isn't present,
based on a hash of /etc/machine_id. Switch from the "toml" crate
to the "toml_edit" crate, and use its Document type to preserve
the user's comments and formatting when editing the configuration
file for saving.
2023-04-12 13:29:33 +00:00
Herbert Wolverson fada0a6e92 Fix displayed plans in Top/Worst N tables
A value was transposed in the IPStats to IPStats transit
conversion. The UI now displays (max download/max upload)
correctly.

Fix an accidental inclusion of a console.log statement
logging needlessly.
2023-04-12 13:29:33 +00:00
Herbert Wolverson 04bc7326ad Add DNS resolution to displayed flow IP addresses 2023-04-12 13:29:33 +00:00
Herbert Wolverson 2c63393356 Adds "client throughput" to the queue tree tab of circuit_queue
Also moves all the circuit graphs to use the same graphing
system as the other graphs on the plot.

FIXES #315
2023-04-12 13:29:33 +00:00
Herbert Wolverson 4ed077c634 Last 5 minutes of throughput data are stored server-side on node_manager
A server-side ringbuffer retains just the last 5 minutes of throughput.
When the dashboard first loads, it collects all 5 minutes of data,
so nothing appears skipped. Subsequent updates query the latest
value in the buffer.

FIXES #317
2023-04-12 13:29:32 +00:00
Herbert Wolverson da167fb84d Backlog is in bytes 2023-04-12 13:27:49 +00:00
Herbert Wolverson a34505eca0 Use base delay (which is sparse delay) rather than average delay, and use log y values on the delays chart. 2023-04-12 13:27:48 +00:00
Herbert Wolverson b8921fb7b3 Add pause button and fast/slow modes to circuit_queue page
FIXES #303

Adds a pause button to freeze a snapshot of the current circuit
queue page.

Adds a "fast mode" and "slow mode" toggle. Slow mode continues
at a 1s update cadence. Fast mode uses animation frame support
to update at a good speed, at the expense of CPU usage.

Stores the preference in local storage, so it will resume the
same mode next time you visit the page.
2023-04-12 13:27:29 +00:00
Herbert Wolverson ec9028c3b2 Change units on backlog graph to packets. FIXES #304 2023-04-12 13:26:59 +00:00
Herbert Wolverson 83825e0376 Packet analysis page has a lot more options
See ISSUE #302

* Filter by FlowID
* Pagination is a select/drop-down
* Filtering is a select/drop-down
* Graph type is selectable from:
   * Packet size (the previous view)
   * Piano Roll (flows plotted by time)
   * TCP Window (differntiated by flow)
2023-04-12 13:26:13 +00:00
Herbert Wolverson da0489b638 IP Dump supports flow filtering
Every packet is assigned a "flow id", and the UI allows you to
filter displayed packet data by flow id.
2023-04-12 13:26:10 +00:00
Herbert Wolverson cb63968e81 Allow integrationUISProutes.csv to override default costs in UISP route determination.
Requested by D. Denson.

Now that the UISP network tree is built as a spanning tree, with 10
cost per hop we can reliably flip the tree from A->B->C to C->B->A
depending upon root positioning.

This addition allows you to specify additional routes (that MUST
exist!) e.g. A->C and specify a cost to use instead of the default
10. This allows for topologies in which A-B-C is actually faster
than a direct A-C route (for example, becuase of short 60ghz
hops).
2023-04-11 15:30:47 +00:00
Herbert Wolverson ff4df61d54 Build complete spanning tree for data links and use it to orient tree
Rather than obeying the "parent" field, which leads to wrong-way up
graphs when building from a non-root site - instead build a complete
cost-based spanning tree from the specified root node. Then use
the generated tree - falling back on parent if nothing is found -
to populate the tree in order.

Tested on Herbert's network, correctly generates topology from several
different locations.

Still to come: adding a mechanism for providing parenting overloads
to allow for cases where a long path is actually optimal, but we
have no way of knowing that.
2023-04-06 16:22:01 +00:00
Herbert Wolverson d33cd0d3e6 Use dot renderer for PDF 2023-04-05 20:34:32 +00:00
Herbert Wolverson 5f9655b529 Add a couple of 'is none' checks to remove crashes I experienced. 2023-04-05 20:16:57 +00:00
Herbert Wolverson 415f939715 Add documentation headers for Queue Tracker. 2023-04-05 19:21:39 +00:00
Herbert Wolverson bcb4a8a53a Add documentation headers for Heimdall. 2023-04-05 16:58:19 +00:00
Herbert Wolverson bb53be9bfc Add some unit tests and documentation to the crate. No functional changes. 2023-04-05 16:51:15 +00:00
Herbert Wolverson c9a443f77b Add a couple of unit test. 2023-04-05 16:36:10 +00:00
Herbert Wolverson eb9b32ef65 Format-preserving TOML editing
Restore the automatic generation of a node_id if one isn't present,
based on a hash of /etc/machine_id. Switch from the "toml" crate
to the "toml_edit" crate, and use its Document type to preserve
the user's comments and formatting when editing the configuration
file for saving.
2023-04-05 15:00:35 +00:00
Herbert "TheBracket f4991fcb95 Merge pull request #323 from LibreQoE/displayed_plans
Fix displayed plans in Top/Worst N tables
2023-04-03 11:11:04 -05:00
Herbert Wolverson 01433160ac Fix displayed plans in Top/Worst N tables
A value was transposed in the IPStats to IPStats transit
conversion. The UI now displays (max download/max upload)
correctly.

Fix an accidental inclusion of a console.log statement
logging needlessly.
2023-04-03 16:09:53 +00:00
Herbert Wolverson 54d8acc7c1 Merge branch 'develop' of https://github.com/LibreQoE/LibreQoS into develop 2023-04-03 15:34:43 +00:00
Herbert Wolverson ebfcde2618 Fix a missing break - switch fallthrough by mistake - in dissector.h. This fixes a problem with misidentifying traffic as TCP when it is't. 2023-04-03 15:34:32 +00:00
Herbert Wolverson 34e3381af4 Add file missing from previous commit 2023-04-03 15:34:32 +00:00
Herbert Wolverson 16721208e6 Add DNS resolution to displayed flow IP addresses 2023-04-03 15:34:32 +00:00
Herbert Wolverson 9fce5d51de Adds "client throughput" to the queue tree tab of circuit_queue
Also moves all the circuit graphs to use the same graphing
system as the other graphs on the plot.

FIXES #315
2023-04-03 15:34:32 +00:00
Herbert Wolverson 3bc2c16328 Last 5 minutes of throughput data are stored server-side on node_manager
A server-side ringbuffer retains just the last 5 minutes of throughput.
When the dashboard first loads, it collects all 5 minutes of data,
so nothing appears skipped. Subsequent updates query the latest
value in the buffer.

FIXES #317
2023-04-03 15:34:32 +00:00
Herbert Wolverson 1b73c3765c Backlog is in bytes 2023-04-03 15:34:32 +00:00
Herbert Wolverson 3f4ee288ae Use base delay (which is sparse delay) rather than average delay, and use log y values on the delays chart. 2023-04-03 15:34:32 +00:00
Herbert Wolverson 53acf90600 Add pause button and fast/slow modes to circuit_queue page
FIXES #303

Adds a pause button to freeze a snapshot of the current circuit
queue page.

Adds a "fast mode" and "slow mode" toggle. Slow mode continues
at a 1s update cadence. Fast mode uses animation frame support
to update at a good speed, at the expense of CPU usage.

Stores the preference in local storage, so it will resume the
same mode next time you visit the page.
2023-04-03 15:34:32 +00:00
Herbert Wolverson 7321c00234 Change units on backlog graph to packets. FIXES #304 2023-04-03 15:34:32 +00:00
Herbert Wolverson 536d165f9b Fix loss of context when clicking zoom in/out buttons. 2023-04-03 15:34:32 +00:00
Herbert Wolverson 869f97ff3b Packet analysis page has a lot more options
See ISSUE #302

* Filter by FlowID
* Pagination is a select/drop-down
* Filtering is a select/drop-down
* Graph type is selectable from:
   * Packet size (the previous view)
   * Piano Roll (flows plotted by time)
   * TCP Window (differntiated by flow)
2023-04-03 15:34:32 +00:00
Herbert Wolverson 182dbcf8d9 IP Dump supports flow filtering
Every packet is assigned a "flow id", and the UI allows you to
filter displayed packet data by flow id.
2023-04-03 15:34:32 +00:00
Herbert Wolverson 7b571213d9 Fix a missing break - switch fallthrough by mistake - in dissector.h. This fixes a problem with misidentifying traffic as TCP when it is't. 2023-03-31 17:31:59 +00:00
Herbert Wolverson 28e1b020af Add file missing from previous commit 2023-03-31 17:12:18 +00:00
Herbert Wolverson aa7cf1fc68 Add DNS resolution to displayed flow IP addresses 2023-03-31 17:10:43 +00:00
Herbert Wolverson e6cb58bc65 Adds "client throughput" to the queue tree tab of circuit_queue
Also moves all the circuit graphs to use the same graphing
system as the other graphs on the plot.

FIXES #315
2023-03-31 16:20:56 +00:00
Herbert Wolverson 2574e40790 Fix displayed plans in Top/Worst N tables
A value was transposed in the IPStats to IPStats transit
conversion. The UI now displays (max download/max upload)
correctly.

Fix an accidental inclusion of a console.log statement
logging needlessly.
2023-03-31 14:36:43 +00:00
Herbert Wolverson a59d7c1762 Last 5 minutes of throughput data are stored server-side on node_manager
A server-side ringbuffer retains just the last 5 minutes of throughput.
When the dashboard first loads, it collects all 5 minutes of data,
so nothing appears skipped. Subsequent updates query the latest
value in the buffer.

FIXES #317
2023-03-30 14:46:30 +00:00
Herbert Wolverson 920399c4e5 Add favicon with explicit link rel element to call it. 2023-03-28 21:05:13 +00:00
Herbert Wolverson 66220ad16b Backlog is in bytes 2023-03-28 16:21:14 +00:00
Herbert Wolverson 73427519c8 Use base delay (which is sparse delay) rather than average delay, and use log y values on the delays chart. 2023-03-28 16:07:49 +00:00
Herbert Wolverson 0dc7ef4201 Add pause button and fast/slow modes to circuit_queue page
FIXES #303

Adds a pause button to freeze a snapshot of the current circuit
queue page.

Adds a "fast mode" and "slow mode" toggle. Slow mode continues
at a 1s update cadence. Fast mode uses animation frame support
to update at a good speed, at the expense of CPU usage.

Stores the preference in local storage, so it will resume the
same mode next time you visit the page.
2023-03-28 14:13:36 +00:00
Herbert Wolverson 394dd341fe Change units on backlog graph to packets. FIXES #304 2023-03-28 13:15:53 +00:00
Herbert Wolverson 2b4ce66f70 Fix loss of context when clicking zoom in/out buttons. 2023-03-28 13:11:53 +00:00
Herbert Wolverson 33d48f3e82 Packet analysis page has a lot more options
See ISSUE #302

* Filter by FlowID
* Pagination is a select/drop-down
* Filtering is a select/drop-down
* Graph type is selectable from:
   * Packet size (the previous view)
   * Piano Roll (flows plotted by time)
   * TCP Window (differntiated by flow)
2023-03-27 18:05:43 +00:00
Herbert Wolverson 2dd1807272 IP Dump supports flow filtering
Every packet is assigned a "flow id", and the UI allows you to
filter displayed packet data by flow id.
2023-03-27 16:21:46 +00:00
Herbert Wolverson b93d91c557 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-03-27 15:03:25 +00:00
Herbert "TheBracket b99073460a 1st Draft of CONTRIBUTING.md
This is very much a first draft. Comments and edits are appreciated.
2023-03-27 08:03:12 -07:00
Herbert Wolverson cc87412a84 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-03-25 15:08:32 +00:00
Herbert "TheBracket 05186030e4 Merge pull request #299 from LibreQoE/heimdall
Heimdall to main
2023-03-25 10:08:13 -05:00
Herbert Wolverson e50e03411e Revert WebGL on tins, it doesn't work well on Apple devices. 2023-03-25 14:47:51 +00:00
Herbert "TheBracket 0cf7d5dd0a Heimdall circuit UI speed (#296)
* Circuit queue - lazy rendering by active tab

Only perform network requests for the active tab on the
circuit_queue.html page. Small to moderate performance
improvement, but it greatly reduces the time spent polling.

* Significantly optimize network and rendering performance of the queues funnel display.

* Substantially improve performance on the flows display by using msgpack with a dictionary.

* Remove some commented code

* Fetch circuit info via efficient msgpack

* Use MsgPack for circuit throughput

* Get rid of the monstrosity that was copying queue data over the bus in a raw JSON string, hideously wasteful. Instead, we now have a 'transit' series of objects in the bus definition for tight encoding. This also cleaned up some node manager code. It's mostly useful for the next stage, which will start to reduce the amount of data we are transmitting.

* A lot of the redundant network transport is culled.

* More unused fields culled.

* Elimate a HUGE amount of garbage collection by allocating and reusing a single object, and cleaning up the JS rendering. Still not good enough.

* Switch to an efficient msgpack transmission format.

* Cleanup handling of 'none' in msgpack

* Fix scale delays to ms

* Commit to send to payne

* Use WebGL for a slight rendering boost.

* Further reduce draw time of circuit page by using redraw commands.

* Finish previous commit

* Use redraw with preallocated/non-GC data for all ringbuffer renders.

* Fix a rare issue with reloading network.json that could cause a stall.

* Optimize RTT graphs with the reload system.
2023-03-25 07:37:04 -07:00
Herbert Wolverson d53200f43d Fix from chat: add quotes around node_id in the setup. 2023-03-24 13:05:31 +00:00
Herbert Wolverson 936a2f7a21 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-03-24 12:53:07 +00:00
Herbert "TheBracket cf41b47b77 Issue 288 - 0s showing up as dots, delays unit (#295)
* Hide zero values for throughput, backlog and delays graphs

Relates to ISSUE #288

* New function `array_to_zero` to reduce repetition.
* Transform zero values to `null` in Y value arrays for the
  throughput, backlog and delay graphs on circuit_info.html
* Also change tin labelling to match the "backlog" graph on
  Delays.
* Reduce marker size.

* Scale displayed/graphed queue delays to ms

References ISSUE 288

Scale the delays graph entries, which are apparently in usec, to
ms.
2023-03-23 11:50:19 -07:00
Herbert "TheBracket b8436ca734 Parse fwmark in Cake stats as a TcHandle (#294)
FIXES #289

Extend TC parser to handle cases that don't have a colon at all.
Use this to parse the `fwmark` field in the Cake stats, which
is probably a TC handle - but since the cake source doesn't
document it, it might be a random number for all we know.

The `fwmark` field isn't actually referenced anywhere in the
program.
2023-03-23 11:50:01 -07:00
Herbert "TheBracket 25801b6445 Issue 291 capture time (#293)
* Make packet capture time user configurable.

* Add `packet_capture_time` to /etc/lqos.conf as a number (seconds)
* Rework the capture logic to obtain the capture time and wait for
  the specified period.
* Rename some functions that specified ten seconds in the name.

Relates to ISSUE #291

* Remove a dangling dashboard link

* Change libpcap download filename to <capture-circuit_id.pcap>

Relates to ISSUE #291

* Pass the circuit_id to the ip_dump page.
* Include the circuit_id in the downloaded packet capture
  filename.

* Add starting timestamp to capture filename

Adds the starting timestamp (in ns) to the capture filename when
you download a libcap dump. Ending timestamp isn't included; the
starting stamp is almost certainly unique.

Relates to ISSUE #291 and fixes the parts that I intend to
touch.
2023-03-23 11:49:36 -07:00
Herbert "TheBracket a32949c76d Rust licenses (#292)
* Add license specifier to all Cargo.toml files

Explicitly specify `license = "GPL-2.0-only"` in each Cargo.toml
file. The wording is from the SPX guidelines.

* Add shell script to check licenses of Rust projects

rust/check_licenses.sh automatically verifies all dependencies
for accidental usage of GPLv3. Since basically nobody in the
universe uses GPLv3, it tends not to do much.
2023-03-23 11:49:07 -07:00
Herbert "TheBracket c17d269ad6 Rust licenses (#292)
* Add license specifier to all Cargo.toml files

Explicitly specify `license = "GPL-2.0-only"` in each Cargo.toml
file. The wording is from the SPX guidelines.

* Add shell script to check licenses of Rust projects

rust/check_licenses.sh automatically verifies all dependencies
for accidental usage of GPLv3. Since basically nobody in the
universe uses GPLv3, it tends not to do much.
2023-03-23 11:48:03 -07:00
Herbert Wolverson 67c2ef7a24 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-03-23 13:46:40 +00:00
Herbert Wolverson 4f574cd668 Improved circuit queue graph labelling 2023-03-22 17:55:12 +00:00
Herbert Wolverson 7326163918 Combine axes on the circuit queue front tab. 2023-03-22 17:30:43 +00:00
Herbert Wolverson 7f746d71a1 Start labelling axes 2023-03-22 15:46:09 +00:00
Herbert Wolverson 1daf727374 Consistent naming: 'tree' not 'funnel'. 2023-03-22 15:34:02 +00:00
Herbert Wolverson b05afdac0c Hyperlink trees from front-page funnel to the appropriate tree page. 2023-03-22 15:03:43 +00:00
Herbert Wolverson ebb01286ce Correct 'DHCSP' to 'DSCP'. I think I had DHCP on my mind. 2023-03-22 14:39:32 +00:00
Herbert Wolverson f9b5dd7853 This should fix the eBPF validator error. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 13e65cad70 Fix a bad case of the NaNs. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 98d7bb88e1 The new Heimdall UI which requires explicitly starting capture sessions. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 4d0fd00583 Remove unused file 2023-03-22 14:39:32 +00:00
Herbert Wolverson 2779cf20c9 Rearrange Heimdall
Refactor Heimdall into a more self-contained process, separate its
operation into its own thread rather than occupying the main
tick thread.
2023-03-22 14:39:32 +00:00
Herbert Wolverson 5ff671567a Some relatively simple performance enhancements that reduce the burden of Heimdall when he's not looking. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 810823c8bb Fix verifier dislike bpf_probe 2023-03-22 14:39:32 +00:00
Herbert Wolverson 951ee4cbe5 Make it easier to change capture size at compile time, set to 128 bytes. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 17100415dd Add libpcap format support and ability to download a snapshot of the last 10 seconds in pcap format for Wireshark (or other tool) analysis. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 8288bb3f9b Extend the capture to include TCP flags, window and ACK data. 2023-03-22 14:39:32 +00:00
Herbert Wolverson d542bf1660 Abuse error bars to show packet durations on dump view. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 521b383ef7 Oops - packet buttons didn't render. 2023-03-22 14:39:32 +00:00
Herbert Wolverson eba74042dd Fix warning 2023-03-22 14:39:32 +00:00
Herbert Wolverson d58c1cb459 Slightly more efficient circuit_queues page, and fix the issue with tin data not appearing. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 70b4230339 Switch to a lock free method of storing packets. 2023-03-22 14:39:32 +00:00
Herbert Wolverson f6d4542598 Add a packet dump page, and the beginnings of a packet browser at NS resolution. 2023-03-22 14:39:32 +00:00
Herbert Wolverson 450466976a Fix warnings 2023-03-22 14:39:32 +00:00
Herbert Wolverson 7180eb48dc WIP: You can now view the last 10 seconds of flow data in the API. 2023-03-22 14:39:31 +00:00