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
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
Tobias Klauser
62354ea032
Fix TestVirtual_memory on OpenBSD
...
On OpenBSD, the total is used + free + cached + inactive like on macOS.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
5 years ago
Tobias Klauser
aacbba22ae
Use unix.SysctlUvmexp on OpenBSD
...
Use SysctlUvmexp from golang.org/x/sys/unix to avoid having to define
the type Uvmexp and the sysctl consts. This will also allow to build on
GOOS=openbsd with e.g. GOARCH=arm64.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
5 years ago
Lomanic
c4663018cc
Merge pull request #923 from disconnect3d/patch-2
...
net_linux.go: decode port as uint16 instead of int64
5 years ago
Lomanic
d9f9a85e75
Merge pull request #924 from nightmared/fix-utf16-windows
...
fix an invalid shift in windows processes name UTF16 conversion
5 years ago
Lomanic
ab084b525c
[net] Skip tests on non-implemented platforms #446
5 years ago
Lomanic
ea86cbc3ff
[mem] Skip tests on non-implemented platforms #446
5 years ago
Lomanic
78a65a67a9
[load] Skip tests on non-implemented platforms #446
5 years ago
Lomanic
8110480793
[host] Skip tests on non-implemented platforms #446
5 years ago
Lomanic
b7781f5858
[disk] Skip tests on non-implemented platforms #446
5 years ago
Lomanic
38f6ed0e0c
[cpu] Skip tests on non-implemented platforms #446
5 years ago
Disconnect3d
5c1a9e709d
net_linux.go: decode port as 16-bit uint
...
Changes the port parsing from `/proc/net/*` files records from parsing them as 64-bit integers to parse them as 16-bit unsigned integers.
While this is mostly a cosmetic change, it will also make so that the code fails faster in case the entry is malformed (for whatever reason).
Note that the returned value is still casted to uint32 when an `Addr` object is created.
It seems to me that the `Addr.port` field should be changed to `uint16` but maybe some other APIs/systems wants it to be `uint32` and also changing it there may require changes in users code if they update. This being said I am not changing that field's type.
5 years ago
Simon Thoby
04a6f81e9f
fix an invalid shift in windows processes name UTF16 conversion
5 years ago
Justin Kolberg
53ffb0cece
Add support for Darwin/ARM64
...
Signed-off-by: Justin Kolberg <amd.prophet@gmail.com>
5 years ago
shirou
7e94bb8bcd
Merge pull request #775 from TakayukiBGoto/add_additional_gids_support
...
[Process] Implement Groups() to get additional gids.
5 years ago
shirou
4e6138ae09
Merge pull request #901 from nightmared/expose-available-memory-as-free-win
...
Set the 'free' memory value to the 'available' memory on windows
5 years ago
shirou
bbcb80cd3f
Merge pull request #891 from tribes/master
...
[process][windows] implement suspending and resuming with ntdll library
5 years ago