[GH-ISSUE #120] Module does not report statistics to /sys/class/net (kernel ver. 6.6.104) #75

Closed
opened 2026-10-13 21:06:17 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @this-username-has-been-taken on GitHub (Nov 12, 2025).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/120

Hello!

A user has reported that the latest kernel module does not expose interface statistics under /sys/class/net/{interface name}/statistics.
The issue occurs with kernel version 6.6.104 but is not present in version 6.12.x.

I believe it was introduced somewhere between commits 591f50 and 866b0ab:
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/compare/591f50..866b0ab#diff-43ecbae21481d1771c78fe794ba2984af0a010fbf823878234615e0b72f81856

The interface itself functions correctly and lets the traffic flow as expected.
The AmneziaWG tools (awg command) also display the correct statistics.

Why this matters: some services rely on kernel interface statistics and may interpret the absence of data in /sys/class/net/{interface name}/statistics as a lost connection.
For example, a watchdog service might repeatedly restart an otherwise functioning interface when this bug occurs.

Originally created by @this-username-has-been-taken on GitHub (Nov 12, 2025). Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/120 Hello! A user has reported that the latest kernel module does not expose interface statistics under `/sys/class/net/{interface name}/statistics`. The issue occurs with kernel version 6.6.104 but is not present in version 6.12.x. I believe it was introduced somewhere between commits 591f50 and 866b0ab: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/compare/591f50..866b0ab#diff-43ecbae21481d1771c78fe794ba2984af0a010fbf823878234615e0b72f81856 The interface itself functions correctly and lets the traffic flow as expected. The AmneziaWG tools (`awg` command) also display the correct statistics. Why this matters: some services rely on kernel interface statistics and may interpret the absence of data in `/sys/class/net/{interface name}/statistics` as a lost connection. For example, a watchdog service might repeatedly restart an otherwise functioning interface when this bug occurs.
Author
Owner

@archer-v commented on GitHub (Nov 19, 2025):

Confirm.
Kernel interface statistics doesn't work at all. It seems it is not depend of kernel version. My kernel is 6.1.158 and I have several nodes with different kernels, all of them has broken awg interface statistics.

I built and check different module versions, and found out that the breakdown started on commit b66f1a2

How to check: if the module works correctly, the file
/sys/class/net/{interface name}/statistics/tx_bytes should contains bytes counter > 0

This bug is really important cause of all network monitoring and observability tools now can't get any data from awg interfaces

<!-- gh-comment-id:3551774560 --> @archer-v commented on GitHub (Nov 19, 2025): Confirm. Kernel interface statistics doesn't work at all. It seems it is not depend of kernel version. My kernel is 6.1.158 and I have several nodes with different kernels, all of them has broken awg interface statistics. I built and check different module versions, and found out that the breakdown started on commit b66f1a2 How to check: if the module works correctly, the file /sys/class/net/{interface name}/statistics/tx_bytes should contains bytes counter > 0 This bug is really important cause of all network monitoring and observability tools now can't get any data from awg interfaces
Author
Owner

@this-username-has-been-taken commented on GitHub (Nov 22, 2025):

It looks like reverting the changes in github.com/amnezia-vpn/amneziawg-linux-kernel-module@b66f1a2891 related to COMPAT_CANNOT_USE_PCPU_STAT_TYPE would resolve the issue.
Check here: github.com/this-username-has-been-taken/amneziawg-linux-kernel-module@44276df04a

<!-- gh-comment-id:3566526149 --> @this-username-has-been-taken commented on GitHub (Nov 22, 2025): It looks like reverting the changes in https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/b66f1a2891704eb02b30089cab3e19b4d3a6c8f7 related to `COMPAT_CANNOT_USE_PCPU_STAT_TYPE` would resolve the issue. Check here: https://github.com/this-username-has-been-taken/amneziawg-linux-kernel-module/commit/44276df04a3b84e74c470afab84fdb42bd078e8c
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#75
No description provided.