Statistics about system memory usage
Value
Named list. All numbers are in bytes:
total
: total physical memory (exclusive swap).avail
the memory that can be given instantly to processes without the system going into swap. This is calculated by summing different memory values depending on the platform and it is supposed to be used to monitor actual memory usage in a cross platform fashion.percent
: Percentage of memory that is taken.used
: memory used, calculated differently depending on the platform and designed for informational purposes only.total
-free
does not necessarily matchused
.free
: memory not being used at all (zeroed) that is readily available; note that this doesn’t reflect the actual memory available (useavailable
instead).total
-used
does not necessarily matchfree
.active
: (Unix only) memory currently in use or very recently used, and so it is in RAM.inactive
: (Unix only) memory that is marked as not used.wired
: (macOS only) memory that is marked to always stay in RAM. It is never moved to disk.buffers
: (Linux only) cache for things like file system metadata.cached
: (Linux only) cache for various things.shared
: (Linux only) memory that may be simultaneously accessed by multiple processes.slab
: (Linux only) in-kernel data structures cache.
See also
Other memory functions:
ps_system_swap()
Examples
ps_system_memory()
#> $total
#> [1] 16757342208
#>
#> $avail
#> [1] 15298060288
#>
#> $percent
#> [1] 8.708314
#>
#> $used
#> [1] 1071382528
#>
#> $free
#> [1] 12564762624
#>
#> $active
#> [1] 1415716864
#>
#> $inactive
#> [1] 2038083584
#>
#> $buffers
#> [1] 227037184
#>
#> $cached
#> [1] 2894159872
#>
#> $shared
#> [1] 24702976
#>
#> $slab
#> [1] 514121728
#>