§
½@¾jÙ ã ó — d Z ddlZddlmZmZmZ dZ eddh¦ « ZdZ de
dee d efd
„Z
dded ee
ef fd„Z dd
e
deee d ee
ef fd„Zedfde
deee d ee
ef fd„ZdS )uS
Telemetry collector for LVE Traffic Accounting (CLOS-4341).
Parses /proc/lve/list and produces a small set of metrics that let us answer:
- does this kernel expose net accounting at all (NETO/NETI columns present)?
- how many user LVEs exist and how many actually accumulated traffic?
- what's the cumulative NETO/NETI volume across user LVEs on this host?
/proc/lve/list contains two non-user LVE rows we exclude from all aggregates:
- *default* (user_id = UINT_MAX) — kernel catch-all for processes not
attached to any specific LVE (sshd, systemd, dnf, ...). Has non-zero
traffic on essentially every running CL host.
- *root* (user_id = 0) — LVE container for root (uid 0). Not a hosting user.
After exclusion the metrics describe user hosting activity, and lves_total
matches the count seen by `lvectl list` and the panel's user list.
é N)ÚDictÚIterableÚOptionalz/proc/lve/listl ÿÿ ©Únet_acct_kernel_supportedÚnet_acct_lves_totalÚnet_acct_lves_with_trafficÚnet_acct_total_neto_bytesÚnet_acct_total_neti_bytesÚlve_id_fieldÚexcludedÚreturnc ó€ — | dd¦ « d } t |¦ « |v S # t $ r Y dS w xY w)zÒTrue if the LVE row's user_id is in the excluded set.
LVE ids in /proc/lve/list use the form "