mmorel-35
eb5f6203d8
gofmt
2021-12-22 21:46:33 +00:00
Matthieu MOREL
c8fd8c7b1f
enable unparam linter
2021-12-22 19:53:14 +01:00
Matthieu MOREL
b673968d5d
enable errorlint linter
2021-12-04 22:29:38 +01:00
shirou
d2e27c1712
fix dependabot v2 deletion.
2021-12-01 00:12:55 +00:00
shirou
0969c9436b
delete v2 directory, move v3 to top #1078
2021-11-30 23:47:59 +00:00
Tobias Klauser
d935ecccea
mem: use unix.SysctlUint64 for hw.memsize on darwin
...
Use unix.SysctlUint64 which directly returns an uint64 rather than
converting it from a string.
2021-11-15 10:26:08 +01:00
Ville Skyttä
09c3ba3896
[mem][solaris] simplify regular expressions
2021-10-22 18:28:52 +03:00
Ville Skyttä
093e68cb91
[mem][solaris] improve prtconf memory size scraping
...
Accept uppercase Memory, that's how it appears to be at least in Solaris
11.3 and OpenIndiana oi_151a7.
2021-10-22 18:27:43 +03:00
Ville Skyttä
768c3b1888
[mem][solaris] don't hardcode path to prtconf in error message
2021-10-22 18:22:07 +03:00
shirou
7ae41c1f40
[v2][solaris][mem] fix invoke ctx.
2021-10-17 13:20:16 +00:00
shirou
3e7da36a46
[mem][solaris] fix wrong variable name.
2021-10-17 10:13:04 +00:00
WAKAYAMA shirou
46d6fcc192
[mem][bsd] fix missing arg
2021-10-09 22:49:58 +09:00
shirou
582bb14d8a
[linux][mem] remove unnecessary import
2021-09-29 22:55:44 +09:00
Punya Biswal
32b14a3723
Use invoke.CommandWithContext
2021-09-28 10:09:43 -04:00
Punya Biswal
5169bfe02d
Update mem/mem_bsd.go
...
Co-authored-by: shirou <shirou.faw@gmail.com>
2021-09-10 21:36:00 -04:00
Punya Biswal
7c1aa06a5e
Respond to review comments
...
* use LookPath for better error messages
* support procfs in containers
2021-09-08 16:15:26 -04:00
Tom Barker
84a665b712
Add mem.SwapDevices() method.
2021-08-19 10:16:30 -04:00
Guillaume Ballet
992d17af94
add support for OpenBSD arm64
2021-03-23 15:29:27 +01:00
Lomanic
cd25417bd7
[mem][linux] Fix #1002 only try to parse /proc/meminfo numeric values on fields we're interested in
2020-11-29 18:03:50 +01:00
Lomanic
07887a9e9f
[mem][linux] Add mocked test for VirtualMemory() and fix SReclaimable SUnreclaim retrieval
2020-11-29 17:54:17 +01:00
Lomanic
4cfc60d68b
Merge pull request #928 from Lomanic/skip-tests-when-not-implemented
2020-09-06 13:33:31 +02:00
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.
2020-09-01 02:02:21 +02:00
Lomanic
7f588ac380
Merge pull request #930 from tklauser/openbsd-uvmpexp
...
Use unix.SysctlUvmexp on OpenBSD
2020-08-31 19:46:31 +02:00
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>
2020-08-31 12:42:46 +02:00
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>
2020-08-31 12:38:11 +02:00
Lomanic
ea86cbc3ff
[mem] Skip tests on non-implemented platforms #446
2020-08-29 18:39:50 +02:00
Simon Thoby
3b64944534
Set the 'free' memory value to the 'available' memory on windows
2020-07-09 17:14:33 +02:00
James Bebbington
61cb122a84
Added comment noting that PgMajFault is Linux specific
2020-07-01 22:21:38 +10:00
James Bebbington
16fdb92bfc
Add pgmajfault to data returned by vmstat on Linux
2020-05-25 17:15:30 +10:00
GameXG
144c67833a
fix #863 Swap.UsedPercent is inconsistent
2020-05-03 23:27:10 +08:00
Xuewei Zhang
929068ccd5
mem: Add VirtualMemoryEx() and VirtualMemoryExWithContext()
2020-01-30 18:46:47 -08:00
Xuewei Zhang
3695635d09
Collect Active(anon), Inactive(anon) and Unevictable in /proc/meminfo
...
These fields helps people understand anonymous memory usage pattern.
2020-01-30 17:47:09 -08:00
lanixzcj
38b78c3eac
rename InActive(file) to Inactive(file) in mem_linux.go
2019-12-20 08:39:36 +08:00
Minje Park
b7f9acbce8
add unreclaim metric, this closes #719
2019-07-20 23:42:39 +09:00
Segflow
86c7289ccc
Fix: use filename in exec.LookPath instead of full path
...
exec.LookPath searches for the file in the $PATH, which mean giving it an absolute path is against it's own purposes.
2019-05-05 20:45:07 +01:00
lootek
1cbb212a6b
Add pages in/out/fault statistics (as read from vmstat)
2019-04-25 09:32:59 +02:00
mingrammer
64a995aad4
Refactor with gofmt
2019-03-23 21:57:24 +09:00
mingrammer
017c9f9cbc
Fix typos
2019-03-18 02:52:26 +09:00
WAKAYAMA shirou
bb15c85289
[mem][freebsd]: add SysctlUint which can adapt both 32 and 64 bit
2019-03-16 21:43:15 +09:00
Lomanic
e3c878cc43
[mem][darwin] Remove calls to sysctl binary in mem/mem_darwin.go #639
2019-03-02 23:22:53 +01:00
shirou
6c6abd6d16
Merge pull request #626 from mznet/manual-available-memory-calculation
...
Manual available memory calculation
2019-03-01 22:30:41 +09:00
Minje Park
c75deb9dc0
debug codes were removed
2019-02-13 01:02:18 +09:00
Minje Park
47ed6aaebd
activefile and inactivefile fields were removed from VirtualMemoryStat
2019-02-13 00:55:05 +09:00
shirou
b3d992b0f6
[mem]freebsd: update xswdev_version to adapt FreeBSD 12.
2019-02-10 23:19:06 +09:00
Minje Park
d23abede78
struct typo and broken test case were fixed
2019-01-31 00:31:43 +09:00
Minje Park
d7ce61cac8
Error checks and fallback for old linux
2019-01-31 00:13:52 +09:00
Minje Park
9fb3b9625d
mem available fallback under kernel 2.6.13
2019-01-30 21:58:44 +09:00
Minje Park
73545ec820
AvailableMemory is't calculated automatically under kenel 3.14 so it is needed to calcuate manually
...
manual available memory calculation should be done if only memavail is false
Manual Available Memory calculation under kernel 3.14
accurate manaul available memory calculation
2019-01-06 23:21:59 +09:00
Lomanic
ccc1c1016b
[mem][darwin] Fix #622 include Inactive memory in total calculation in TestVirtual_memory
2018-12-25 21:55:58 +01:00
Minje Park
f9e238c38b
SReclaimable should be added to Cached Memory
2018-12-14 00:48:38 +09:00