Re: Shell commands to find available memory

2012-08-14 Thread Bob Sneidar
I also read this: You can use the following commands: sysctl -a | grep hw.usermem sysctl -a | grep hw.physmem here: http://superuser.com/questions/197059/mac-os-x-sysctl-get-total-and-free-memory-size Bob On Aug 14, 2012, at 1:04 PM, Richard Gaskin wrote: > Bob Sneidar wrote: > > > Looks l

Re: Shell commands to find available memory

2012-08-14 Thread Richard Gaskin
Bob Sneidar wrote: > Looks like hw.memsize is total memory. hw.usermem is available > memory. Somebody correct me if I am wrong. I had thought so too, but after opening a LOT of applications and seeing avail. mem. drop in Activity Monitor, that number remained unchanged in subsequent calls.

Re: Shell commands to find available memory

2012-08-14 Thread Bob Sneidar
AHAH! vm_stat will give you what you want. (page size * pages free) + page size * pages inactive). Again correct me if I am wrong. Bob On Aug 14, 2012, at 11:54 AM, Richard Gaskin wrote: > Andre Garzia wrote: >> Maybe one of the keys output from: >> >> sysctl -a | grep mem >> >> will help y

Re: Shell commands to find available memory

2012-08-14 Thread Bob Sneidar
On a Mac, free memory is not the same thing as available memory. If you open the Activity Monitor utility, you will see in the chart green and blue memory. All of this is available to any application. The blue section is memory that was recently used by an app that it may want again if it's avai

Re: Shell commands to find available memory

2012-08-14 Thread Richard Gaskin
Andre Garzia wrote: Maybe one of the keys output from: sysctl -a | grep mem will help you. While I was initially impressed with the speed, I'm not sure the free mem is among the output - here's an example: hw.physmem = 2147483648 hw.usermem = 1420754944 hw.memsize = 2147483648 vm.memory_pr

Re: Shell commands to find available memory

2012-08-14 Thread Bob Sneidar
I get 26. HAH! My CPU is faster than yours! Bob On Aug 14, 2012, at 11:30 AM, Andre Garzia wrote: > On Tue, Aug 14, 2012 at 3:26 PM, Richard Gaskin > wrote: >> Bob Sneidar wrote: >>> On Aug 14, 2012, at 10:55 AM, Richard Gaskin wrote: >>> I could use "top -l1 -n0" to get just the overvie

Re: Shell commands to find available memory

2012-08-14 Thread Bob Sneidar
Well i'll be dayamed! That works almost instantaneously in the message box! Nice one Andre! Bob On Aug 14, 2012, at 11:28 AM, Andre Garzia wrote: > Richard, > > Maybe one of the keys output from: > > sysctl -a | grep mem > > will help you. ___ u

Re: Shell commands to find available memory

2012-08-14 Thread Bob Sneidar
About a second. Interesting then that the shell command contains some latency to it. It makes sense because it has to open a shell, then communicate with the shell, then close it. From an already opened terminal, it doesn't have those restrictions. Bob On Aug 14, 2012, at 11:26 AM, Richard G

Re: Shell commands to find available memory

2012-08-14 Thread Richard Gaskin
Andre Garzia wrote: Richard, Maybe one of the keys output from: sysctl -a | grep mem will help you. Nice - 38ms for that here. I was impressed with your other post noting 36ms for the "top" call, thinking maybe there's something odd about my system making it take longer. But this "syscnt

Re: Shell commands to find available memory

2012-08-14 Thread Andre Garzia
On Tue, Aug 14, 2012 at 3:26 PM, Richard Gaskin wrote: > Bob Sneidar wrote: >> On Aug 14, 2012, at 10:55 AM, Richard Gaskin wrote: >> >>> 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, ta

Re: Shell commands to find available memory

2012-08-14 Thread Andre Garzia
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 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 > e

Re: Shell commands to find available memory

2012-08-14 Thread Richard Gaskin
Bob Sneidar wrote: > On Aug 14, 2012, at 10:55 AM, Richard Gaskin wrote: > >> 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. > > W

Re: Shell commands to find available memory

2012-08-14 Thread Bob Sneidar
When I execute this directly from the shell the result is almost instantaneous. Bob On Aug 14, 2012, at 10:55 AM, Richard Gaskin wrote: > 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, > taki