mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-06-08 14:11:53 -07:00
Tuned default IC params. Show burst status in rnstatus.
This commit is contained in:
@@ -66,11 +66,11 @@ class Interface:
|
||||
# considered to be newly created. Two
|
||||
# hours by default.
|
||||
IC_NEW_TIME = 2*60*60
|
||||
IC_BURST_FREQ_NEW = 6
|
||||
IC_BURST_FREQ = 35
|
||||
IC_BURST_HOLD = 1*60
|
||||
IC_BURST_FREQ_NEW = 3
|
||||
IC_BURST_FREQ = 10
|
||||
IC_BURST_HOLD = 15
|
||||
IC_BURST_PENALTY = 15
|
||||
IC_HELD_RELEASE_INTERVAL = 2
|
||||
IC_HELD_RELEASE_INTERVAL = 5
|
||||
IC_DEQUE_MIN_SAMPLE = 32
|
||||
|
||||
# Default announce rate targets
|
||||
|
||||
@@ -1382,6 +1382,8 @@ class Reticulum:
|
||||
ifstats["announce_rate_penalty"] = interface.announce_rate_penalty
|
||||
ifstats["announce_rate_grace"] = interface.announce_rate_grace
|
||||
ifstats["held_announces"] = len(interface.held_announces)
|
||||
ifstats["burst_active"] = interface.ic_burst_active
|
||||
ifstats["burst_activated"] = interface.ic_burst_activated
|
||||
ifstats["status"] = interface.online
|
||||
ifstats["mode"] = interface.mode
|
||||
|
||||
|
||||
+18
-11
@@ -542,26 +542,33 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
elif art and arp != None: art_str = f"(t:{RNS.prettytime(art)}/p:{RNS.prettytime(arp)})"
|
||||
elif art: art_str = f"(t:{RNS.prettytime(art)})"
|
||||
else: art_str = ""
|
||||
|
||||
burst_str = ""
|
||||
if "burst_active" in ifstat and ifstat["burst_active"]:
|
||||
for_str = RNS.prettytime(time.time()-ifstat["burst_activated"])
|
||||
burst_str = f" burst for {for_str}"
|
||||
|
||||
rxb_str = "↓"+RNS.prettysize(ifstat["rxb"])
|
||||
txb_str = "↑"+RNS.prettysize(ifstat["txb"])
|
||||
strdiff = len(rxb_str)-len(txb_str)
|
||||
if strdiff > 0: txb_str += " "*strdiff
|
||||
elif strdiff < 0: rxb_str += " "*-strdiff
|
||||
|
||||
|
||||
asr = False
|
||||
if astats and "incoming_announce_frequency" in ifstat and ifstat["incoming_announce_frequency"] != None:
|
||||
oaf = RNS.prettyfrequency(ifstat["outgoing_announce_frequency"])+"↑"
|
||||
iaf = RNS.prettyfrequency(ifstat["incoming_announce_frequency"])+"↓"
|
||||
if clients != None and clients > 0: pc_str = f"{RNS.prettyfrequency(ifstat['outgoing_announce_frequency']/clients)}/c"
|
||||
else: pc_str = ""
|
||||
strdiff = len(oaf)-len(iaf)
|
||||
if strdiff > 0: iaf += " "*strdiff
|
||||
elif strdiff < 0: oaf += " "*-strdiff
|
||||
strdiff = len(rxb_str)-len(oaf)
|
||||
if strdiff > 0: oaf += " "*strdiff
|
||||
elif strdiff < 0: txb_str += " "*-strdiff; rxb_str += " "*-strdiff
|
||||
asr = True
|
||||
|
||||
if not asr: iaf = ""; oaf = ""
|
||||
mlen = max(len(iaf), len(oaf), len(rxb_str), len(txb_str))
|
||||
iaf += (mlen-len(iaf))*" "
|
||||
oaf += (mlen-len(oaf))*" "
|
||||
rxb_str += (mlen-len(rxb_str))*" "
|
||||
txb_str += (mlen-len(txb_str))*" "
|
||||
|
||||
if asr:
|
||||
print(f" Announces : {oaf} {pc_str}")
|
||||
print(f" {iaf} {art_str}")
|
||||
print(f" {iaf} {art_str}{burst_str}")
|
||||
|
||||
rxstat = rxb_str
|
||||
txstat = txb_str
|
||||
|
||||
@@ -1393,11 +1393,11 @@ but all the parameters are exposed for configuration if needed.
|
||||
sub-interfaces when a new client connects.
|
||||
|
||||
* | The ``ic_burst_freq_new`` option sets the maximum announce ingress
|
||||
frequency for newly spawned interfaces. Defaults to ``3.5``
|
||||
frequency for newly spawned interfaces. Defaults to ``3.0``
|
||||
announces per second.
|
||||
|
||||
* | The ``ic_burst_freq`` option sets the maximum announce ingress
|
||||
frequency for other interfaces. Defaults to ``12`` announces
|
||||
frequency for other interfaces. Defaults to ``10.0`` announces
|
||||
per second.
|
||||
|
||||
*If an interface exceeds its burst frequency, incoming announces
|
||||
@@ -1410,15 +1410,17 @@ but all the parameters are exposed for configuration if needed.
|
||||
|
||||
* | The ``ic_burst_hold`` option sets how much time (in seconds) must
|
||||
pass after the burst frequency drops below its threshold, for the
|
||||
announce burst to be considered cleared. Defaults to ``60``
|
||||
announce burst to be considered cleared. Defaults to ``15.0``
|
||||
seconds.
|
||||
|
||||
* | The ``ic_burst_penalty`` option sets how much time (in seconds) must
|
||||
pass after the burst is considered cleared, before held announces can
|
||||
start being released from the queue. Defaults to ``5*60``
|
||||
seconds.
|
||||
start being released from the queue. Defaults to ``15.0`` seconds.
|
||||
|
||||
* | The ``ic_held_release_interval`` option sets how much time (in seconds)
|
||||
must pass between releasing each held announce from the queue. Defaults
|
||||
to ``30`` seconds.
|
||||
to ``5.0`` seconds.
|
||||
|
||||
All the ingress control parameters can be set as defaults in the ``[reticulum]``
|
||||
section of the configuration file. Interface-specific configuration will
|
||||
override the defaults.
|
||||
|
||||
Reference in New Issue
Block a user