Justin Yang
dd0253b0ec
disk: fix various bugs
2 years ago
Justin Yang
319f5ea6e5
disk: small improvement, but still doesn't work
2 years ago
Justin Yang
1136aa25da
disk: code can be compiled now, but test still failed though
2 years ago
Justin Yang
ec817bfa68
disk: code cleanup (not finish yet)
2 years ago
Justin Yang
caafa49ed1
disk: code cleanup
2 years ago
Justin Yang
b6a10e04e7
disk: Implement Usage for NetBSD
2 years ago
Justin Yang
7df86f0f6a
Add disk partitions support for NetBSD
2 years ago
Justin Yang
302751d509
disk: start porting to NetBSD, far from complete
2 years ago
Greg Dallavalle
0a23dc690f
comment cleanup
2 years ago
Greg Dallavalle
b2d1f05f08
update comment
2 years ago
Greg
aa4c84c6b3
Update disk/disk_linux.go
...
Co-authored-by: shirou <shirou.faw@gmail.com>
2 years ago
Greg Dallavalle
0ca6266393
fix IOCounters() SerialNumber enumeration
2 years ago
Ozan HACIBEKİROĞLU
1ed7ea75d7
fix: fixed windows disk package leaks
...
- fixed goroutine leak in PartitionsWithContext
- closed registry handle in init
2 years ago
Antoine Toulme
b712e59295
fix more linting reports
2 years ago
Antoine Toulme
38b94668ea
allow to pass context values to override environment variables
2 years ago
Matthieu MOREL
1fb1e3e3e6
ci(lint): correct gci linter
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2 years ago
shirou
586926508c
Merge pull request #1431 from powersj/fix/1429
...
fix: moves common.Warnings to common OS files
2 years ago
Josh Powers
e7c6b6991d
fix: moves common.Warnings to common OS files
...
This allows all OS types to unwrap the Warnings from errors, and not
just linux in host or windows in disk.
fixes: #1429
2 years ago
David Newhall II
3a88ef27a5
close channel in function that sends to it
2 years ago
shirou
b51f72ebfb
Merge pull request #1412 from powersj/fix/dm-resolution
...
fix(disk): correctly replace /dev in /dev/mapper
2 years ago
shirou
852f455217
fix lint
2 years ago
Josh Powers
7645051510
fix(disk): correctly replace /dev in /dev/mapper
...
Only replace the first instance of /dev in a /dev/mapper string.
Otherwise, if an LVM group is named dev it will replace that as well.
fixes: #1411
2 years ago
shirou
8105a6d577
[disk][windows]: add context handling on PartionsWithContext
2 years ago
shirou
8d22915181
[disk][darwin]: add issue URL
2 years ago
Brian Ryner
c2fa2cbf8e
Update comment
2 years ago
Brian Ryner
34da06e9b7
fix
2 years ago
Brian Ryner
c5e42b972f
Truncate the result of Getfsstat to the item count that is returned.
...
This count may be less than what was returned by the first call to Getfsstat.
2 years ago
shirou
a0f8443561
Revert "[disk][windows] Support LabelWithContext & SerialNumberWithContext - rebased "
2 years ago
shirou
af44f9d16b
Merge pull request #1367 from FrankSpitulski/feat/implement-label-windows
...
[disk][windows] Support LabelWithContext & SerialNumberWithContext - rebased
2 years ago
shirou
9fc4d70059
Merge pull request #1379 from shirou/feature/revert_errors_from_internal
...
[disk][host]: move back Warnings from internal to disk and host.
2 years ago
shirou
5473fd114d
[disk][host]: change to use type alias.
2 years ago
Steve Zhang
cf62eac8f9
The current codes miss below statistic data under solaris/illumos:
...
1. the disk io statistic data as: nread, nwritten, reads, writes, rtime, wtime;
2. the free memory under global zone;
3. the net io statistic data as: rbytes64, ipackets64, idrops64, ierrors, obytes64, opackets64, odrops64, oerrors.
The new feature branch adds the above missing statistic data based on the psutil project (https://psutil.readthedocs.io/ ), it has been tested under solaris ( Oracle Solaris 11.4 X86) and illumos (OmniOS v11 r151044).
3 years ago
shirou
4ac7e99c6a
[disk][host]: move back Warnings from internal to disk and host.
...
fix #1377
3 years ago
Frank Spitulski
d7c791252a
rebase on master
3 years ago
Matthew Palmer
b515acb162
[disk][windows] Support LabelWithContext & SerialNumberWithContext
...
Add support for LabelWithContext & SerialNumberWithContext, additionally returning this data back for the IOCountersWithContext function.
3 years ago
Aman Karmani
0823447625
[ios][disk] IOKit is not available on iOS
3 years ago
shirou
769daafb9e
Merge pull request #1347 from atoulme/windows_errors
...
Return all Windows partitions
3 years ago
Antoine Toulme
dbc0f20fe3
code review
3 years ago
shirou
da529f3639
Merge pull request #1341 from chbuescher/master
...
implement aix nocgo disk usage
3 years ago
Antoine Toulme
6b2bfe408d
Return all partitions on Windows and all errors rather than returning early
3 years ago
Ties de Wit
705a63f1b2
Update disk_unix.go
3 years ago
Ties de Wit
43d805cf5d
Fix for diskusage Ceph mount
...
This sets `used` and `usedPercent` correctly in #1344
3 years ago
xca1075
9ef87ea3d8
aix disk: implement getFSType to get Usage() from disk_unix working; implement Partitions()
3 years ago
Stuart Caie
e0400cc94f
Use 0 as default mach port
3 years ago
Stuart Caie
55411f1178
Replace IOMainPort/IOMasterPort() and kIOMainPortDefault/kIOMasterPortDefault with NULL
3 years ago
shirou
ff544cb3e7
Merge pull request #1310 from cipherboy/fix-int8-to-byte
...
Fix []int8 to []byte in disk/disk_openbsd.go due to x/sys/unix type change
3 years ago
Alexander Scheel
aee8cecfcd
Mirror updated x/sys/unix OpenBSD Statfs_t fields
...
Per change in x/sys/unix, these Statfs_t fields are now converted to
[]byte rather than []int8. Callers with updated x/sys/unix versions will
now see something like:
> Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:59:53: cannot use stat.F_mntfromname[:] (type []byte) as type []int8 in argument to common.IntToString
> Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:60:51: cannot use stat.F_mntonname[:] (type []byte) as type []int8 in argument to common.IntToString
> Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:61:52: cannot use stat.F_fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
> Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v3.21.5+incompatible/disk/disk_openbsd.go:149:45: cannot use stat.F_fstypename[:] (type []byte) as type []int8 in argument to common.IntToString
It is probably prudent to update to the newer struct definitions as a
result.
See also: https://groups.google.com/g/golang-codereviews/c/bPBR9-4hV6E
See also: https://go-review.googlesource.com/c/sys/+/407195/2
See also: bc2c85ada1
Signed-off-by: Alexander Scheel <alex.scheel@hashicorp.com>
3 years ago
xca1075
d4f012c565
fix aix nocgo compile
3 years ago
xca1075
e24e72062b
aix: split code, that uses perfstat, to _cgo and _nocgo files
3 years ago
shirou
19771aaf91
Merge pull request #1296 from Lomanic/issue1094
...
[disk][windows] Set EnableCounterForIoctl reg key to 1 in init() to automatically enable diskperf on Server editions
3 years ago