Shell commands to find available memory

Andre Garzia andre at andregarzia.com
Tue Aug 14 14:28:32 EDT 2012


Richard,

Maybe one of the keys output from:

sysctl -a | grep mem

will help you.

On Tue, Aug 14, 2012 at 2:55 PM, Richard Gaskin
<ambassador at fourthworld.com> wrote:
>
> Finding available memory on Linux is easy using the shell command "free".
>
> But "free" isn't available on OS X, and although "alloc" is listed as an equivalent at some sites it isn't available on any of the Macs I have here.
>
> I could use "top -l1 -n0" to get just the overview stuff from which I can parse out the memory info, but it's not a very fast command to execute, taking more than a second to return the result to LiveCode.
>
> On Windows there's the "mem" command, but that only returns memory available for the CLI itself, not for the whole system.
>
> Anyone here know a fast way to get available memory on OS X and Windows on all versions of those OSes supported by LiveCode?
>
> TIA -
>
> --
>  Richard Gaskin
>  Fourth World
>  LiveCode training and consulting: http://www.fourthworld.com
>  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
>  Follow me on Twitter:  http://twitter.com/FourthWorldSys
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




--
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.




More information about the use-livecode mailing list