[KLUG Programming] Pthreads problem
Robert G. Brown
programming@kalamazoolinux.org
Sun, 04 Jan 2004 13:39:03 -0500
On Sun, 04 Jan 2004 13:10:18 -0500, Adam Williams wrote:
>...Every single thing I can set-and-forget is precious.
Exactly the mindset that exists when one is adminnning a lot of boxen.
>>>Now, for the record, let's review the difference between sysctl and
>>>`echo >/proc/something `:
>>>1. sysctl will work whether /proc is mounted or not.
>>>2. (This space left intentionally blank.)
>>I'll fill this one in for you.
>>I don't have bad things to say about /proc,....
>I don't have anything against /proc either; it works, and probably the
>best abstraction of low level gunk I've seen.
Yeah, unless you want to talk about programming languages.
>My only gripe would be thats its a filesystem - i'd prefer something more
>directory-ish and network aware.
Yah, that's 'cuz you're a directory/network kinda guy. The first reflex of
anyone with real UNIX instrincts is to make everything a stream, and they
did! I guess they pass! :)
>>So the second reason is that sysctl, like setkernel, normalizes syntax, and as
>>a result makes stuff easier to maintain. I can replace it easily. I can also
>>use it to protect the system from someone placing dumb values into some
>>pretty sensitive places, by making setkernel a bit less trivial.
>Exactly. Replacability is good. You could even give attributes more
>meaningful names than fs.file-max or (many worse potential examples).
>But that would really be something a distrobution maintainer should look
>into.
Actually, I thought about it at several points, since a gaggle of folk were
writing scripts that had to work across about 4 UNIX variants. The eventual
outcome was that it just wans't worth our time to write our own completely
working abstraction layer to set a bunch of different parms on Linux, HPUX,
Solaris, and AIX, but we came up with something a lot more portable than
what is offered by any of the above, more easily documented and changed,
and (in the setkernel case) a bit more robust than I showed in my previous
posting.
One some platforms, the setkernel script is empty, since other scripts do the
work there. We ut in a comment to that effect, so future script readers are
not puzzled by this seemingly useless script.
Regards,
---> RGB <---