Commit Graph

26 Commits (84e8e51bf9e852717504aa6373a39a53292d33a9)

Author SHA1 Message Date
shirou 1f733a99dc [disk] move without context functions to disk.go. 4 years ago
shirou fb1c75054a [disk] Partition returns all list even if argument is False.
According to https://github.com/giampaolo/psutil/issues/906,
all BSD system returns same information `df` and `df -a`.
4 years ago
Tobias Klauser d5eecd689d Fix FreeBSD build with latest x/sys/unix
There was a breaking change in upstream golang.org/x/sys/unix which
changed the type of some Statvfs members, see #853. As it looks like
this change won't be reverted, adjust gopsutil to work with it and allow
to build against the latest version of x/sys/unix.
5 years ago
Tobias Klauser 6aae71ca26 Use Getstatfs from golang.org/x/sys/unix for 64-bit inode support on FreeBSD 12
Use unix.Getstatfs and its associated Statfs_t type instead of
implementing them locally in this package. This allows to use 64-bit
inode fields on FreeBSD 12 while still keeping backwards compatibility
for old FreeBSD versions, as unix.Getfsstat will use the correct syscall
number and data structure version and convert its result
correspondingly.

Also see https://golang.org/cl/136816 for details.
5 years ago
Tobias Klauser 10cdcee035 Fix typos in FreeBSD mount option strings
Fix typos in FreeBSD mount option strings so they match the values given
in the mount(8) manpage: https://www.freebsd.org/cgi/man.cgi?mount(8)
5 years ago
Tobias Klauser 214c5bdb50 Use MNT_* consts from golang.org/x/sys/unix on freebsd and openbsd
Update vendored version of golang.org/x/sys/unix and use the MNT_*
constants there to replace the locally generated ones.
5 years ago
Michal Rostecki ff2e736f72 disk: Check for error objects returned by Getfsstat 7 years ago
shirou 4c73494c78 Add WithContext functions. 7 years ago
Sean Chittenden 635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}` 8 years ago
Daniel Nelson 3830ed16b4
Make IOCounters a variadic function
Remove IOCountersForNames that was recently added in favor of variadic
function with same capabilities.
8 years ago
Daniel Nelson 3f35f001da
Add disk.IOCountersForNames function
Operates like disk.IOCounters, but accepts an array of names to limit
the results.
8 years ago
Patrick Hemmer 3cfaee3a93 add disk IoTime on freebsd and fix read & write time calculation 9 years ago
Shirou WAKAYAMA f2ebb91cf0 [disk]darwin,freebsd: implements 'all' argument. 9 years ago
Shirou WAKAYAMA da89408631 Merge branch 'master' into v2 9 years ago
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters 9 years ago
WAKAYAMA shirou dc8b14acd5 [disk]freebsd: change to use C.sizeof_struct. 9 years ago
WAKAYAMA shirou 0af91ba32b [disk,process]freebsd: binary.go moved to internal. 9 years ago
elij d1380cba29 try to fix diskio stats on FreeBSD-10.x
FreeBSD apparently changed the magic sysctl mib values for devstats.

    --- FAIL: TestDisk_io_counters (0.00s)
    disk_test.go:39: error no such file or directory
    disk_test.go:42: ret is empty, map[]

This code uses an undocumented, but exported, go stdlib method to fetch
the sysctl by string instead of mib.
9 years ago
Shirou WAKAYAMA 7288e9a5af common[all]: add internal 10 years ago
WAKAYAMA shirou bb04b692c3 disk[freebsd]: update devstat mib. 10 years ago
WAKAYAMA shirou 6365c902e7 disk[freebsd]: fix typo. 10 years ago
Shirou WAKAYAMA ad6c3f60a7 disk[freebsd,darwin,windows]: add fstype to DiskUsageStat. 10 years ago
WAKAYAMA shirou 0451709fe3 disk: add disk_io_counter to FreeBSD by using sysctl(kern.devstat.all). 10 years ago
Shirou WAKAYAMA 13cd195a7e change package name. 10 years ago
WAKAYAMA shirou d11680c773 fix bugs on FreeBSD. 10 years ago
Shirou WAKAYAMA a4671fcc2a move subdirectories. refer to issue #24 10 years ago