Commit Graph

52 Commits (2f14062364b00090f0d93ad757a3f5e769c19342)

Author SHA1 Message Date
shirou 72d3ba4191 [disk][windows]: ignore network drive when not ready
Mingyang Zheng 16d7f3242c fix(IOCountersWithContext): Fix the issue of not using names to filter devices in func IOCountersWithContext of the windows implementation
shirou bc060cc227 add SPDX License, remove old build tag, and replace import
Ozan HACIBEKİROĞLU 1ed7ea75d7 fix: fixed windows disk package leaks
- fixed goroutine leak in PartitionsWithContext
- closed registry handle in init
shirou 586926508c
Merge pull request #1431 from powersj/fix/1429
fix: moves common.Warnings to common OS files
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
David Newhall II 3a88ef27a5 close channel in function that sends to it
shirou 8105a6d577 [disk][windows]: add context handling on PartionsWithContext
shirou a0f8443561
Revert "[disk][windows] Support LabelWithContext & SerialNumberWithContext - rebased "
shirou af44f9d16b
Merge pull request #1367 from FrankSpitulski/feat/implement-label-windows
[disk][windows] Support LabelWithContext & SerialNumberWithContext - rebased
shirou 5473fd114d [disk][host]: change to use type alias.
shirou 4ac7e99c6a [disk][host]: move back Warnings from internal to disk and host.
fix #1377
Frank Spitulski d7c791252a rebase on master
Matthew Palmer b515acb162 [disk][windows] Support LabelWithContext & SerialNumberWithContext
Add support for LabelWithContext & SerialNumberWithContext, additionally returning this data back for the IOCountersWithContext function.
Antoine Toulme dbc0f20fe3 code review
Antoine Toulme 6b2bfe408d Return all partitions on Windows and all errors rather than returning early
Lomanic 2318b5e69f [disk][windows] Set EnableCounterForIoctl reg key to 1 in init() to automatically enable diskperf on Server editions
Fixes #1094
mmorel-35 1e6b445a8a gofumpt
shirou 0969c9436b delete v2 directory, move v3 to top #1078
shirou 1f733a99dc [disk] move without context functions to disk.go.
Sergey Vinogradov 8ff2ab3187 Add "vet" target to the Makefile
Making the "vet" target will run "go vet ./..." for each supported
GOOS.

Also, some of the warnings produced by go 1.15 vet were mitigated.
Lomanic f98100720e [process][windows] Fix #846 use win32 API in disk.IOCounters() instead of slow WMI call returning wrong values
shirou b2eb6640fb [disk][windows]: does not define ret at begining of the function.
To reduce memory when error happend. commented on #653.
shirou 852c7686b5
Merge pull request #613 from tmm1/allow-a-b-windows-drives
do not ignore A: and B: drives on windows
Aman Gupta d021425af3 do not ignore A: and B: drives on windows
from https://www.howtogeek.com/122891/what-are-the-windows-a-and-b-drives-used-for/

>if your computer does not have floppy disk drives, you can assign A and B to volumes
Aman Gupta ab57d4a5fe fix minor typo in disk_windows
shirou 8563278a9d Revert "Merge pull request #541 from sify21/fix_435"
This reverts commit a9c2f23bc2, reversing
changes made to ebfe800cf9.
司芳源 1b641b25eb not export custom types
司芳源 98cd971621 wrong variable
司芳源 facd46a4a5 Implement disk.GetDiskSerialNumber for Windows via WMI. Parameter should be drive letter, so it can be used in IOCountersStat. See last part of https://msdn.microsoft.com/en-us/library/windows/desktop/aa394592(v=vs.85).aspx.
sada 8dd42707e2 windows: fix WithContext functions
set timeout only if parent context doesn't set.
shirou 4c73494c78 Add WithContext functions.
leaf 65598d98cc To prevent hang if wmi.Query hangs, add a context-aware wrapper for it.
Sean Chittenden 635b971c0e
Move from the `syscall` package to the `golang.org/x/sys/{unix,windows}`
shirou 37c114fe6c Merge pull request #366 from tmm1/patch-2
Ignore GetVolumeInformation errors on DRIVE_REMOVABLE volumes
Aman Gupta f2cbbac707 Ignore GetVolumeInformation errors on DRIVE_REMOVABLE volumes
Aman Gupta b59c2a2be3 Include "DRIVE_REMOTE" volumes on windows
Daniel Nelson 3830ed16b4
Make IOCounters a variadic function
Remove IOCountersForNames that was recently added in favor of variadic
function with same capabilities.
WAKAYAMA Shirou dfbb3e40da fix build bugs.
Daniel Nelson 3f35f001da
Add disk.IOCountersForNames function
Operates like disk.IOCounters, but accepts an array of names to limit
the results.
Shirou WAKAYAMA ea152ea901 [BREAKING CHANGE] rename functions to pass golint. ex) net.NetIOCounters -> net.IOCounters
Shirou WAKAYAMA 7288e9a5af common[all]: add internal
WAKAYAMA Shirou 773d9d3caa disk[windows]: change to use WMI to get disk io counter information.
Ben Aldrich 0fab61e73e remove log message
Ben Aldrich 6c000b035d don't fail if cd is not in a drive
add used and usedPercent back in
Ben Aldrich 85a89e707b fix compile fail
Cameron Sparr 1a037fddb1 Fix disk usage stats for windows
WAKAYAMA Shirou 612e7109e1 delete debug
WAKAYAMA Shirou bb1747fc85 disk: implements DiskIoCounterInfo on windows. Note: only read/write counts during 500 msec.
Thanks for mackerel-agent!
Shirou WAKAYAMA 13cd195a7e change package name.