mirror of
https://github.com/shirou/gopsutil.git
synced 2025-05-02 22:17:08 +08:00
Merge pull request #130 from sparrc/ibdnW
Add -W flag to netstat on BSD systems
This commit is contained in:
commit
134e15be26
@ -17,7 +17,7 @@ import (
|
|||||||
// lo0 16384 ::1/128 ::1 869107 - 169411755 869107 - 169411755 - -
|
// lo0 16384 ::1/128 ::1 869107 - 169411755 869107 - 169411755 - -
|
||||||
// lo0 16384 127 127.0.0.1 869107 - 169411755 869107 - 169411755 - -
|
// lo0 16384 127 127.0.0.1 869107 - 169411755 869107 - 169411755 - -
|
||||||
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
||||||
out, err := exec.Command("/usr/sbin/netstat", "-ibdn").Output()
|
out, err := exec.Command("/usr/sbin/netstat", "-ibdnW").Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
func NetIOCounters(pernic bool) ([]NetIOCountersStat, error) {
|
||||||
out, err := exec.Command("/usr/bin/netstat", "-ibdn").Output()
|
out, err := exec.Command("/usr/bin/netstat", "-ibdnW").Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user