Re: /proc guidelines and sysctl

From: Albert D. Cahalan (acahalan@cs.uml.edu)
Date: Sat Jan 08 2000 - 00:31:02 EST


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.

> /proc/ksyms -- entierly redundant and not used by the modutils.

This is used for WCHAN.

> /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.

-
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/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:12 EST