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

bsd: Pass '-W' to netstat for full interface names on FreeBSD #1141

Closed
wants to merge 1 commit into from
Closed

bsd: Pass '-W' to netstat for full interface names on FreeBSD #1141

wants to merge 1 commit into from

Conversation

mutemule
Copy link

By default, netstat on FreeBSD only shows the first five characters of an interfaced name, and truncates the rest. So following the standard VLAN naming convention (<iface>.<vlan_id>), we have interface names like re1.200, re1.210, and re1.220. These are seen as a single interface called re1.2 by the agent.

Unfortunately, at least OpenBSD has a differing interpretation of -W for netstat, so limit the additional flag to just FreeBSD for now. I don't have access to any other BSD to test right now. I'm also not sure this is the best way to handle this, but it seemed reasonably clean.

@remh remh added this to the 5.2.0 milestone Sep 30, 2014
@remh
Copy link
Contributor

remh commented Sep 30, 2014

Thanks a lot @mutemule !

We will review and test.
Unfortunately we've have frozen the changelog for the release 5.1.0 so it will be reviewed for 5.2.0

platf = sys.platform

# FreeBSD's netstat truncates device names unless you pass '-W'
if Platform.is_freebsd(platf):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use directly Platform.is_freebsd() 😉

@LeoCavaille
Copy link
Member

Thanks again @mutemule , if you could just look at the few modifications I suggested and rebase that on master so that it can run the new Travis test suite that would be amazing! Looking forward to seeing this on a future agent release!!

@LeoCavaille
Copy link
Member

Merged in #1300, thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants