shirou
1f733a99dc
[disk] move without context functions to disk.go.
2020-10-24 22:03:58 +09:00
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`.
2020-10-20 18:13:12 +09:00
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.
2020-06-22 23:41:01 +02:00
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.
2020-01-03 13:18:44 +01:00
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)
2019-12-23 13:43:44 +01:00
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.
2019-12-23 13:31:05 +01:00
Michal Rostecki
ff2e736f72
disk: Check for error objects returned by Getfsstat
2018-06-21 16:48:16 +02:00
shirou
4c73494c78
Add WithContext functions.
2017-12-31 15:25:49 +09:00
Sean Chittenden
635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}`
2017-06-02 13:51:00 -07:00
Daniel Nelson
3830ed16b4
Make IOCounters a variadic function
...
Remove IOCountersForNames that was recently added in favor of variadic
function with same capabilities.
2017-04-13 18:53:09 -07:00
Daniel Nelson
3f35f001da
Add disk.IOCountersForNames function
...
Operates like disk.IOCounters, but accepts an array of names to limit
the results.
2017-04-06 18:00:54 -07:00
Patrick Hemmer
3cfaee3a93
add disk IoTime on freebsd and fix read & write time calculation
2016-07-21 17:22:52 -04:00
Shirou WAKAYAMA
f2ebb91cf0
[disk]darwin,freebsd: implements 'all' argument.
2016-04-16 22:43:55 +09:00
Shirou WAKAYAMA
da89408631
Merge branch 'master' into v2
2016-03-31 18:08:24 +09:00
Shirou WAKAYAMA
ea152ea901
[BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters
2016-03-22 23:09:12 +09:00
WAKAYAMA shirou
dc8b14acd5
[disk]freebsd: change to use C.sizeof_struct.
2016-03-20 22:48:17 +09:00
WAKAYAMA shirou
0af91ba32b
[disk,process]freebsd: binary.go moved to internal.
2016-02-12 23:10:40 +09:00
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.
2016-02-06 06:20:52 -08:00
Shirou WAKAYAMA
7288e9a5af
common[all]: add internal
2015-10-20 00:04:57 +09:00
WAKAYAMA shirou
bb04b692c3
disk[freebsd]: update devstat mib.
2015-09-03 10:38:21 +09:00
WAKAYAMA shirou
6365c902e7
disk[freebsd]: fix typo.
2015-09-03 09:49:48 +09:00
Shirou WAKAYAMA
ad6c3f60a7
disk[freebsd,darwin,windows]: add fstype to DiskUsageStat.
2015-08-14 18:08:43 +09:00
WAKAYAMA shirou
0451709fe3
disk: add disk_io_counter to FreeBSD by using sysctl(kern.devstat.all).
2015-02-22 01:24:08 +09:00
Shirou WAKAYAMA
13cd195a7e
change package name.
2014-12-30 22:09:05 +09:00
WAKAYAMA shirou
d11680c773
fix bugs on FreeBSD.
2014-11-27 10:25:14 +09:00
Shirou WAKAYAMA
a4671fcc2a
move subdirectories. refer to issue #24
2014-11-27 10:18:15 +09:00