Re: Determining if a user's comp has 2 processors
Re: Determining if a user's comp has 2 processors
- Subject: Re: Determining if a user's comp has 2 processors
- From: "John C. Randolph" <email@hidden>
- Date: Sat, 8 Mar 2003 14:37:22 -0800
On Saturday, March 8, 2003, at 01:09 AM, Simone Manganelli wrote:
What's the best way to quickly figure out if the user's computer has 2
processors or not? Any suggestions would be great.
Well, at the cost of an NSTask:
jcr@kaboom:~>hostinfo
Mach kernel version:
Darwin Kernel Version 6.4:
Wed Jan 29 18:50:42 PST 2003; root:xnu/xnu-344.26.obj~1/RELEASE_PPC
Kernel configured for up to 2 processors.
2 processors are physically available.
Processor type: ppc7450 (PowerPC 7450)
Processors active: 0 1
Primary memory available: 2048.00 megabytes.
Default processor set: 51 tasks, 138 threads, 2 processors
Load average: 0.00, Mach factor: 1.98
IIRC, the code for /usr/bin/hostinfo is available in the Darwin CVS
repository.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.