• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Finding Installed Memory Total
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Finding Installed Memory Total
      • From: "Johnny AppleScript" <email@hidden>
References: 
 >Re: Recording in Finder (From: Doug McNutt <email@hidden>)

  • Prev by Date: Re: Recording in Finder
  • Next by Date: Re: Finding Installed Memory Total
  • Previous by thread: Re: Recording in Finder
  • Next by thread: Re: Finding Installed Memory Total
  • Index(es):
    • Date
    • Thread