• 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: How to get kind of running process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get kind of running process


  • Subject: Re: How to get kind of running process
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Wed, 04 Apr 2012 09:59:24 +0700

On 3 Apr 2012, at 22:06, Shantonu Sen wrote:

> you should look at the source code to top
>
> <http://www.opensource.apple.com/source/top/top-73/libtop.c>

Thank you very much. This was a very valuable link.

The answer to my problem is the (as far as I can see) undocumented string: "sysctl.proc_cputype"
which induces sysctl() to return the cpu-type (CPU_TYPE_X86 or CPU_TYPE_X86_64) of a supplied pid.



> On Apr 3, 2012, at 3:55 AM, "Gerriet M. Denkmann" <email@hidden> wrote:
>
>> Given a normal app (NOT a kext) (which might run as root if necessary) and the pid of another process, how to I get the information Activity Monitor displays under "Kind", i.e. Intel, Intel 64, PowerPC etc. ?
>>
>> I looked at sysctl ( CTL_KERN, KERN_PROC, KERN_PROC_PID, pid ) but did not see anything useful.
>>
>> There is proc_is64bit(), but it seems this is not for normal apps.


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

This email sent to email@hidden

References: 
 >How to get kind of running process (From: "Gerriet M. Denkmann" <email@hidden>)
 >Re: How to get kind of running process (From: Shantonu Sen <email@hidden>)

  • Prev by Date: Re: How to get kind of running process
  • Next by Date: How to get the slide of another process
  • Previous by thread: Re: How to get kind of running process
  • Next by thread: How to get the slide of another process
  • Index(es):
    • Date
    • Thread