Commit Graph

2014 Commits (1e56c6f421ca758fd760bca7093c64c3605720d8)
 

Author SHA1 Message Date
shirou f258441486 add more platform to labeler. 4 years ago
shirou 23a52469fa add github labeler to set labels automatically. 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
shirou 3202231bcd
Merge pull request #966 from boogie-byte/dry-process
Refactor "process" package
4 years ago
Lomanic 34fbc94ac1
Merge pull request #963 from AtakanColak/simpler-virt-cache
Simplify Fix Virtualization Cache Race Condition
4 years ago
Lomanic 278ae7d3a6
Merge pull request #970 from Lomanic/issue958 4 years ago
Lomanic 32d4603d01 [disk][darwin] fix build with latest golang.org/x/sys/unix
Fixes #958
4 years ago
Atakan 3504ea07b0 simplify virt cache 4 years ago
Sergey Vinogradov 065e609cbf Refactor "process" package
* All context-less wrapping functions (the ones without WithContext
suffix) were moved into process.go since they all are the same.
* Call context is now passed to all underlying functions in
*WithContext() functions.
* All common *BSD bits were moved to process_bsd.go.
* Process.Tgid() method lacked a WithContext counterpart, so
Process.TgidWithContext() was added for uniformity.
* NewProcessWithContext() function was added since NewProcess() is
used a lot throughout the module, and there is no way to pass a
context to it.

This is a part of #761 effort.
4 years ago
shirou b94f262e7d
Merge pull request #949 from boogie-byte/vet-target
Add "vet" target to the Makefile
4 years ago
shirou 7144fe3fff
Merge pull request #955 from fancybits/disk-bind-root
[disk][linux] flag bind mounts
4 years ago
shirou ad46664943
Merge pull request #951 from rmfitzpatrick/fix_virtualization_race
Fix VirtualizationWithContext() race in linux
4 years ago
shirou fe68b86b08
Merge pull request #948 from AtakanColak/windows-cache-ppid
Cache Process Parent ID in Windows
4 years ago
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.
4 years ago
Aman Karmani 23d63601d1 [disk][linux] flag bind mounts 5 years ago
Ryan Fitzpatrick 8046134504
Fix VirtualizationWithContext() race in linux 5 years ago
Lomanic 42136c7364
Merge pull request #947 from Lomanic/issue925
[process][darwin] Fix #925 properly and improve some tests
5 years ago
Lomanic eaa34817d0 [process] Add benchmarks for New(), Name() Ppid()
run only them with: go test -bench=. -run=xxx github.com/shirou/gopsutil/process
5 years ago
Atakan Çolak 7cc8d3f711 cache ppid in windows 5 years ago
shirou 5084874a4c
Merge pull request #942 from AtakanColak/patch-1
Cache common/common_linux.Virtualization()
5 years ago
Lomanic 64ba9d03cd [process] Properly test Ppid() against known value 5 years ago
Lomanic c9c40215f5 [process][darwin] Fix #925 properly with unix.SysctlRaw("kern.proc.pid", PID) 5 years ago
Ata ba243b1d14
removed explicit set to nil 5 years ago
Lomanic 8ece829fb7
Merge pull request #945 from shirou/host_linux_change_to_use_sysinfo_to_get_uptime
[host][linux] Change to use unix.SysInfo_t to get Uptime in Linux
5 years ago
shirou 6c9f3bdcae [host][linux] Change to use unix.SysInfo_t to get Uptime in Linux 5 years ago
shirou c5b7357407
Merge pull request #944 from shirou/issue849
[cpu][linux] Fix #849 implement giampaolo/psutil#1727 and test Counts against lscpu
5 years ago
Lomanic bb6f6e4968 [cpu][linux] Test Counts against lscpu results 5 years ago
Lomanic 7700262175 [cpu][linux] Fix #849 implement giampaolo/psutil#1727 in Counts() for physical cores 5 years ago
Lomanic 4545a21761
Merge pull request #939 from Lomanic/mktypes-gofmt
Make mktypes.sh generate go-fmt-ed code and make it shellcheck-compliant
5 years ago
shirou 4a5b404d76
Merge pull request #943 from boogie-byte/dry-host
Refactor "host" package
5 years ago
James Bebbington 79e9a07263 Add ProcsCreated stat for openbsd 5 years ago
Lomanic 8784f48735
Merge pull request #940 from Lomanic/issue985
[process][darwin] Fix #925 remove references to removed const unix.SYS___SYSCTL from x/sys/unix
5 years ago
Sergey Vinogradov 5209442b3c Refactor "host" package 5 years ago
Ata 5fd5d64304
Cache common/common_linux.Virtualization()
By assuming virtualization environment won't change during a the program's runtime, we can cache common/common_linux.Virtualization() with a simple map to reduce amount of system calls. I first mentioned this issue at https://github.com/shirou/gopsutil/pull/890#issuecomment-690211919
5 years ago
Lomanic e1082dabb6 [process][darwin] Fix #925 remove references to removed const unix.SYS___SYSCTL from x/sys/unix
More like a workaround, wanted to port process.getKProcWithContext() to use unix.SysctlRaw() to get rid of exec calls to ps
in the same time but didn't have time.
5 years ago
Lomanic 8a625ec054 [host][process][darwin] Go-fmt code from mktypes.sh from #917 5 years ago
Lomanic 2e4fcbb8c4
Merge pull request #917 from amdprophet/darwin-arm64
Add support for Darwin/ARM64
5 years ago
Lomanic 401aff67d3 Make mktypes.sh generate go-fmt-ed code and make it shellcheck-compliant
See https://github.com/shirou/gopsutil/pull/917#issuecomment-683911339
5 years ago
Lomanic 4cfc60d68b
Merge pull request #928 from Lomanic/skip-tests-when-not-implemented 5 years ago
shirou e25aa96aad
Merge pull request #936 from ninedraft/fix-context-usage
Use cancelable sleep
5 years ago
ninedraft baf3495197 use legacy error check in the common.TestSleep 5 years ago
ninedraft 34df4904f6 use cancelable sleep in cpu.PercentWithContext and process.Process.PercentWithContext 5 years ago
Lomanic e1925b853e
Merge pull request #935 from Lomanic/issue900
[linux] Fix #900, skip or fix failing tests in docker
5 years ago
Lomanic 1b3e0c6643 [linux] Fix #900, skip or fix failing tests in docker
TestGetProcInodesAll: create a server so there are some opened inodes
TestUsers: skip if Users is empty, because of an empty /var/run/utmp
Test_Process_Groups: skip if Groups is empty
TestConnectionsMax: skip on CI, not only CircleCI
5 years ago
Lomanic ffaff45e9c
Merge pull request #932 from tklauser/openbsd-cpu
Use unix.SysctlUint32("hw.ncpuonline") on OpenBSD
5 years ago
Tobias Klauser 548c500117 Use unix.SysctlUin32("hw.ncpuonline") on OpenBSD
Use SysctlUvmexp from golang.org/x/sys/unix to avoid having to simplify
the implementation of cpu.InfoWithContext

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
5 years ago
Lomanic 9aa2bee419
Merge pull request #933 from Lomanic/openbsd-host-mem-process-types
[host][mem][process][openbsd] Add 386 const and types definitions
5 years ago
Lomanic 84afaae670 [host][mem][process][openbsd] Add 386 const and types definitions
Continuation of #721, this type using mktypes.sh that I didn't know at the time.
Weirdly, `go tool cgo -godefs` doesn't produce propery go-fmt-ed code, had to do run go-fmt manually afterwards.
5 years ago
Lomanic 7f588ac380
Merge pull request #930 from tklauser/openbsd-uvmpexp
Use unix.SysctlUvmexp on OpenBSD
5 years ago
Lomanic e643eaefcc
Merge pull request #931 from tklauser/openbsd-mem-test-fix
Fix TestVirtual_memory on OpenBSD
5 years ago