Messages in this thread | | | Date | Sat, 08 Jan 2000 11:49:01 +0100 | From | Martin Dalecki <> | Subject | Re: /proc guidelines and sysctl |
| |
"Albert D. Cahalan" wrote: > > Marcin Dalecki writes: > > Linus Torvalds wrote: > > >> sysctl is deprecated. It's useful in one way only: it has some nice > >> functions that can be used to add a block of /proc names. However, it > >> has other downsides (allocating silly numbers etc - there should be no > >> need for that, considering that the /proc namespace is alreayd a > >> perfectly good namespace). > > > > Are you just blind to the neverending format/compatiblity/ > > parsing/performance problems the whole idea behing /proc induces inherently? > > I'd expect a pure kernel programmer to be blind to this. > The problems with assigning numbers may well seem worse. > > > My favorite examples for how broken they are > > > > /proc/stat -- the information there is entierly *broken* misleading and > > incomplete. (leftover from early days.) > > Have an alternative? I need this for "top" display and HZ calculation. > > > /proc/cpuinfo -- same here static data. uname is since the beginnging > > the proper interface for this stuff. > > This could be formatted once. The code to produce this could be > marked as init code.
Most of the stuff in cpuinfo should be just loggen on boot. The rest should be in uname.
> > /proc/ksyms -- entierly redundant and not used by the modutils. > > This is used for WCHAN.
You could better get this info through the same syscall interface which insmod is preferable using. (cut and paste coding required actually...)
> > /proc/kmsg -- entierly redundant to syslog. > > Sure, except that /proc/kmsg supplies the syslog via klogd. > > > root:/proc# cat meminfo > > total: used: free: shared: buffers: cached: > > Mem: 64577536 62787584 1789952 20643840 1339392 17186816 > > Swap: 139821056 36478976 103342080 > > MemTotal: 63064 kB > > MemFree: 1748 kB > > MemShared: 20160 kB > > Buffers: 1308 kB > > Cached: 16784 kB > > SwapTotal: 136544 kB > > SwapFree: 100920 kB > > > > Wonderfull!!!! The same data twice, albeit no one of them easly > > parsed! Easly parsed? By what? AWK? SED? or should the procps > > utilities beeing implemented in damn PERL? (Some loosers who > > don't know C would apreciate this, certainly) !!!!! > > Feel free to kill the old values at the top.
Naa I fear... becouse I remember the days when they where actually killed.
-- Marcin Dalecki
- 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/
| |