• 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: Non-priv way to collect job stats under Intel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-priv way to collect job stats under Intel?


  • Subject: Re: Non-priv way to collect job stats under Intel?
  • From: almisr <email@hidden>
  • Date: Wed, 2 Aug 2006 11:38:47 +0200

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 (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re:Non-priv way to collect job stats under Intel? (From: Jeffrey Johnson <email@hidden>)

  • Prev by Date: How to create pass-through (stub) dylib without using flat namespaces?
  • Next by Date: Re:Non-priv way to collect job stats under Intel?
  • Previous by thread: Re: Non-priv way to collect job stats under Intel?
  • Next by thread: Re:Non-priv way to collect job stats under Intel?
  • Index(es):
    • Date
    • Thread