Skip to content

Commit

Permalink
Kernel: Expose link speed and duplex through /proc/net/adapters
Browse files Browse the repository at this point in the history
Add the fields 'link_speed' (integer or -1) for the speed and
'link_full_duplex' (true for full, false for half) to indicate
link duplex.
  • Loading branch information
twvd authored and gunnarbeutner committed Aug 3, 2021
1 parent 59fdeec commit 32c8d35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Kernel/GlobalProcessExposed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ class ProcFSAdapters final : public ProcFSGlobalInformation {
obj.add("packets_out", adapter.packets_out());
obj.add("bytes_out", adapter.bytes_out());
obj.add("link_up", adapter.link_up());
obj.add("link_speed", adapter.link_speed());
obj.add("link_full_duplex", adapter.link_full_duplex());
obj.add("mtu", adapter.mtu());
});
array.finish();
Expand Down

0 comments on commit 32c8d35

Please sign in to comment.