🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.internals
2 messages
2 total messages Started by Durrant;f110or89;[05306 Fri, 13 Nov 1992 11:42
PS info from C?
#1463
Author: Durrant;f110or89;[05306
Date: Fri, 13 Nov 1992 11:42
17 lines
875 bytes
I using sunos 4.1.2.3 and I'm after getting access to
the process information for a running process. By info
I mean processor time used, command running, mem in use, etc.
The sort of thing that ps returns. I think it should be 
possible through ptrace but this only terminates the process
I attach to.

On Unix SVR4 I could do this by doing an ioctrl on a process file
in the proc virtual file system. But under sunos such nicetys are
absent.

Please mail me any sujestions.

Thanks

Jon Durrant (jmd6@uk.ac.bton.unix) JANET address
Re: PS info from C?
#2386
Author: Ed Carp
Date: Fri, 20 Nov 1992 00:13
26 lines
1603 bytes
Durrant;f110or89;[05306 (jmd6@unix.brighton.ac.uk) wrote:

: I using sunos 4.1.2.3 and I'm after getting access to
: the process information for a running process. By info
: I mean processor time used, command running, mem in use, etc.
: The sort of thing that ps returns. I think it should be 
: possible through ptrace but this only terminates the process
: I attach to.

There is a set of calls (kvm_*) that SunOS uses to do this; they're quite easy
to use.  You have to use "-lkvm" to link with, though.  If you want me to,
I'll be happy to email you some sample source...

Do a "man kvm_open" on SunOS - I think it'll tell you all you need to know.
--
Ed Carp			erc@apple.com, erc@saturn.upl.com	801/538-0177

"There is nothing to seek and nothing to find.  You're already enlightened, and
all the words in the world won't give you what you already have.  The wise
seeker, therefore, is concerned with one thing only: to become aware of what
he already is, of the True Self within."  -- Zen maxim
-- 
Ed Carp			erc@apple.com, erc@saturn.upl.com	801/538-0177

"There is nothing to seek and nothing to find.  You're already enlightened, and
all the words in the world won't give you what you already have.  The wise
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads