[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reflection and /proc
Davide Bolcioni writes:
> - content would vary from /proc/$$/stat, parsable with scanf(), to
> /proc/$$/status, which has some human-readable English spread over
> multiple lines;
...
> The bad solution is nationalized /proc, I gather, so I guess /proc is
> intended for scripts and possibly for C programs: /proc/$$/stat is
> "right" (scanf one-liner), while /proc/$$/status less so (multi-line
> with English). Is this what you mean ?
I am one of the procps hackers. I recently rewrote large parts
of the collection, including all of "ps" and "skill".
The /proc/$$/stat file format is OK. (binary is better)
The worst problem I have seen was signal info in hex.
I think hex is great, but one can't just switch to it.
The /proc/$$/status file format is bad. Besides being slow,
it is unreliable. People are tempted to change the spelling!
I had to send in a patch to revert some 2.1.xx changes.
My ideal format would be an array of 64-bit values.
Data that takes a long time to collect should be separate.
Data should also be grouped by security requirements.
The latest procps code:
http://www.cs.uml.edu/~acahalan/linux/procps-990224.tar.gz
-
Linux-future: thinking about the future of the Linux kernel
Archive: http://humbolt.nl.linux.org/lists/
Wish list: http://users.ox.ac.uk/~mert0236/linux-future.html