1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

1552 Commits

Author SHA1 Message Date
Lomanic
b7781f5858 [disk] Skip tests on non-implemented platforms #446 2020-08-29 18:29:36 +02:00
Lomanic
38f6ed0e0c [cpu] Skip tests on non-implemented platforms #446 2020-08-29 18:29:04 +02:00
shirou
7e94bb8bcd
Merge pull request #775 from TakayukiBGoto/add_additional_gids_support
[Process] Implement Groups() to get additional gids.
v2.20.7
2020-07-24 22:09:41 +09:00
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
2020-07-24 14:00:27 +09:00
shirou
bbcb80cd3f
Merge pull request #891 from tribes/master
[process][windows] implement suspending and resuming with ntdll library
2020-07-24 13:56:50 +09:00
shirou
efc768ada6
Merge pull request #898 from tyldavis/master
Fix MemoryMaps on ARM
2020-07-24 12:39:17 +09:00
shirou
7a4809ba68
Merge pull request #908 from tklauser/host-bsd-boottime
Use common implementation for BootTime/Uptime on all BSDs
2020-07-24 12:34:48 +09:00
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>
2020-07-23 13:23:20 +02:00
Simon Thoby
3b64944534 Set the 'free' memory value to the 'available' memory on windows 2020-07-09 17:14:33 +02:00
Tyler Davis
8d28f1b305 Clean up boolean condition 2020-07-07 18:02:06 +10:00
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.
2020-07-07 15:02:10 +10:00
shirou
6d64cd6d43
Merge pull request #882 from james-bebbington/mem-linux-pgmajfault
Add pgmajfault to data returned by vmstat on Linux
2020-07-07 11:26:29 +09:00
James Bebbington
61cb122a84
Added comment noting that PgMajFault is Linux specific 2020-07-01 22:21:38 +10:00
shirou
10a398abdd add RISC-V and DragonFlyBSD to partial support. v2.20.6 2020-06-30 21:04:21 +09:00
shirou
c8251cf603
Merge pull request #896 from tklauser/host-linux-riscv64-support
Add linux/riscv64 support
2020-06-30 21:14:54 +09:00
Tobias Klauser
1934eadfcb Add linux/riscv64 build test 2020-06-30 11:34:17 +02:00
Tobias Klauser
1e61ed79fa host: add support for linux/riscv64 2020-06-30 11:34:17 +02:00
shirou
01afd763e6
Merge pull request #893 from gballet/cpu-add-dragonflybsd-support
cpu: support for DragonflyBSD
2020-06-30 18:15:42 +09:00
shirou
7d13aa15fc
Merge pull request #895 from tklauser/freebsd-statvfs-type
Fix FreeBSD build with latest x/sys/unix
2020-06-30 18:12:32 +09:00
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.
2020-06-22 23:41:01 +02:00
Guillaume Ballet
baec973ff6 Fix stepping extraction 2020-06-22 13:03:18 +02:00
Guillaume Ballet
877e0a6603 more typo fixes 2020-06-22 11:59:22 +02:00
Guillaume Ballet
8968457048 fix typo 2020-06-22 11:56:02 +02:00
Guillaume Ballet
771601b292 use sysctl instead of parsing dmesg output 2020-06-22 11:54:44 +02:00
shirou
b806400ff0
Merge pull request #894 from citruspi/improved-lxc-guest-discovery
LXC Guest Detection from Environ Procfile
2020-06-21 21:36:49 +09:00
Guillaume Ballet
9390667f0f
Update cpu/cpu_dragonfly.go
Co-authored-by: shirou <shirou.faw@gmail.com>
2020-06-21 12:21:18 +02:00
Mihir Singh
92d6df6d8f Attempted LXC guest detection from environ procfile 2020-06-21 09:13:34 +00:00
Guillaume Ballet
56d9e0b7be cpu: support for DragonflyBSD 2020-06-18 10:17:23 +02:00
Merwan Ouddane
f459195bc0 [process][windows] implement suspending and resuming with ntdll library 2020-06-17 21:21:14 +02:00
Lomanic
6f7ec36749
Merge pull request #888 from Lomanic/issue853-pin-sys
[disk][freebsd] Work around #853, pin x/sys with dep to the hash just before upstream breaking change
2020-06-06 14:31:49 +02:00
Lomanic
ca4849b710
Merge pull request #889 from Lomanic/issue832
[darwin][disk][host] Move C dependencies to satisfy go mod and have descriptive file names
2020-06-06 11:55:04 +02:00
Lomanic
5aca383d4f [disk][darwin][cgo] Rename C files dependencies to more descriptive names 2020-05-31 20:41:48 +02:00
Lomanic
42c6875555 [host][darwin][cgo] Fix #832 work around once-again broken go modules not including C files
Supersedes #885 by @afontaine
2020-05-31 20:40:36 +02:00
Lomanic
e9ecebec5a [disk][freebsd] Work around #853, pin x/sys with dep to the hash just before upstream breaking change 2020-05-31 20:36:42 +02:00
Lomanic
663af789c0
Merge pull request #872 from renaynay/update-docs-cputimes
Update docs for TimesStat with correct time unit
v2.20.5
2020-05-31 17:11:28 +02:00
Lomanic
a901d160ca
Merge pull request #870 from renaynay/naming-consistency
Renamed variables storing `CLK_TCK` value for consistency across OSs
2020-05-31 17:01:13 +02:00
Lomanic
a303ddc7d1
Merge pull request #880 from Lomanic/issue867
[process][darwin][nocgo] Fix #867 iterate on every lines returned by lsof to handle potential warnings
2020-05-31 10:18:36 +02:00
James Bebbington
16fdb92bfc Add pgmajfault to data returned by vmstat on Linux 2020-05-25 17:15:30 +10:00
Lomanic
42aec722ba
Merge pull request #878 from fancybits/android-loadavg
[load][linux] implement Avg() on top of sysinfo syscall when /proc/loadavg is not readable
2020-05-21 18:14:56 +02:00
Aman Gupta
f42052bee7 [load][android] implement on top of sysinfo syscall 2020-05-20 16:47:15 -07:00
Lomanic
8f969117ab [process][darwin][nocgo] Fix #867 iterate on every lines returned by lsof to handle potential warnings 2020-05-20 23:50:21 +02:00
Lomanic
c89193f22d
Merge pull request #857 from Gui13/fix_837
Do not cache boot time for linux. Fix #837
2020-05-17 22:47:08 +02:00
Lomanic
b6c59f1e77
Merge pull request #862 from mxmauro/quick_cmdline_windows
Fixed slow command line retrieval on Windows
2020-05-17 21:36:13 +02:00
Lomanic
c972b298b3
Merge pull request #876 from gtosh4/patch-1
Don't ignore context for io counters
2020-05-17 21:20:05 +02:00
Lomanic
ee64e05b02
Merge pull request #869 from renaynay/master
Added check for `CLK_TCK` for darwin
2020-05-17 21:11:00 +02:00
gtosh4
936d3b27f1
Don't ignore context for io counters 2020-05-16 17:06:26 -07:00
renaynay
5e1b882e37
updated docs for TimesStat with correct time unit 2020-05-13 11:21:01 +02:00
renaynay
0e9462eed2
renamed CLK_TCK variables for consistency across OSs 2020-05-12 15:36:18 +02:00
renaynay
d4985c9690
added check for CLK_TCK 2020-05-12 13:59:26 +02:00
Mauro Leggieri
7783e1d58e Added retrieval of OS platform to determine better a process platform. 2020-05-04 20:16:05 -03:00