From mboxrd@z Thu Jan 1 00:00:00 1970 From: lm@mcvoy.com (Larry McVoy) Date: Mon, 4 Aug 2014 16:11:08 -0700 Subject: [TUHS] /proc - linux vs solaris In-Reply-To: <20140804222325.GK19745@mcvoy.com> References: <1407183693.25672.for-standards-violators@oclsc.org> <20140804222325.GK19745@mcvoy.com> Message-ID: <20140804231108.GM19745@mcvoy.com> Seem like even Roger liked it: https://lwn.net/lwn/1998/0226/sunproc.html On Mon, Aug 04, 2014 at 03:23:25PM -0700, Larry McVoy wrote: > On Mon, Aug 04, 2014 at 05:24:39PM -0500, A. P. Garcia wrote: > > We in Solaris designed /proc as a tool for developers to build innovative > > solutions, not an end-user interface. The Linux community believes that > > 'cat /proc/self/maps' is the best user interface, while we believe that > > pmap(1) is right answer. The reason for this is that mdb(1), truss(1), > > dtrace(1M) and a host of other tools all make use of this same information. > > It would be a waste of time to take binary information in the kernel, > > convert it to text, and then have the userland components all write their > > own (error prone) parsing routines to convert this information back into a > > custom binary form. Plus, we can change the options and output format of > > pmap without breaking other applications that depend on the contents of > > /proc. > > I come from SunOS background and have had more than a few /proc discussions > with Roger Faulkner (who I believed did the System V /proc at Bell Labs?). > > I get the arguments above but I don't buy 'em. linux really got /proc > right in terms of usefulness. Digging binary blobs out of the kernel > and translating them sucks. I've done, I've written kmem drivers for > ps, I understand how it works. I far prefer the pure ascii model that > Linux has. > > I also get that Linux turned /proc into /whatever/I/think/I/need/today > and that makes purists grit their teeth. None the less, if you give > me a choice I'll take the linux way. Want to see what files you have > open? > > ls -l /proc/$$/fd > > Etc. Really easy to poke around and figure stuff out as needed and no > rats nest of header files to decode the structures. > > --lm > _______________________________________________ > TUHS mailing list > TUHS at minnie.tuhs.org > https://minnie.tuhs.org/mailman/listinfo/tuhs -- --- Larry McVoy lm at mcvoy.com http://www.mcvoy.com/lm