Finding Installed Memory Total
Finding Installed Memory Total
- Subject: Finding Installed Memory Total
- From: "Johnny AppleScript" <email@hidden>
- Date: Wed, 16 Jul 2003 21:31:20 -0600
Hello All,
I'm away from home and am having no luck with the archives. Can anyone offer
a faster/better/more-reliable way to determine installed physical memory
under 10.2?
set getDIMMs to do shell script "system_profiler | grep DIMM*"
set dimms to every paragraph of getDIMMs
set totalMB to 0
repeat with i from 1 to number of items in dimms
set y to item i of dimms
try
set mb to word -3 of y as number
on error
set mb to 0
end try
set totalMB to totalMB + mb
end repeat
log totalMB
I tried doing something with top, but it returns errors (I assume because it
is a dynamic display in Terminal).
I tried to man system_profiler, but have no information on any switches
that might be used to limit output.
Any help appreciated.
JA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.