Docs: document byte counters configuration and API endpoint

Documents the optional [byte_counters] section, counter reset semantics, subtree-inclusive node totals, and the GET /byte_counters endpoint in English and Spanish.
This commit is contained in:
Herbert Wolverson committed 2026-10-07 12:29:26 -05:00
1 parent ff59654991
commit 94ed100fea
4 files changed
+40

No files matched your search

+3
View File
@@ -121,9 +121,12 @@ Endpoints representativos:
- `GET /search`
- `GET /current_throughput`
- `GET /queue_stats_total`
- `GET /byte_counters`
- `GET /warnings`
- `GET /urgent`, `GET /urgent/status`
`GET /byte_counters` devuelve contadores de bytes acumulados por nodo y por circuito cuando `[byte_counters] enabled = true` está configurado en `/etc/lqos.conf`. Los valores son acumulados desde que `lqosd` inició, incluyen el tráfico descendiente en los nodos y se reinician cuando `lqosd` se reinicia. Consulte [Configuración avanzada](configuration-advanced-es.md).
### 5) Operaciones de control y reload
Disparar acciones de control operativo cuando sea necesario.
+17
View File
@@ -62,6 +62,23 @@ netflow_version = 5
do_not_track_subnets = ["192.168.0.0/16"]
```
### Contadores de bytes (opcional)
LibreQoS puede mantener contadores de bytes acumulados por circuito y por nodo de red para la contabilidad de uso de datos, y exponerlos a través de `lqos_api`. La función está deshabilitada por defecto. Para habilitarla, agregue la siguiente sección a `/etc/lqos.conf` y reinicie `lqosd`:
```toml
[byte_counters]
enabled = true
```
- Los contadores acumulan el tráfico medido por el rastreador de throughput de un segundo.
- Los valores son bytes realmente transmitidos, no bytes descartados por el shaping.
- Los valores son acumulados desde que `lqosd` inició y se reinician cuando `lqosd` se reinicia.
- Los valores de un nodo incluyen el tráfico de todos sus nodos descendientes.
- Solo se listan los circuitos con tráfico registrado.
Con los contadores habilitados, `GET /byte_counters` en la API del nodo devuelve los valores actuales. Consulte [API del nodo LibreQoS](api-es.md).
### Contabilidad RADIUS (opcional)
LibreQoS acepta una sección opcional `[radius_accounting]` para definir clientes NAS de confianza. Cuando está habilitada, `lqosd` inicia un servicio de contabilidad RADIUS, verifica paquetes de los clientes configurados, envía paquetes Accounting-Response para solicitudes aceptadas y mantiene el estado de sesión decodificado en memoria. Cuando `radius_accounting.dynamic_circuit_application.enabled` y la opción global `dynamic_circuits.enabled` están habilitadas, las sesiones Start e Interim-Update aptas se envían a la ruta de circuitos dinámicos.
+3
View File
@@ -121,9 +121,12 @@ Representative endpoints:
- `GET /search`
- `GET /current_throughput`
- `GET /queue_stats_total`
- `GET /byte_counters`
- `GET /warnings`
- `GET /urgent`, `GET /urgent/status`
`GET /byte_counters` returns cumulative per-node and per-circuit byte counters when `[byte_counters] enabled = true` is set in `/etc/lqos.conf`. Values are cumulative since `lqosd` started, include descendant traffic for nodes, and reset when `lqosd` restarts. See [Advanced Configuration](configuration-advanced.md).
### 5) Control and Reload Operations
Trigger operational control actions when needed.
+17
View File
@@ -64,6 +64,23 @@ netflow_version = 5
do_not_track_subnets = ["192.168.0.0/16"]
```
#### Byte counters (optional)
LibreQoS can keep cumulative byte counters per circuit and per network node for data-usage accounting, and expose them through `lqos_api`. The feature is disabled by default. To enable it, add the following section to `/etc/lqos.conf` and restart `lqosd`:
```toml
[byte_counters]
enabled = true
```
- Counters accumulate the traffic measured by the one-second throughput tracker.
- Values are actual transmitted bytes, not bytes dropped by shaping.
- Values are cumulative since `lqosd` started and reset when `lqosd` restarts.
- Node values include traffic from all descendant nodes.
- Only circuits with recorded traffic are listed.
With the counters enabled, `GET /byte_counters` on the Node API returns the current values. See [LibreQoS Node API](api.md).
#### On-a-stick mode queue mapping (single interface)
When running on-a-stick mode, LibreQoS splits available TX queues in half: