Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re:system info / system stats library?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:system info / system stats library?




On Oct 25, 2007, at 2:08 PM, email@hidden wrote:
Date: Wed, 24 Oct 2007 15:15:20 -0500
From: Ole Weidner <email@hidden>
Subject: system info / system stats library?
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hi,

is there any C/Obj-C library available that provides convenient
access to system stats (like the ones System Profiler provides)? I'm
especially interested in getting the # of CPUs/cores CPU type and
some memory statistics.

You want sysctl(3). For example:

	int	numCPUs;
	size_t	len = sizeof(int);
	sysctlbyname("hw.activecpu", &numCPUs, &len, 0, 0);

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Unix-porting mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.