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

Add fallback to procfs after try netlink #8

Merged
merged 1 commit into from
Jun 18, 2018
Merged

Conversation

yuuki
Copy link
Owner

@yuuki yuuki commented Jun 18, 2018

It gets the following error on an old CentOS5 (5.2).

[y_uuki@hoge ~]$ /home3/y_uuki/lstf
failed to get host flows: connection refused

the strace result.

socket(PF_NETLINK, SOCK_RAW, 4)         = 3
sendto(3, "L\0\0\0\22\0\1\3\0\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 76, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = -1 ECONNREFUSED (Connection refused)

The ss command falls back to /proc/net/tcp.

socket(PF_NETLINK, SOCK_RAW, 4)         = 3
sendmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"L\0\0\0\22\0\1\3@\342\1\0\0\0\0\0\2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 76}], msg_controllen=0, msg_flags=0}, 0) = -1 ECONNREFUSED (Connection refused)
open("/proc/net/tcp", O_RDONLY)         = 4

@coveralls
Copy link

Pull Request Test Coverage Report for Build 47

  • 6 of 54 (11.11%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-5.7%) to 44.909%

Changes Missing Coverage Covered Lines Changed/Added Lines %
netutil/netutil_linux.go 1 2 50.0%
tcpflow/tcpflow_linux.go 5 8 62.5%
netutil/netutil.go 0 15 0.0%
tcpflow/tcpflow.go 0 29 0.0%
Totals Coverage Status
Change from base Build 45: -5.7%
Covered Lines: 172
Relevant Lines: 383

💛 - Coveralls

@yuuki yuuki merged commit 99005d2 into master Jun 18, 2018
@yuuki yuuki deleted the fallback_to_proc_net_tcp branch June 18, 2018 17:53
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

Successfully merging this pull request may close these issues.

None yet

2 participants