Closed stephenzhang0713 closed 8 months ago
Your code seems checking procConnections
on a process. We cannot see the net information of other users' processes. This is a limitation of the Linux proc fs. so procConnections
becomes 0, then, nothing printed.
Describe the bug Non-root user can't get process information
To Reproduce
Expected behavior
I want to collect process information in non-root user
Environment (please complete the following information):
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" Linux dev-ops-portal-judge-transfer-task-04 3.10.0-1160.71.1.el7.x86_64 #1 SMP Tue Jun 28 15:37:28 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux]
Additional context go version go1.17.13 darwin/arm64 go env -w GOOS=linux GOARCH=amd64