shirou
cf222ab258
Merge pull request #975 from shirou/feature/remove_disk_partition_args_on_bsds
...
Feature/remove disk partition args on bsds
2020-10-24 10:25:30 +09:00
AtakanColak
13602a3824
fix ppid cache race condition #964
2020-10-23 11:38:02 +03:00
AtakanColak
24e6d6d350
add load to windows
2020-10-22 17:44:11 +03:00
shirou
f258441486
add more platform to labeler.
2020-10-22 10:07:45 +09:00
shirou
23a52469fa
add github labeler to set labels automatically.
2020-10-21 22:20:24 +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
shirou
3202231bcd
Merge pull request #966 from boogie-byte/dry-process
...
Refactor "process" package
2020-10-18 18:16:16 +09:00
Lomanic
34fbc94ac1
Merge pull request #963 from AtakanColak/simpler-virt-cache
...
Simplify Fix Virtualization Cache Race Condition
2020-10-16 00:40:38 +02:00
Lomanic
278ae7d3a6
Merge pull request #970 from Lomanic/issue958
2020-10-16 00:15:39 +02:00
Lomanic
32d4603d01
[disk][darwin] fix build with latest golang.org/x/sys/unix
...
Fixes #958
2020-10-15 23:59:25 +02:00
Atakan
3504ea07b0
simplify virt cache
2020-10-13 11:06:20 +03:00
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.
2020-10-12 18:15:29 +03:00
shirou
b94f262e7d
Merge pull request #949 from boogie-byte/vet-target
...
Add "vet" target to the Makefile
2020-10-11 23:01:10 +09:00
shirou
7144fe3fff
Merge pull request #955 from fancybits/disk-bind-root
...
[disk][linux] flag bind mounts
2020-10-11 21:19:38 +09:00
shirou
ad46664943
Merge pull request #951 from rmfitzpatrick/fix_virtualization_race
...
Fix VirtualizationWithContext() race in linux
2020-10-11 21:03:32 +09:00
shirou
fe68b86b08
Merge pull request #948 from AtakanColak/windows-cache-ppid
...
Cache Process Parent ID in Windows
2020-10-11 18:52:27 +09:00
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.
2020-10-10 16:50:49 +03:00
Aman Karmani
23d63601d1
[disk][linux] flag bind mounts
2020-10-07 11:01:01 -07:00
Ryan Fitzpatrick
8046134504
Fix VirtualizationWithContext() race in linux
2020-10-06 17:03:49 +00:00
Lomanic
42136c7364
Merge pull request #947 from Lomanic/issue925
...
[process][darwin] Fix #925 properly and improve some tests
2020-10-02 18:28:51 +02:00
Lomanic
eaa34817d0
[process] Add benchmarks for New(), Name() Ppid()
...
run only them with: go test -bench=. -run=xxx github.com/shirou/gopsutil/process
2020-10-01 10:24:54 +02:00
Atakan Çolak
7cc8d3f711
cache ppid in windows
2020-10-01 11:17:40 +03:00
shirou
5084874a4c
Merge pull request #942 from AtakanColak/patch-1
...
Cache common/common_linux.Virtualization()
2020-10-01 11:56:51 +09:00
Lomanic
64ba9d03cd
[process] Properly test Ppid() against known value
2020-09-29 23:58:34 +02:00
Lomanic
c9c40215f5
[process][darwin] Fix #925 properly with unix.SysctlRaw("kern.proc.pid", PID)
2020-09-29 23:56:25 +02:00
Ata
ba243b1d14
removed explicit set to nil
2020-09-29 10:12:48 +03:00
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
2020-09-28 19:47:15 +02:00
shirou
6c9f3bdcae
[host][linux] Change to use unix.SysInfo_t to get Uptime in Linux
2020-09-19 11:12:05 +09:00
shirou
c5b7357407
Merge pull request #944 from shirou/issue849
...
[cpu][linux] Fix #849 implement giampaolo/psutil#1727 and test Counts against lscpu
2020-09-19 10:24:54 +09:00
Lomanic
bb6f6e4968
[cpu][linux] Test Counts against lscpu results
2020-09-15 21:39:25 +02:00
Lomanic
7700262175
[cpu][linux] Fix #849 implement giampaolo/psutil#1727 in Counts() for physical cores
2020-09-15 21:38:47 +02:00
Lomanic
4545a21761
Merge pull request #939 from Lomanic/mktypes-gofmt
...
Make mktypes.sh generate go-fmt-ed code and make it shellcheck-compliant
2020-09-13 20:13:22 +02:00
shirou
4a5b404d76
Merge pull request #943 from boogie-byte/dry-host
...
Refactor "host" package
2020-09-13 21:13:46 +09:00
James Bebbington
79e9a07263
Add ProcsCreated stat for openbsd
2020-09-12 12:38:15 +10:00
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
2020-09-12 01:06:54 +02:00
Sergey Vinogradov
5209442b3c
Refactor "host" package
2020-09-11 18:54:53 +03:00
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
2020-09-11 10:41:01 +03:00
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.
2020-09-08 11:44:46 +02:00
Lomanic
8a625ec054
[host][process][darwin] Go-fmt code from mktypes.sh from #917
2020-09-07 21:12:17 +02:00
Lomanic
2e4fcbb8c4
Merge pull request #917 from amdprophet/darwin-arm64
...
Add support for Darwin/ARM64
2020-09-07 21:10:27 +02:00
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
2020-09-07 20:16:12 +02:00
Lomanic
4cfc60d68b
Merge pull request #928 from Lomanic/skip-tests-when-not-implemented
2020-09-06 13:33:31 +02:00
shirou
e25aa96aad
Merge pull request #936 from ninedraft/fix-context-usage
...
Use cancelable sleep
2020-09-05 10:53:34 +09:00
ninedraft
baf3495197
use legacy error check in the common.TestSleep
2020-09-03 23:07:04 +03:00
ninedraft
34df4904f6
use cancelable sleep in cpu.PercentWithContext and process.Process.PercentWithContext
2020-09-03 23:01:53 +03:00
Lomanic
e1925b853e
Merge pull request #935 from Lomanic/issue900
...
[linux] Fix #900 , skip or fix failing tests in docker
2020-09-02 10:35:27 +02:00
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
2020-09-02 01:06:17 +02:00
Lomanic
ffaff45e9c
Merge pull request #932 from tklauser/openbsd-cpu
...
Use unix.SysctlUint32("hw.ncpuonline") on OpenBSD
2020-09-01 15:23:21 +02:00
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>
2020-09-01 11:22:28 +02:00
Lomanic
9aa2bee419
Merge pull request #933 from Lomanic/openbsd-host-mem-process-types
...
[host][mem][process][openbsd] Add 386 const and types definitions
2020-09-01 00:13:38 +02:00