Commit Graph

1801 Commits

Author SHA1 Message Date
shirou 656e0c758a
Merge pull request #1108 from shirou/dependabot/go_modules/v3/github.com/stretchr/testify-1.7.0
Bump github.com/stretchr/testify from 1.6.1 to 1.7.0 in /v3
2021-07-30 07:59:26 +09:00
dependabot[bot] cd789c0cf9
Bump github.com/stretchr/testify from 1.6.1 to 1.7.0 in /v3
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.6.1...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-29 22:06:24 +00:00
shirou d7540e6cfc
Merge pull request #1113 from lespea/fixWmiAgain
Newest version of wmi
2021-07-30 07:05:34 +09:00
Adam Lesperance 7993cb68cc Newest version of wmi 2021-07-29 16:48:26 -05:00
shirou 48ca99694c
Merge pull request #1099 from edge/master
fix wmi version
2021-07-24 17:21:52 +09:00
shirou a94b35811c
Merge pull request #1107 from rasa/patch-1
docs: fix typos and grammer
2021-07-24 17:10:25 +09:00
Ross Smith II dda0350d41
Update README.rst 2021-07-23 06:26:39 -07:00
shirou 78e21dd887
Merge pull request #1097 from secDre4mer/master
feat: Add support for environment variable read
2021-07-23 22:24:38 +09:00
shirou 5fe3154cd3
Merge pull request #1106 from odinje/host-platform_family_rocky
Ensure rhel platform family for Rocky Linux
2021-07-23 18:56:37 +09:00
Max Altgelt 3ce14ac1bb
chore: Update golang.org/x/sys to NTStatus support
Update the requested version for golang.org/x/sys to the commit
that introduces support for NTStatus which is now used.
2021-07-22 07:53:12 +02:00
Ross Smith II 120ab7fb06
Update README.rst 2021-07-21 17:37:08 -07:00
Ross Smith II ebe2843f84
More (opinionated) doc fixes 2021-07-21 17:36:02 -07:00
Ross Smith II e364a40c47
docs: fix typo 2021-07-21 17:29:54 -07:00
odinje a3e22baec0 Ensure rhel platform family for Rocky Linux 2021-07-21 23:04:09 +02:00
Max Altgelt 9ad6c64727
fix: Remove superfluous EnvironWithContext definitions
Since Darwin / FreeBSD / OpenBSD all use process_bsd.go, remove
the duplicated "not implemented" EnvironWithContext definitions
from their custom go files.

Signed-off-by: Max Altgelt <max.altgelt@nextron-systems.com>
2021-07-19 09:22:20 +02:00
Max Altgelt 5f61473ffd
fix: Correct UNICODE_STRING64 definition
Correct the UNICODE_STRING64 definition. The length is only
16 bits, followed by 16 bit max length and 32 bit padding.
2021-07-19 07:34:42 +02:00
shirou 4746baa8c7
Merge pull request #1101 from shirou/dependabot/github_actions/actions/labeler-3.0.2
Bump actions/labeler from 2 to 3.0.2
2021-07-15 22:09:58 +09:00
dependabot[bot] 0f84c89cb4
Bump actions/labeler from 2 to 3.0.2
Bumps [actions/labeler](https://github.com/actions/labeler) from 2 to 3.0.2.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v2...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-15 11:37:12 +00:00
shirou 3814f4e2a1
Merge pull request #1100 from mmorel-35/chore/dependabot
Set up Dependabot
2021-07-15 20:36:50 +09:00
Matthieu MOREL 0e9c4d3b85
Update dependabot.yml 2021-07-14 00:06:45 +02:00
Matthieu MOREL 26442de1b3
Create dependabot.yml 2021-07-14 00:05:23 +02:00
Aneurin Barker Snook 42f69011cc fix wmi version 2021-07-13 16:38:10 +01:00
Max Altgelt 73fee847e6
chore: add tests
Add simple tests to verify that environment variables are read.
2021-07-13 16:38:49 +02:00
Max Altgelt 5337ed8408
chore: Add changes to v3 gopsutil 2021-07-13 16:14:57 +02:00
Max Altgelt b02b92e16b
feat: Add support for environment variable read
Add support (for Linux and Windows for now) for reading the
environment variables of a process, with a similar syntax to
os.Environ().
For Windows, this includes some refactoring for clean access to the
RTL_USER_PROCESS_PARAMETERS structure which points to the command
line and the environment variables.
2021-07-13 15:11:29 +02:00
shirou 42d667edb6
Merge pull request #1096 from lespea/goModWMI
Update wmi to go.mod supported version
2021-07-10 20:52:25 +09:00
Adam Lesperance 8a083b8393 Update wmi to go.mod supported version 2021-07-09 10:36:03 -05:00
shirou ec072d99db
Merge pull request #1091 from shirou/add_other_flag_to_shellcheck
change to use ludeeus/action-shellcheck for shellcheck.
2021-07-01 14:59:50 +09:00
shirou 92aa11e80a use ludeeus/action-shellcheck for shellcheck. 2021-06-29 12:20:05 +00:00
shirou d87e955d79
Merge pull request #1090 from MyaLongmire/windows_name_fix
simplify mutex usage
2021-06-29 20:59:19 +09:00
shirou daec167ba2
Merge pull request #1087 from ivandeex/openbsd-process-nocgo
process, v3/process (openbsd):  remove remaining CGO bits from CmdlineSliceWithContext
2021-06-28 22:38:03 +09:00
Mya cb512c8500 simplify mutex usage 2021-06-24 15:18:00 -07:00
shirou 7ea8062810
Merge pull request #1083 from elmeyer/fix-processes-smartos
process, v3/process (Linux): fix Processes in SmartOS lx containers
2021-06-20 00:30:09 +09:00
shirou fcbe555401
Merge pull request #1088 from fredwangwang/fix-slow-cpuinfo-win
processor, v3/processor (Win): fix slow cpuinfo on multisocket config
2021-06-20 00:28:49 +09:00
Huan Wang 6a572952f0 fix slow cpuinfo on multisocket config
updated win32_Processor struct to exclude loadpercentage field.
The loadpercentage takes linearly more time as the # of sockets
increases. By default vSphere maps 1 vCPU to 1 socket, resulting in very
poor performance when getting CPU info against, saying, 40 vCPU VM
(basically 40 sockets as seen by the VM).
2021-06-14 22:00:22 -06:00
Lars Meyer e89412a81e [process][linux] copy test for missing iotime in SmartOS lx containers to v3 2021-06-14 15:17:32 +02:00
shirou b60e8d1895
Merge pull request #1081 from tklauser/process-sysconf-clk-tck
process, v3/process: use SC_CLK_TCK sysconf value instead of hard-coding clock ticks
2021-06-12 19:11:31 +09:00
Ivan Andreev d6e0932b96 Remove CGO bits from process_openbsd.go (also v3)
Prior to this commit CGO was used in OpenBSD implementation of
Process.CmdlineSliceWithContext() for parsing the "kern.proc.args"
sysctl output. It requires some pointer arithmetics and raw pointer
dereferencing.

Having CGO in the "process" module prevents it from being go vet'ted
on any platform other than OpenBSD. In order to overcome this
limitation, the sysctl output parsing was reimplemented without raw
pointer deferencing. The resulting code might be slightly slower
than the original one, but it is cleaner and safer.

Since this fix allows go vet with GOOS=openbsd to run without any
issues on all platforms, openbsd entries were also added to the "vet"
Makefile target.

Co-authored-by: Sergey Vinogradov <cbrpnk@gmail.com>
2021-06-11 03:38:46 +03:00
Lars Meyer e42c52cb35 [process][linux] add test for missing iotime in SmartOS lx containers 2021-06-04 10:38:28 +02:00
Lars Meyer 0ab3954dc4 [process][linux] fix Processes in SmartOS lx containers
In Linux containers running in LX Branded Zones on SmartOS (potentially
other Solaris-based OSes with LX Branded Zones),
fillFromTIDStatWithContext panics as the delayacct_blkio_ticks field is
not present and thus results in an out-of-bounds slice access.
Check the slice length before and only attempt to parse the
delayacct_blkio_ticks field if there is an appropriate number of fields.
2021-06-04 10:15:21 +02:00
Tobias Klauser 611c8b576e process, v3/process: use SC_CLK_TCK sysconf value instead of hard-coding clock ticks
The github.com/tklauser/go-sysconf package is already a dependency used
in the cpu and v3/cpu packages to determine clock ticks using
`sysconf.Sysconf(sysconf.SC_CLK_TCK)`, see #1036. Use the same in
packages process and v3/process as well instead of hard-coding clock
ticks to 100.
2021-06-02 14:11:11 +02:00
Tobias Klauser 25b4a07b16 Update github.com/tklauser/go-sysconf to v0.3.6
List of changes: https://github.com/tklauser/go-sysconf/compare/v0.3.4...v0.3.6
2021-06-02 14:11:09 +02:00
shirou b49f37e9f3
Merge pull request #1076 from scop/feat-arm-cpuinfo
[cpu][linux] more info for ARM processors
2021-06-01 16:28:17 +09:00
Ville Skyttä 47f2f0eee5 [cpu][linux] add more ARM hw implementers 2021-05-30 15:39:19 +03:00
shirou d5e9031b2a
Merge pull request #1079 from shirou/feature/fix_1056_tests_and_copy_to_v2
[process][linux] fix 1056 test and copy to v2
2021-05-29 22:34:37 +09:00
shirou 9bd4bc70ae [process][linux] fix 1056 test and copy to v2 2021-05-29 21:31:50 +09:00
shirou 3a48fa3629
Merge pull request #1077 from shirou/feature/1010_port_to_v3
[host][openbsd][v3] Fix wrong OpenBSD user count
2021-05-29 18:47:24 +09:00
shirou bade702712
Merge pull request #1056 from sakateka/splitProcStat
add a reliable way to get fields from /prod/PID/stat
2021-05-29 18:47:12 +09:00
shirou ddef7ea64d [host][openbsd][v3] Fix wrong OpenBSD user count 2021-05-29 13:40:07 +09:00
shirou 2782a109dc
Merge pull request #1010 from gdbinit/openbsd-wrong-users-number-patch
Fix wrong OpenBSD user count
2021-05-29 13:39:08 +09:00