Skip to content

Commit 7152c91

Browse files
authored
Merge pull request #1538 from k8s-infra-cherrypick-robot/cherry-pick-1536-to-release-0.15
[release-0.15] source/network: discover speed of virtual network interfaces
2 parents 8d74fc1 + 85197fc commit 7152c91

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/usage/customization-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ The following features are available for matching:
968968
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed`, `sriov_numvfs`, `sriov_totalvfs` |
969969
| **`network.virtual`** | instance | | | Virtual network interfaces present in the system |
970970
| | | **`name`** | string | Name of the network interface |
971-
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate` |
971+
| | | **`<sysfs-attribute>`** | string | Sysfs network interface attribute, available attributes: `operstate`, `speed` |
972972
| **`pci.device`** | instance | | | PCI devices present in the system |
973973
| | | **`<sysfs-attribute>`** | string | Value of the sysfs device attribute, available attributes: `class`, `vendor`, `device`, `subsystem_vendor`, `subsystem_device`, `sriov_totalvfs`, `iommu_group/type`, `iommu/intel-iommu/version` |
974974
| **`storage.block`** | instance | | | Block storage devices present in the system |

source/network/network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ var (
6060
devIfaceAttrs = []string{"operstate", "speed", "device/sriov_numvfs", "device/sriov_totalvfs"}
6161

6262
// virtualIfaceAttrs is the list of files under /sys/class/net/<iface> that we're reading
63-
virtualIfaceAttrs = []string{"operstate"}
63+
virtualIfaceAttrs = []string{"operstate", "speed"}
6464
)
6565

6666
// Name returns an identifier string for this feature source.

0 commit comments

Comments
 (0)