go-sysinfo
go-sysinfo copied to clipboard
FreeBSD support
Add FreeBSD provider. When I was attempting to use this package on FreeBSD I noticed the provider was completely missing, so I implemented a provider for FreeBSD.
Note that for the system_test.go that test's the current working directory I modified the test code to compare the inodes using os.SameFile instead of straight file comparison. The reason is that os.Getcwd() will return any path to CWD (either symlink or real path) but for any process except the calling pid (i.e. calling C.getcwd()) will return the real path and not the symlink.
I've tested it on FreeBSD 11.2 and 12.0 using 'go test', let me know if you need anything else to be run and please feel free to leave any review comments/reject the pull request etc.
I've encounter the the problem on FreeBSD
- unimplemented github.com/elastic/go-sysinfo/types.init /usr/local/me/go/pkg/mod/github.com/elastic/[email protected]/types/errors.go:23
@mko-io This pull request is very old, I haven't updated it in a while. If you still need FreeBSD support for sysinfo I'd be happy to review it.
@dbolcsfoldi would be nice, as this would make metricbeats on freebsd usable
@dbolcsfoldi - I'm interested in having freebsd support included in this module. I might even be able to spare some cycles if help is needed, though I have limited Go experience.
I'm not sure if anybody on this thread is an Elastic employee, but input would be helpful!
Closing this as we have #126 which incorporates this with some updates.
Thanks @dbolcsfoldi .