in reply to How to get the amount of RAM

How to get the amount of RAM (kbs) in perl?

The amount of ram:

  1. Used by a variable?
  2. Used by the program?
  3. In the machine?
  4. Free for use?
  5. Accessible to the program?
  6. On the planet?
  7. Other?

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^2: How to get the amount of RAM
by Your Mother (Archbishop) on Nov 08, 2011 at 19:42 UTC

    6. On the planet?

      There is a problem calculating this one.

      There doesn't seem to be any reliable record of how much RAM has been launched into space and so is no longer technically on the planet.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: How to get the amount of RAM
by Anonymous Monk on Nov 08, 2011 at 18:52 UTC
    3. In the machine.

      On windows, see Win32::SystemInfo.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: How to get the amount of RAM
by pvaldes (Chaplain) on Nov 09, 2011 at 16:37 UTC

    well, this sucks as a perl solution, but... in kbs:

    print `free -l -t`;

    if you prefer the output to be in megas, you can add -m to the command