Commit 392cc65
committed
(FACT-3149) Fix memory usage reporting on FreeBSD
* In vmstat(8), "free memory" correspond to unused memory that does not
contain any data, and does not include cache / inactive memory which
has some data but is immediatly available to the system if memory is
needed.
Prefer to get active and wired memory page count form sysctl(3) which
correpond to the used memory that can (active) and cannot (wired) be
swapped out, and multiply these by the size of a memory page. This
give a better overview of the current memory usage.
* Prefer `vm.stats.vm.v_page_count` over `hw.physmem`: The available
memory can be lower that what is physically present in the system and
the free / used memory is a portion of the usable memory more than a
portion of the physical memory.1 parent a3d61a3 commit 392cc65
File tree
3 files changed
+26
-19
lines changed- lib/facter/resolvers/freebsd
- spec
- facter/resolvers/freebsd
- fixtures
3 files changed
+26
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
35 | 42 | | |
36 | | - | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
This file was deleted.
0 commit comments