Module Facter::Memory
In: lib/facter/util/memory.rb

Methods

Public Class methods

There is a lot of duplication here because of concern over being able to add new platforms in a reasonable manner. For all of these platforms the first regex corresponds to the swap size value and the second corresponds to the swap free value, but this may not always be the case. In Ruby 1.9.3 it is possible to give these names, but sadly 1.8.7 does not support this.

on AIX use svmon to get the free memory: it‘s the third value on the line starting with memory svmon can be run by non root users

Darwin had to be different. It‘s generally opaque with how much RAM it is using, and this figure could be improved upon too I fear. Parses the output of "vm_stat", takes the pages free & pages speculative and multiples that by the page size (also given in output). Ties in with what activity monitor outputs for free memory.

[Validate]