[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] Was: /proc, will be: /sys
- To: mint@fishpool.com (MiNT mailing list)
- Subject: [MiNT] Was: /proc, will be: /sys
- From: Guido Flohr <gufl0000@stud.uni-sb.de>
- Date: Thu, 11 Nov 1999 23:43:52 +0100
- In-reply-to: <Pine.MNT.4.10.9911111816320.457-100000@rakastaja>; from Martin-Eric Racine on Thu, Nov 11, 1999 at 06:23:29PM +0200
- Mail-followup-to: mint@fishpool.com (MiNT mailing list)
- References: <Pine.MNT.4.10.9911111816320.457-100000@rakastaja>
- Sender: owner-mint@fishpool.com
On Thu, Nov 11, 1999 at 06:23:29PM +0200, Martin-Eric Racine wrote:
> A question for the real gurus:
>
> Why does /proc shows process names as truncated filenames?
>
> For example, both rpc.mountd and rpc.nfsd show up as rpc.<PID>
> instead of rpc.mountd.<PID> and rpc.nfsd.<PID> and same thing for
> in.telnetd which shows up as in.<PID> instead of in.telnetd.<PID>
> as I would have expected.
>
> This also affects how 'ps' displays the process names, btw.
All true, all unsatisfying. I thought about extending the /proc filesystem
but gave up the idea after I have realized how many programs rely on the
current restrictions.
I have therefore started (in fact I'm relatively far with that) a new
pseudo-filesystem called "/sys" which has many features from the "/proc"
filesystem used on Linux. Inside "/sys" there is a subdirectory (named
after the process id) for each process in the system. This subdirectory
contains all the information you want in form of human-readable files, for
example
bash-2.03$ cat /sys/123/cmdline | tr '\0' ' '
find / -name *.tmp -print
bash-2.03$ cat /sys/123/environ | tr '\0' '\n'
USER=guido
PWD=/home/guido
TERM=tw52
...
There are many more files than "cmdline" and "environ", you will be able
to retrieve every information the kernel itself has about the process.
If you are lucky (and if I find some more time) one of the next MiNT
versions will feature this pseudo-filesystem.
Ciao
Guido
--
http://stud.uni-sb.de/~gufl0000/
mailto:gufl0000@stud.uni-sb.de
- References:
- [MiNT] /proc
- From: Martin-Eric Racine <q-funk@pp.fishpool.fi>