43 Commits (master)

Author SHA1 Message Date
Matthieu MOREL 30aff030d0 chore(golangci-lint): GOOS and GOARCH matrix
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
Matthieu MOREL 9ce2ec161e chore: enable golangci-lint on Windows and MacOS
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
shirou 29ccada537 refactor(net): Gather base functions to net.go
shirou 37f531010d fix golangcilint errors, ignore gosec G115
shirou bc060cc227 add SPDX License, remove old build tag, and replace import
Antoine Toulme fe1caf758c lint fixes
cui fliter 9aa4e7a744 fix some comments
Signed-off-by: cui fliter <imcusg@gmail.com>
Ville Skyttä f7e1f36418 refactor: remove unnecessary exec.LookPath calls
Executing the command does the lookup if needed and returns the same
error when not found, no need to do it separately.
Ville Skyttä 1e56c6f421 Spelling and grammar fixes
mmorel-35 1e6b445a8a gofumpt
shirou 0969c9436b delete v2 directory, move v3 to top #1078
Lomanic 7f0ba43398 [net][darwin][freebsd] Fix tests with func not returning common.ErrNotImplementedError
Curtis Mattoon 648bf4eebc Adds ConntrackStats to get conntrack summary stats
Segflow 86c7289ccc Fix: use filename in exec.LookPath instead of full path
exec.LookPath searches for the file in the $PATH, which mean giving it an absolute path is against it's own purposes.
mingrammer 017c9f9cbc Fix typos
shirou 145dca90f7 change to use CommandContext.
shirou 4c73494c78 Add WithContext functions.
Sean Chittenden d0e40ff723
Fix issues reported by golint.
Cameron Sparr a213bf5e6d
run go fmt ./...
Bruno Clermont 3f96312057 only run ifconfig/netstat if necessary, add some tests
Bruno Clermont 145e48efdb actually there is 13 columns, not 12
Bruno Clermont 57ffe3b1ef Support interface with multiple digits
Shirou WAKAYAMA 57f6aebc7e add Timeout to invoke command and use common.Invoke refs: #201
Shirou WAKAYAMA bce9212def fix build bugs.
Shirou WAKAYAMA 613a8a90e1 fixed by golint.
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters
Shirou WAKAYAMA d680853370 net,process[linux]: add process.NetIOCounter and net.NetIOCounterByFile.
Cameron Sparr 432bcbd056 Add -W flag to netstat on BSD systems
This prevents netstat from truncating the interface name to 5
characters. See https://github.com/influxdb/telegraf/issues/438
Nathaniel Cook da832b3f12 add system wide network protocol stats
Shirou WAKAYAMA 7288e9a5af common[all]: add internal
Shirou WAKAYAMA 93e226a5e3 net[freebsd,linux,darwin]: merge unix like OSes.
Shirou WAKAYAMA 34195b4b58 net[darwin, linux]: get UDP information when inet or all specified.
Shirou WAKAYAMA b3cf7354f6 process[linux, darwin]: implements Connections using lsof.
Shirou WAKAYAMA 8d21be591e net[linux]: implements NetConnections() using lsof.
Shirou WAKAYAMA c50db4f462 net[darwin]: implement NetConnections().
Shirou WAKAYAMA 6bb6762470 net[darwin]: add drop count to NetIOCounter.
Shirou WAKAYAMA e0b1d62a4d net[darwin]: add netstat -idbn example in the comment.
Cameron Sparr c57e866f91 Fix net stat reporting for Darwin
Shirou WAKAYAMA b5ffc220a6 common: Rename StringContains to StringsContains and add StringsHas.
Shirou WAKAYAMA 3ff690d1d8 make single network interface about NetIOCounters on darwin and freebsd
Shirou WAKAYAMA 406cbe9b87 implements pernic of NetIOCounters.
Shirou WAKAYAMA 13cd195a7e change package name.
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24