Skip to content
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

getNsInumByPid func #269

Closed
dzy176 opened this issue May 7, 2024 · 2 comments
Closed

getNsInumByPid func #269

dzy176 opened this issue May 7, 2024 · 2 comments

Comments

@dzy176
Copy link
Contributor

dzy176 commented May 7, 2024

https://github.com/alibaba/kubeskoop/blob/de036e0e13b90d0019a489086c7003202b5c178e/pkg/exporter/nettop/netns.go#L22C1-L42C3

for _, name := range names {
......
}

Hi, why don't we readlink /proc/{{pid}}/ns/net directly?There is no need to loop here

@jzwlqx
Copy link
Collaborator

jzwlqx commented May 15, 2024

hmm...you are right

@RichardoMrMu
Copy link
Contributor

#278 [change](change:getNsInumByPid readlink /proc/{{pid}}/ns/net directly)

@dzy176 dzy176 closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants