How to get kind of running process

8 views
Skip to first unread message

Gerriet M. Denkmann

unread,
Apr 3, 2012, 6:55:50 AM4/3/12
to darwin-kernel@lists.apple.com Kernel
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.

What to use?


Kind regards,

Gerriet.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (Darwin...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/darwin-kernel/darwin-kernel-garchive-95844%40googlegroups.com

This email sent to darwin-kernel-...@googlegroups.com

Shantonu Sen

unread,
Apr 3, 2012, 11:06:47 AM4/3/12
to Gerriet M. Denkmann, darwin-kernel@lists.apple.com Kernel
you should look at the source code to top

<http://www.opensource.apple.com/source/top/top-73/libtop.c>

Shantonu

On Apr 3, 2012, at 3:55 AM, "Gerriet M. Denkmann" <ger...@mdenkmann.de> 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.
>
> What to use?
>
>
> Kind regards,
>
> Gerriet.
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-kernel mailing list (Darwin...@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:

> https://lists.apple.com/mailman/options/darwin-kernel/ssen%40apple.com
>
> This email sent to ss...@apple.com

Reply all
Reply to author
Forward
0 new messages