On Tue, Nov 21, 2000 at 03:37:48PM +0000, Peter Pilgrim wrote:
>
> Ok you've convinced me to look at `info proc' or `man proc' latter tonight.
> [OT]: How on earth do they this on Solaris?
There's no standard solution - not surprising, given this data's tight
coupling with the kernel. Various Unix vendors have introduced their
own system calls or relied on rooting through /dev/kmem (with an
understanding of kernel data structures and symbol addresses) to gather
this information. The /proc filesystem is one of the cleanest
solutions around.
Unfortunately, it's not standard either. I've seen it on another Unix
(Solaris, I think), but it offered much less than Linux's /proc.
There's also a move afoot to create XML-formatted versions of the
various /proc files, which will make parsing of the information much
less fragile.
Nathan
>
> --
> Peter Pilgrim
> G.O.A.T
> "The Greatest of All Time"
>
>
>
> ---------------------------------------- Message History
>----------------------------------------
>
>
> From: [EMAIL PROTECTED]@javalinux.net on 21/11/2000 07:06 PST
>
> To: Peter Pilgrim/DMGIT/DMG UK/DeuBa@DMG UK
> cc: [EMAIL PROTECTED]
> Subject: Re: How do you get to process list ?(ps auwwx in Java)
>
>
> Peter Pilgrim wrote:
>
> > Hi
> >
> > I am considering writing a JNI to the process list.
> > How do you do this in Linux/Unix?
>
> Most such things are done on Linux using information available from the /proc
>filesystem - you should be able to write a very thorough ps, just by reading from
>that filesystem without having to go anywhere near JNI code. The "proc" man page has
>a good intro, and you may want to grab the source for ps (available at a
> Linux distro near you) to see how they do it.
>
> Nathan
>
> >
> >
> > --
> > Peter Pilgrim
> > G.O.A.T
> > "The Greatest of All Time"
> >
> > --
> >
> > This e-mail may contain confidential and/or privileged information. If you are not
>the intended recipient (or have received this e-mail in error) please notify the
>sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or
>distribution of the material in this e-mail is strictly forbidden.
> >
> > ----------------------------------------------------------------------
> > To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
>
>
>
>
>
> --
>
> This e-mail may contain confidential and/or privileged information. If you are not
>the intended recipient (or have received this e-mail in error) please notify the
>sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or
>distribution of the material in this e-mail is strictly forbidden.
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]