• 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
Re: Determining if a user's comp has 2 processors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Determining if a user's comp has 2 processors (From: Simone Manganelli <email@hidden>)

  • Prev by Date: Getting bits from NSQuickDrawView
  • Next by Date: Re: Getting bits from NSQuickDrawView
  • Previous by thread: Re: Determining if a user's comp has 2 processors
  • Next by thread: [NSOpenPanel setTreatsFilePackagesAsDirectories] and a doc-based application
  • Index(es):
    • Date
    • Thread