Messages in this thread |  | | | Date | Tue, 27 Oct 1998 16:50:26 -0500 (EST) | | From | "Mike A. Harris" <> | | Subject | Re: ARMS WAVING!!! Proposal to fix /proc dainbrammage. |
| |
On Sat, 24 Oct 1998, Mark H. Wood wrote:
>[good point about punctuation snipped] >> Would it be reasonable to have some kind of format version number in each >> entry in /proc? Perhaps the first line could be an integer that gets >> bumped if the format of that entry is ever changed in a way that would >> not be compatible with non-braindead existing programs? Might as well allow >> for the possibility that the current reorganization of /proc (if it goes >> anywhere...) might not be the last and make it easier on programs that >> want to part things there. > >Oh, no! Here it comes again. Perhaps much more important than >endianness or punctuation is once and for all settling the question of >whether /proc is for humans or for programs. Because these two types of >entities have different, often diametrically-opposed, formatting >requirements. > >(My take on this question is that programs should not be looking in /proc >at all; everything shown there should be available in binary form via >syscall, and if you want to use the data in scripts there should be >userspace programs that use the syscalls and provide script-appropriate >formatting. This way, programs have no column-order or spelling issues to >deal with (on the input side, anyway), and other format changes should be >rare because in most cases the format will be tied to the CPU >architecture. Meanwhile humans get to read stuff that isn't cluttered >with format version numbers or obfuscated to make mechanical parsing easier.)
Why do programs parse /proc at all then?
procps for example?
Is all the info in /proc truly available with syscalls? Seriously, I'm asking out of pure curiousity as I'm not an expert in this area whatsoever. I'd like to get at the information in /proc/cpuinfo, and some other files in /proc, but if there is a direct way that doesn't use /proc, I'd sure like to know what it is and how to do it. Granted of course that I haven't bothered to try and look.... Can anyone point me to how to access the info such as processor stepping, cpu information, etc... without reading proc? Thanks in advance.
-- Mike A. Harris - Computer Consultant - Linux advocate
Linux software galore: http://freshmeat.net
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
|  |