Commit Graph

1576 Commits (2e4fcbb8c4fea193c453f7b130ebf6800569419a)
 

Author SHA1 Message Date
Lomanic 2e4fcbb8c4
Merge pull request #917 from amdprophet/darwin-arm64
Add support for Darwin/ARM64
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
shirou efc768ada6
Merge pull request #898 from tyldavis/master
Fix MemoryMaps on ARM
5 years ago
shirou 7a4809ba68
Merge pull request #908 from tklauser/host-bsd-boottime
Use common implementation for BootTime/Uptime on all BSDs
5 years ago
Tobias Klauser 28890b0482 Use common implementation for BootTime/Uptime on all BSDs
All BSDs use the same implementation to get BootTime{,WithContext} and
Uptime{,WithContext} based on the kern.boottime sysctl. Move this
implementation to a separate host/host_bsd.go file shared by darwin,
freebsd and openbsd. Also use SysctlTimeval to get
the boot time directly as a type Timeval instead of manually
extracting it using package unsafe. It will also allow for easier reuse
to support package host on e.g. Dragonfly BSD or NetBSD.

This requires updating the golang.org/x/sys/unix dependency to the
latest revision.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
5 years ago
Simon Thoby 3b64944534 Set the 'free' memory value to the 'available' memory on windows 5 years ago
Tyler Davis 8d28f1b305 Clean up boolean condition 5 years ago
Tyler Davis 9473d01f0f Fix MemoryMaps on ARM
ARM has some tab characters in smaps instead of spaces, hence switching to strings.Fields instead of strings.Split which handles splitting on all whitespace instead of just spaces.
5 years ago
shirou 6d64cd6d43
Merge pull request #882 from james-bebbington/mem-linux-pgmajfault
Add pgmajfault to data returned by vmstat on Linux
5 years ago
James Bebbington 61cb122a84
Added comment noting that PgMajFault is Linux specific 5 years ago
shirou 10a398abdd add RISC-V and DragonFlyBSD to partial support. 5 years ago
shirou c8251cf603
Merge pull request #896 from tklauser/host-linux-riscv64-support
Add linux/riscv64 support
5 years ago
Tobias Klauser 1934eadfcb Add linux/riscv64 build test 5 years ago
Tobias Klauser 1e61ed79fa host: add support for linux/riscv64 5 years ago
shirou 01afd763e6
Merge pull request #893 from gballet/cpu-add-dragonflybsd-support
cpu: support for DragonflyBSD
5 years ago
shirou 7d13aa15fc
Merge pull request #895 from tklauser/freebsd-statvfs-type
Fix FreeBSD build with latest x/sys/unix
5 years ago
Tobias Klauser d5eecd689d Fix FreeBSD build with latest x/sys/unix
There was a breaking change in upstream golang.org/x/sys/unix which
changed the type of some Statvfs members, see #853. As it looks like
this change won't be reverted, adjust gopsutil to work with it and allow
to build against the latest version of x/sys/unix.
5 years ago
Guillaume Ballet baec973ff6 Fix stepping extraction 5 years ago
Guillaume Ballet 877e0a6603 more typo fixes 5 years ago
Guillaume Ballet 8968457048 fix typo 5 years ago
Guillaume Ballet 771601b292 use sysctl instead of parsing dmesg output 5 years ago
shirou b806400ff0
Merge pull request #894 from citruspi/improved-lxc-guest-discovery
LXC Guest Detection from Environ Procfile
5 years ago
Guillaume Ballet 9390667f0f
Update cpu/cpu_dragonfly.go
Co-authored-by: shirou <shirou.faw@gmail.com>
5 years ago