Commit Graph

1137 Commits

Author SHA1 Message Date
Interduo
f6927c3c27
bugfix: set propper path 2023-01-24 15:31:00 +01:00
Interduo
64d47268ac
bugfix: propper path 2023-01-24 15:27:49 +01:00
Interduo
b93b944cb0
improvement: put warning in README and add some MD formatting tags 2023-01-24 14:46:57 +01:00
Interduo
55fbf8a444
improvement: bump version in comment 2023-01-24 12:58:21 +01:00
Robert Chacón
d72e27b171
Merge pull request #215 from interduo/patch-12
bugfix: slowly ubuntu starting when one of network interface is not up
2023-01-23 15:13:50 -07:00
Herbert Wolverson
c9810f93b6 Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-01-23 22:01:05 +00:00
Herbert Wolverson
11428f65e7 Fix "lqosd is running" error when it clearly isn't.
* Fix the Python code to actually call `is_lqosd_alive()` instead of just
checking that it exists (`is_lqosd_alive`).
* Fix the os.exit command syntax.
* Cleanup the blocking Tokio/lqosd request handler to pass better messages.
* Catch the "file not found" and replace it with a nicer message.
2023-01-23 21:59:02 +00:00
Dave Täht
6d475564b8
Merge pull request #218 from interduo/patch-15
bugfix: unit files needs to be enabled
2023-01-23 09:54:04 -08:00
Dave Täht
8dc19a8f9c
Merge pull request #216 from interduo/patch-13
improvement: add alpha version setup guide
2023-01-23 07:42:32 -08:00
Interduo
49b3e046e9
bugfix: unit files needs to be enabled 2023-01-23 16:31:06 +01:00
Interduo
42f62c1078
improvement: add alpha version setup guide 2023-01-23 15:26:50 +01:00
Interduo
6da4820f1a
Update TESTING-1.4.md 2023-01-23 15:11:41 +01:00
Interduo
9653e40943
Update TESTING-1.4.md 2023-01-23 15:09:19 +01:00
Dave Täht
c329304fea
Merge pull request #210 from interduo/patch-10
improvement: add autostart systemd unit files
2023-01-23 05:33:27 -08:00
Dave Täht
07fce55540
Merge pull request #213 from interduo/patch-11
bugfix: change sqm mode to ack-filter was impossible
2023-01-23 05:31:57 -08:00
Dave Täht
6783b9beac
Merge pull request #211 from interduo/patch-8
bugfix: propper path
2023-01-23 05:28:45 -08:00
Dave Täht
328af81553
Merge pull request #212 from interduo/patch-9
bugfix: propper path in lqosd documentation
2023-01-23 05:28:14 -08:00
Interduo
f5b3163c81
Update config.html 2023-01-23 14:13:38 +01:00
Interduo
e19a6f8c23
improvement: add autostart systemd unit files 2023-01-23 14:02:57 +01:00
Interduo
5d01b78492
bugfix: propper path in lqosd 2023-01-23 13:55:41 +01:00
Interduo
378dc6860f
bugfix: propper path 2023-01-23 13:35:21 +01:00
Dave Taht
6fc1c89c0c Use .json extension for json files
I exclude .json from my rg searches, and when going through code
via things like "rg" - having the json show up is kind of painful.

use .txt for text, .json for .json, .whatever.gz for compressed.
2023-01-23 11:50:55 +00:00
Dave Taht
ca01c363c1 Add BestRtt for the sake of example
Also rustfmt engaged and made this bigger than I wanted.
2023-01-23 00:30:31 +00:00
Robert Chacón
43315d5f56
Update TESTING-1.4.md 2023-01-22 12:46:09 -07:00
Robert Chacón
37b9b571ab
Add files via upload 2023-01-22 12:43:23 -07:00
Robert Chacón
dd1ebea185
Update TESTING-1.4.md 2023-01-22 12:34:41 -07:00
Dave Taht
145d9d9a27 Convert /etc/lqos to /etc/lqos.conf globally
Too much chance of someone putting /etc/lqos as a directory.
2023-01-22 19:29:18 +00:00
Dave Taht
75950be5fc Add Bandwidth test to the circuit_queue html page 2023-01-21 21:08:36 +00:00
Dave Taht
79d13718f4 Added Run Bandwidth Test to the Shaped.html page 2023-01-21 21:05:29 +00:00
Dave Taht
40758ffe6b lq_utils: Move packet scaling routines to library
This moves the packet scaling routines for g/m/k gps and
g/m/k bytes to a shared library.
2023-01-21 20:41:37 +00:00
Dave Taht
b2cf27ea9a lqtop: Reorder summary to use same order of result
The default total summar was the opposite of the table below,
and confusing.

Ideally the layout of the topmost bar should be:

LibreQos 'NOT CONNECTED' 'OTHER STATUS' 'down bps' 'up bps' 'pps' 'pps'

But my table-fu failed me.
2023-01-21 20:06:07 +00:00
Dave Taht
20727d44ca lqtop: Consistently right justify most output
By using the handy fmt macros this is feasible if the cell width
is known, via "{:>11}" for example.

However my intuitive thought that this was a "Constraint",
that you could apply to a Cell or Span, and it isn't. There are
multiple calls on the github for this. Until such a day, fmt
goes to 11.
2023-01-21 19:30:27 +00:00
Dave Taht
ee055cc322 H for histograms
Outlining features faster than they can be implemented...

... or considered if they are a good idea or not. More letters
to come!
2023-01-21 18:04:38 +00:00
Herbert Wolverson
37355189b9 Work in progress: transmute netlink cake stats to readable data. Currently uses bytemuck, should be using zerocopy. 2023-01-21 03:31:48 +00:00
Herbert Wolverson
25742c25f6 Remember to add the files... 2023-01-20 21:55:01 +00:00
Herbert Wolverson
14e49ce183 Super incomplete hacking away at netlink access for queues. 2023-01-20 21:52:56 +00:00
Herbert Wolverson
fc8b3ca9e4 Allow paging on TOP-N queries
Change BusRequest::GetTopNDownloaders and GetWorstRtt to accept
a start and end field, rather than just "n_rows".
2023-01-20 21:18:19 +00:00
Herbert Wolverson
f742acafda Merge branch 'main' of https://github.com/LibreQoE/LibreQoS 2023-01-20 19:29:04 +00:00
Herbert Wolverson
922ddd602f A bit of a hybrid commit, sorry. Provides various default pre-allocations that seem reasonable, and fixup on bus permissions. 2023-01-20 19:28:54 +00:00
Dave Taht
3c6f438e06 queue_tracker: use info_once on new fields
Modern linuxes add fields all the time. On a kernel upgrade we
shouldn't crash just because there's a new json field.

Also there are some further optimizations to represent the kernel
structures themselves. Some fields can overflow which would lead
to some surprizing behaviors in polling the json over time.

FIXME - always check for overflow elsewhere, in packets, overlimits
etc. Could that be a trait?
2023-01-20 18:37:23 +00:00
Herbert Wolverson
287ddb6e10 Global allocator and compilation flags update
On systems that support it, `jemallocator` will replace the default
allocator for `lqosd` and `lqos_node_manager`. The Jem allocator
is a LOT more friendly to Rust's preferred vector allocation patterns,
and actually cares about your cache.

Enable "fat" Link-Time Optimization. This slows down compilation a lot,
but results in smaller binaries and permits the LLVM optimizer to
cross crate boundaries when inlining, optimizing tail calls and a
few other optimizations.
2023-01-20 18:06:41 +00:00
Dave Taht
1742232eaf Made tc_fq_codel actually compile
Running cargo build in that dir did not detect the compile issue
cargo build --all from the root dir, did.
2023-01-20 17:54:03 +00:00
Dave Taht
a8cb399630 Shrink fq_codel structures to match the kernel API
FIXME: We need, in general, to check for wrapping in long term runs

* FIXME: Need a test to ensure fq_codel is still parsing
* Still want a size before and after test.

Lastly...

Newer versions of the kernel now have newer options for fq_codel
such as ce_threshold. The present implementation will spam the log
on encountering a newer kernel and tc.
2023-01-20 17:44:10 +00:00
Herbert Wolverson
ff5ad10240 LqTop can use full screen size for data
Added a note for where `n_rows` gains the current terminal size.
`tui` turns out to consume the `Event::Resize` event, so it's
never received - instead, we have to calculate it from the
creation of the UI "chunks".

The rendering length turned out to be an artefact of forgetting
to remove a height constraint from a UI chunk that was tested
and never used. (It briefly contained some graph data).
2023-01-20 17:21:55 +00:00
Herbert Wolverson
d83b8d23e8 Missing documentation tags 2023-01-20 17:17:10 +00:00
Herbert Wolverson
e2f09d14fa Persistent BusClient offers "is_connected"
* At any time, you can ask a BusClient if it is connected.
* If `lqtop` loses connectivity while running, it displays NOT
  CONNECTED in red on the title bar.
* If `lqtop` can't reach the daemon on start, it bails out with
  an error message.
2023-01-20 17:05:58 +00:00
Herbert Wolverson
2deb98a4c1 Fix permissions on creating lock file 2023-01-20 16:46:57 +00:00
Herbert Wolverson
ed07a4666b Add file locking to lqosd
The file locking is "smart": it checks to see if a lock is
valid before refusing to run (and updates the lock if
it can run anyway).

The locking mechanism will fail if you manually create
the lock file and dump random data into it that doesn't
readily convert to an i32.

Affects issue #54 and issue #52

* Add a new structure `FileLock` to `lqosd`.
* FileLock first checks /run/lqos/lqosd.lock. If it exists,
  it opens it and attempts to read a PID from it. If that PID
  is running and the associated name includes "lqosd", the
  FileLock returns an error.
* If no lock exists, then a file is created in
  /run/lqos/lqosd.lock containing the running PID.
* Includes Drop and signal termination support.
2023-01-20 16:05:55 +00:00
Herbert Wolverson
357bec9ad2 Forgot to remove a debug line 2023-01-20 16:04:50 +00:00
Herbert Wolverson
dbe0b3bdfd Provide explicit cleanup of the lqos_bus socket on signals.
Since guarantying the execution of Drop traits on process
termination from signals is now "unsound" in the Rust specs,
provide an explicit clean-up path for `lqosd`, called when
a termination signal is processed. This removes the Unix
stream socket on termination.
2023-01-20 15:31:21 +00:00