mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-07-30 19:38:11 -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
|
# considered to be newly created. Two
|
||||||
# hours by default.
|
# hours by default.
|
||||||
IC_NEW_TIME = 2*60*60
|
IC_NEW_TIME = 2*60*60
|
||||||
IC_BURST_FREQ_NEW = 6
|
IC_BURST_FREQ_NEW = 3
|
||||||
IC_BURST_FREQ = 35
|
IC_BURST_FREQ = 10
|
||||||
IC_BURST_HOLD = 1*60
|
IC_BURST_HOLD = 15
|
||||||
IC_BURST_PENALTY = 15
|
IC_BURST_PENALTY = 15
|
||||||
IC_HELD_RELEASE_INTERVAL = 2
|
IC_HELD_RELEASE_INTERVAL = 5
|
||||||
IC_DEQUE_MIN_SAMPLE = 32
|
IC_DEQUE_MIN_SAMPLE = 32
|
||||||
|
|
||||||
# Default announce rate targets
|
# Default announce rate targets
|
||||||
|
|||||||
@@ -1382,6 +1382,8 @@ class Reticulum:
|
|||||||
ifstats["announce_rate_penalty"] = interface.announce_rate_penalty
|
ifstats["announce_rate_penalty"] = interface.announce_rate_penalty
|
||||||
ifstats["announce_rate_grace"] = interface.announce_rate_grace
|
ifstats["announce_rate_grace"] = interface.announce_rate_grace
|
||||||
ifstats["held_announces"] = len(interface.held_announces)
|
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["status"] = interface.online
|
||||||
ifstats["mode"] = interface.mode
|
ifstats["mode"] = interface.mode
|
||||||
|
|
||||||
|
|||||||
+17
-10
@@ -543,25 +543,32 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
|||||||
elif art: art_str = f"(t:{RNS.prettytime(art)})"
|
elif art: art_str = f"(t:{RNS.prettytime(art)})"
|
||||||
else: art_str = ""
|
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"])
|
rxb_str = "↓"+RNS.prettysize(ifstat["rxb"])
|
||||||
txb_str = "↑"+RNS.prettysize(ifstat["txb"])
|
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:
|
if astats and "incoming_announce_frequency" in ifstat and ifstat["incoming_announce_frequency"] != None:
|
||||||
oaf = RNS.prettyfrequency(ifstat["outgoing_announce_frequency"])+"↑"
|
oaf = RNS.prettyfrequency(ifstat["outgoing_announce_frequency"])+"↑"
|
||||||
iaf = RNS.prettyfrequency(ifstat["incoming_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"
|
if clients != None and clients > 0: pc_str = f"{RNS.prettyfrequency(ifstat['outgoing_announce_frequency']/clients)}/c"
|
||||||
else: pc_str = ""
|
else: pc_str = ""
|
||||||
strdiff = len(oaf)-len(iaf)
|
asr = True
|
||||||
if strdiff > 0: iaf += " "*strdiff
|
|
||||||
elif strdiff < 0: oaf += " "*-strdiff
|
if not asr: iaf = ""; oaf = ""
|
||||||
strdiff = len(rxb_str)-len(oaf)
|
mlen = max(len(iaf), len(oaf), len(rxb_str), len(txb_str))
|
||||||
if strdiff > 0: oaf += " "*strdiff
|
iaf += (mlen-len(iaf))*" "
|
||||||
elif strdiff < 0: txb_str += " "*-strdiff; rxb_str += " "*-strdiff
|
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" Announces : {oaf} {pc_str}")
|
||||||
print(f" {iaf} {art_str}")
|
print(f" {iaf} {art_str}{burst_str}")
|
||||||
|
|
||||||
rxstat = rxb_str
|
rxstat = rxb_str
|
||||||
txstat = txb_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.
|
sub-interfaces when a new client connects.
|
||||||
|
|
||||||
* | The ``ic_burst_freq_new`` option sets the maximum announce ingress
|
* | 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.
|
announces per second.
|
||||||
|
|
||||||
* | The ``ic_burst_freq`` option sets the maximum announce ingress
|
* | 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.
|
per second.
|
||||||
|
|
||||||
*If an interface exceeds its burst frequency, incoming announces
|
*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
|
* | The ``ic_burst_hold`` option sets how much time (in seconds) must
|
||||||
pass after the burst frequency drops below its threshold, for the
|
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.
|
seconds.
|
||||||
|
|
||||||
* | The ``ic_burst_penalty`` option sets how much time (in seconds) must
|
* | The ``ic_burst_penalty`` option sets how much time (in seconds) must
|
||||||
pass after the burst is considered cleared, before held announces can
|
pass after the burst is considered cleared, before held announces can
|
||||||
start being released from the queue. Defaults to ``5*60``
|
start being released from the queue. Defaults to ``15.0`` seconds.
|
||||||
seconds.
|
|
||||||
|
|
||||||
* | The ``ic_held_release_interval`` option sets how much time (in seconds)
|
* | The ``ic_held_release_interval`` option sets how much time (in seconds)
|
||||||
must pass between releasing each held announce from the queue. Defaults
|
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