site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 1. system_cmds src ? 2. sysctl could give what u want man 3 sysctl ------------------------------------- int mib[2], freq; u_int miblen = 2; size_t len; float speed; char *u; mib[0] = CTL_HW ; mib[1] = HW_CPU_FREQ ; len = sizeof(freq); if (sysctl(mib, miblen, &freq, &len, NULL, 0) == -1) { //err } ------------------------------------- int i, mib[4]; size_t len; struct kinfo_proc kp; /* Fill out the first three components of the mib */ len = 4; sysctlnametomib("kern.proc.pid", mib, &len); /* Fetch and print entries for pid's < 100 */ for (i = 0; i < 100; i++) { mib[3] = i; len = sizeof(kp); if (sysctl(mib, 4, &kp, &len, NULL, 0) == -1) perror("sysctl"); else if (len > 0) printkproc(&kp); } Best Regards _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com