-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: [net][linux]: add netlink implementation for Linux connection stat #809
base: master
Are you sure you want to change the base?
Conversation
Note: this version of netlink does NOT return FD and ProcessID from inode
|
So getting Pid and FD from inodes IS a bottleneck.
|
Yes, #784 was opened regarding this. Awesome work you've done here btw, using a build tag is an original solution but is it optimal? |
Hi! I followed this PR from #695. Thanks for working on adding this awesome feature! I just wanted to check and see if there is still plan to work on and merge this PR. |
To retrieve network information use NETLINK_SOCK_DIAG instead of walking /proc/<PID> and parsing files. Consequently this reduces the number of syscalls, as walking /proc/<PID> and opening, reading and closing files is no longer required. But it also reduces the memory footprint as reading files into memory for processing is no longer required. Related issues: - shirou#695 - shirou#784 Supersedes shirou#809 Signed-off-by: Florian Lehner <dev@der-flo.net>
To retrieve network information use NETLINK_SOCK_DIAG instead of walking /proc/<PID> and parsing files. Consequently this reduces the number of syscalls, as walking /proc/<PID> and opening, reading and closing files is no longer required. But it also reduces the memory footprint as reading files into memory for processing is no longer required. Related issues: - shirou#695 - shirou#784 Supersedes shirou#809 Signed-off-by: Florian Lehner <dev@der-flo.net>
This PR introduces netlink support for Linux Connections.
To use netlink, users should add build tag
-tags=netlink
Thanks for sample code of @Brian-Williams in #695.
I choose build tag to change implementation. Because current implementation is enough for most of users, I think. Some of users want to use netlink to work with their big system. They must be their environment and they can compile binary by their own. so adding build tag is not so big problem, I think.
This is what only I think. There must be other objection. Comments are welcome as always.
Limitation for using netlink
TODO