Commit Graph

1337 Commits

Author SHA1 Message Date
Robert Chacón
2e50a2a108
Update integrationSplynx.py 2023-03-03 20:38:32 -07:00
Robert Chacón
fae48c85a5
Update ispConfig.example.py 2023-03-03 20:35:15 -07:00
Robert Chacón
0f9a2b0e21
Update integrationSplynx.py 2023-03-03 20:34:18 -07:00
Robert Chacón
b100870e3c
Update integrationCommon.py 2023-03-03 20:28:22 -07:00
Robert Chacón
6c84100832
Update integrationUISP.py 2023-03-03 20:27:36 -07:00
Robert Chacón
aa3184c64b
Update integrationSplynx.py 2023-03-03 19:50:47 -07:00
Robert Chacón
38fba4a0a4
Add warnings, try to troubleshoot issue 273 2023-03-03 18:30:17 -07:00
Herbert Wolverson
7e5b432253 First refactor towards the "funnel" - shaped devices in lqosd
ShapedDevices.csv is now monitored in lqosd. This brings some
advantages:

* The Tracked Devices list now knows the circuit id association
  for every tracked IP.
* The associations auto-update after a ShapedDevices reload.
* The webserver is no longer doing Trie lookups to figure
  out what name to display.

Moving forwards, this will allow for stats gathering to group
IPs by circuit, and allow calculation of the "funnel".
2023-03-03 21:42:22 +00:00
Herbert Wolverson
42c2c63f55 In lqosd, replace lazy_static with once_cell, per Rust best practices
These days the Rust team are recommending "once_cell", which has
simpler syntax and does the same thing.
2023-03-03 20:26:14 +00:00
Herbert Wolverson
99dc9fc066 Add batching to LibreQoS.py python XDP mapping system
* Add a new Python-exported class ('BatchedCommands') to the
  Python-Rust library.
* Replace direct calls to xdp_iphash_cpu_cmdline with batched
  commands.
* Execute the single batch and obtain counts from the batch.
2023-03-03 16:52:34 +00:00
Herbert Wolverson
24722aa608 Force types to be integers in Python
Replace:
min(data[node]['downloadBandwidthMbps'],parentMaxDL)

With:
min(int(data[node]['downloadBandwidthMbps']),int(parentMaxDL))

Python thought my current configuration contained a string for one
of the numbers. It was a string representing an int. Force strong
typing (a non-numeric will fail, but it would fail anyway).
2023-03-03 14:25:36 +00:00
Herbert Wolverson
433e7ac877 Consolidate hex string to u32 conversion
Rather than having lots of "cpu.replace("0x", "").str_radix(...)
calls around, move to a single, unit-tested function in lqos_utils
and use it repeatedly.
2023-03-03 14:17:31 +00:00
Robert Chacón
308453fecf
Update integrationSplynx.py 2023-03-02 21:21:40 -07:00
Robert Chacón
55ca0adcf0
Update integrationSplynx.py 2023-03-02 10:24:58 -07:00
Robert Chacón
765056f8be
Update integrationSplynx.py 2023-03-02 10:22:40 -07:00
Herbert Wolverson
dca743850a Fix redacting of individual IPs in web console. 2023-03-02 14:41:37 +00:00
Robert Chacón
cae04e1930
Update integrationSplynx.py 2023-03-01 19:34:03 -07:00
Robert Chacón
b33951a8fb
Update integrationSplynx.py 2023-03-01 17:54:51 -07:00
Robert Chacón
eb02c95688
Fix https://github.com/LibreQoE/LibreQoS/issues/273#issuecomment-1451049170 2023-03-01 17:51:59 -07:00
Herbert Wolverson
44ddde6cc5 After coffee, I realized the previous commit had a bug - this should take care of removing comments altogether by mistake. 2023-03-01 15:08:22 +00:00
Herbert Wolverson
ca2cb0dcec Update cargo.lock versions again 2023-03-01 14:51:39 +00:00
Herbert Wolverson
f4a92b59fd Oops - mark # as a char, not a string. 2023-03-01 14:43:20 +00:00
Herbert Wolverson
1467211158 Fix double interfaceA in setup generated configuration files.
This one was pretty funny. Any line that contained interfaceA in
ispConfig.example.py was transformed into an interfaceA statement.

I forgot to check for comments, so the comment on how to use
onAStick configuration *also* generated an interface statement.

It now just copies comments verbatim.
2023-03-01 14:42:05 +00:00
Robert Chacón
d08fcd1ace
Update README.md 2023-02-28 09:53:52 -07:00
Robert Chacón
1feed2b6e8
Update FUNDING.yml 2023-02-28 09:18:10 -07:00
Robert Chacón
c24c0c191c
Update FUNDING.yml 2023-02-28 09:06:23 -07:00
Robert Chacón
b447299e83
Update README.md 2023-02-28 09:06:02 -07:00
Robert Chacón
9fc4e0c537
Update README.md 2023-02-28 09:05:27 -07:00
Robert Chacón
912099cf3d
Fix pertaining to https://github.com/LibreQoE/LibreQoS/issues/273
Ensure client is active before attempting to pull plan info
2023-02-27 16:57:30 -07:00
Robert Chacón
da42238332
Fix related to https://github.com/LibreQoE/LibreQoS/issues/273
Ensure client is active before attempting to pull plan info
2023-02-27 16:55:28 -07:00
Dave Taht
9b0313a942 build-rust to build_rust
Fixes: #276
2023-02-27 08:46:16 -08:00
Dave Taht
6671eb7c64 Updated copyrights to 2022-2023
Someday I hope something other than my amazing sed skills will be
of use in refactoring this project.
2023-02-25 15:46:32 -08:00
Herbert Wolverson
c73af2de89 Auto include a MOTD script to remind the user that they have installed LibreQoS and how to get to the web UI. 2023-02-24 18:55:44 +00:00
Herbert Wolverson
b98417282a Trim dependency list in .deb to not include development/build only dependencies, fix an oops with quoting an integer. 2023-02-24 18:19:25 +00:00
Herbert Wolverson
6eb9c80a3b Update Cargo.lock to latest versions 2023-02-24 17:41:51 +00:00
Herbert Wolverson
4ddf665e14 Fix name that should have been 2023-02-24 17:37:43 +00:00
Herbert Wolverson
2b8ed7ef1f Cleanup path error message (wasn't doing anything) from build_dpkg 2023-02-24 17:34:40 +00:00
Herbert Wolverson
1f5629a8c3 Tweak to previous commit: I didn't intend to filter out no-RTT
hosts from the top downloaders list, since they might be
non-TCP traffic.
2023-02-24 15:02:57 +00:00
Herbert Wolverson
6b82fd968e Fix RTT outliers
1) When calculating median latency, reject any entry that doesn't
   have at least 5 data points. From local testing, 5 appears
   to be the magic number (when combined with sampling time) that
   ignores the "idle" traffic from CPEs, routers and long-poll
   sessions on devices.

2) Filter out RTT 0 from best/worst reports.

3) Note that no data is discarded - it's just filtered for display.

This results in a much cleaner display of RTT times in the
reporting interface, giving a much better ability to "zero in"
on problem areas without being distracted by poor RTT - but
basically no traffic - hosts that are idle.
2023-02-24 14:53:47 +00:00
Herbert Wolverson
791ff97eef Update DPKG build script to use version numbering from date
to handle nightly or similar builds and always increase the
build number for upgrades.
2023-02-21 20:56:46 +00:00
Herbert Wolverson
3e9ff0c0f5 (Very alpha!) Add dpkg builder and initial configurator
* Adds a new Rust program, `lqos_setup`.
    * If no /etc/lqos.conf is found, prompts for interfaces and
      creates a dual-interface XDP bridge setup.
    * If no /opt/libreqos/src/ispConfig.py is found, prompts
      for bandwidth and creates one (using the interfaces also)
    * Same for ShapedDevices.csv and network.json
    * If no webusers are found, prompts to make one.
* Adds build_dbpkg.sh
    * Creates a new directory named `dist`
    * Builds the Rust components in a portable mode.
    * Creates a list of dependencies and DEBIAN directory
      with control and postinst files.
    * Handles PIP dependencies in postinst
    * Calls the new `lqos_setup` program for final
      configuration.
    * Sets up the daemons in systemd and enables them.

In very brief testing, I had a working XDP bridge with
1 fake user and a total bandwidth limit configured and
working after running:

dpkg -i 1.4-1.dpkg
apt -f install

Could still use some tweaking.
2023-02-21 20:26:34 +00:00
Robert Chacón
e74662631c
Merge pull request #269 from interduo/chmodx
improvement: add +x for lqTools.py
2023-02-19 00:36:36 -07:00
Jarosław Kłopotek - INTERDUO
71f75cc6c3 improvement: add +x for lqTools.py 2023-02-16 15:41:27 +01:00
Herbert Wolverson
da44d38888 Temporary: mark --updateonly as unavailable if OnAStick
The partial reload mechanism *really* doesn't work with OnAStick
configurations at present. There's a lot of work required to make
it function. In the meantime, warn the poor user that this
isn't going to work.

Affects ISSUE #129
2023-02-15 17:14:29 +00:00
Herbert Wolverson
e7d7429058 Fix partial reload in LibreQoS.py for NOT OnAStick mode
OnAStick mode is still broken for partial updates. The
`addDeviceIPsToFilter` function was referencing circuit
information (the class_id) that wasn't present in the
partially reloaded data.

Changed shell call to call `add_ip_mapping` which accesses
the bus directly, saving a shell call.

Part of ISSUE #239 - does not fix it for "on a stick"
configurations.
2023-02-15 17:04:29 +00:00
Herbert Wolverson
54d9fa99a5 Improve error messaged when parsing IPs for iphash_to_cpu/Python
Display the offending string as well as the general "Class id must
be in the format (major):(minor), e.g. 1:12.

May help with diagnosing #239 (since "Error: Class id..." is the
only visible error message.
2023-02-15 15:24:11 +00:00
Herbert Wolverson
f8f438e8d7 Add Python Version Check to Python Scripts
ISSUE #204 : Running on versions prior to 3.10 will fail, due to
the use of `match` statements. Other parts of the script assume
a recent Python also, and the system as a whole expects a recent
version of Ubuntu.

`pythonCheck.py` polls `sys.version_info` to detect the in-use
version of Python. If the version is prior to 3.10, it bails out
with the message "LibreQoS requires Python 3.10 or greater".

This should help with outdated OS detection in general.
2023-02-15 15:00:53 +00:00
Herbert Wolverson
85caa6be19 Stop using unicode extended characters in lqtop
Remove the up and down arrows that render strangely in fonts
that don't support full unicode graphics. Add text UP/DOWN
headings instead.

FIXES #266
2023-02-15 14:41:41 +00:00
Herbert Wolverson
088f608614 #229 - Run cargo fmt to format everything. 2023-02-14 22:06:57 +00:00
Herbert Wolverson
6fe97e97b6 an atomic compare_exchange. 2023-02-14 21:36:16 +00:00