mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2025-02-25 18:55:32 -06:00
Add anonymous usage options to lqos.conf and the example file.
This commit is contained in:
@@ -5,6 +5,10 @@
|
|||||||
lqos_directory = '/opt/libreqos/src'
|
lqos_directory = '/opt/libreqos/src'
|
||||||
queue_check_period_ms = 1000
|
queue_check_period_ms = 1000
|
||||||
|
|
||||||
|
[usage_stats]
|
||||||
|
send_anonymous = true
|
||||||
|
anonymous_server = "127.0.0.1:9125"
|
||||||
|
|
||||||
[tuning]
|
[tuning]
|
||||||
# IRQ balance breaks XDP_Redirect, which we use. Recommended to leave as true.
|
# IRQ balance breaks XDP_Redirect, which we use. Recommended to leave as true.
|
||||||
stop_irq_balance = true
|
stop_irq_balance = true
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ pub struct EtcLqos {
|
|||||||
/// If present, defines the values for various `sysctl` and `ethtool`
|
/// If present, defines the values for various `sysctl` and `ethtool`
|
||||||
/// tweaks.
|
/// tweaks.
|
||||||
pub tuning: Option<Tunables>,
|
pub tuning: Option<Tunables>,
|
||||||
|
|
||||||
|
/// If present, defined anonymous usage stat sending
|
||||||
|
pub usage_stats: Option<UsageStats>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Represents a set of `sysctl` and `ethtool` tweaks that may be
|
/// Represents a set of `sysctl` and `ethtool` tweaks that may be
|
||||||
@@ -104,6 +107,16 @@ pub struct BridgeVlan {
|
|||||||
pub redirect_to: u32,
|
pub redirect_to: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Definitions for anonymous usage submission
|
||||||
|
#[derive(Serialize, Deserialize, Clone, Debug)]
|
||||||
|
pub struct UsageStats {
|
||||||
|
/// Are we allowed to send stats at all?
|
||||||
|
pub send_anonymous: bool,
|
||||||
|
|
||||||
|
/// Where do we send them?
|
||||||
|
pub anonymous_server: String,
|
||||||
|
}
|
||||||
|
|
||||||
impl EtcLqos {
|
impl EtcLqos {
|
||||||
/// Loads `/etc/lqos.conf`.
|
/// Loads `/etc/lqos.conf`.
|
||||||
pub fn load() -> Result<Self, EtcLqosError> {
|
pub fn load() -> Result<Self, EtcLqosError> {
|
||||||
|
|||||||
Reference in New Issue
Block a user