Getting Processor Information From Mac OS X on Rev

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Getting Processor Information From Mac OS X on Rev

Post by SirWobbyTheFirst » Tue May 24, 2011 8:09 pm

Hi guys, I have been wanting to find out how to retrieve certain information such as the number of processors and the architecture of the processor such as 32 or 64-bit in Mac OS X, I have found out how to do so using Windows and Linux using the /proc file system and %PROCESSOR_ARCHITEW6432% and %Number_Of_Processors% variables however the great Mac OS X is still alluding me and for once Bing and Google are looking kinda clueless right now. I know I'll need to use the Terminal as I'm pretty sure there will be commands involved somewhere that do so. If anyone can shed any light on the situation, I would very much appreciate it.

As always thanks, Michael. :D

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Contact:

Re: Getting Processor Information From Mac OS X on Rev

Post by dglass » Tue May 24, 2011 10:08 pm

system_profiler will probably get you what you want.

There's a bunch of stuff in there though, so you'll probably also need to grep it for the specifics.

This might help: http://hintsforums.macworld.com/showthread.php?t=43422

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Re: Getting Processor Information From Mac OS X on Rev

Post by SirWobbyTheFirst » Tue May 24, 2011 10:33 pm

Ah thank you dglass, I appreciate it alot, on the post the fella states about exporting the information produced by system_profiler as an XML file, I would find this very useful because as far as I'm concerned now, XML is the bees-freakin-knees. I LOVE IT!!!

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Contact:

Re: Getting Processor Information From Mac OS X on Rev

Post by dglass » Tue May 24, 2011 10:37 pm

I assume you are on a Mac so you can 'man system_profiler' to get the specific syntax you need.

If not, there also this: http://www.manpagez.com/man/8/system_profiler/

SirWobbyTheFirst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 246
Joined: Tue Jun 30, 2009 11:15 pm

Re: Getting Processor Information From Mac OS X on Rev

Post by SirWobbyTheFirst » Wed May 25, 2011 12:36 am

At the moment, my Mac is currently indisposed as I am away from home however I get back on Friday and thus will be giving it a go once I get settled back in. Thank you for the link to the man pages as well.

Post Reply