• 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: Peter Bierman <email@hidden>
  • Date: Tue, 1 Aug 2006 13:24:24 -0700

>Assuming that you're willing to accept the stipulation that you can
>only look at your own processes, what sorts of information about said
processes would you expect/want such an API to provide? To put it another way, if you could have your idea "process inspection API", what would might it look like?

Ideally, given a pid, I'd like an API returning the following ps values in a struct:


%cpu %mem command lim lstart nice ppid pri sl state time uid xstat

To solve my immediate problem, I'd settle for

lstart state time xstat


Does sysctl on kern.proc work for this? (See the example in the sysctl 3 man page.)

I grabbed some source described here:
http://ezine.daemonnews.org/200205/sysctl-netbsd.html

I had to change some "struct proc" declarations to "struct extern_proc", but then it compiles. Running it against my local user didn't correctly sum up my CPU usage, but it did correctly count my processes.

-pmb
_______________________________________________
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


  • Follow-Ups:
    • Re:Non-priv way to collect job stats under Intel?
      • From: Jeffrey Johnson <email@hidden>
References: 
 >Re:Non-priv way to collect job stats under Intel? (From: Jeffrey Johnson <email@hidden>)

  • Prev by Date: Re:Non-priv way to collect job stats under Intel?
  • Next by Date: How to create pass-through (stub) dylib without using flat namespaces?
  • 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