
The /bin/free on Fedora 21 doesn't understand -o argument to free; that being: --- -o, --old Display the output in old format, the only difference being this option will disable the display of the "buffer adjusted" line. --- i.e. the difference is the "-/+ buffers/cache" line. Since the sed only matches on the line starting "^Mem", this is not relevant anyway. Change-Id: Ib2f763ea82b9a3b397d202453099d58e5dd5a355
8 lines
169 B
Ruby
Executable File
8 lines
169 B
Ruby
Executable File
# memorytotalbytes.rb
|
|
|
|
Facter.add("memorytotalbytes") do
|
|
setcode do
|
|
Facter::Util::Resolution.exec('free -b | sed -n \'s/^Mem:\W\+\([0-9]\+\).*$/\1/p\'')
|
|
end
|
|
end
|