Subject: Re: Linux "/proc/net/*" support in NetBSD?
To: None <port-i386@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: port-i386
Date: 12/10/2001 00:35:04
>>Please explain to me which (if any) of this state is actually per-process.
>>Otherwise, explain to me why we should grow the horrible warts on our
>>/proc filesystem that Linux has.
>
>Strong agreement!  One of the most deeply *WRONG* things in Linux is that
>/proc seems to be a mismatched conglomerate of /proc, /kern, and a few
>randomly selected portal filesystems.

well...certainly just about all the information that linux exports via
its proc file system can be groveled via libkvm (i just spent 20
minutes more or less recreating the /proc/net/snmp stuff), but a
better question would be how one is supposed to make the numbers
sensible (to what does "ReasmReqds" refer anyway?).  if you could get
that right, a portal file system could do just about all the work.

then there's the issue of the portal file system not really "doing"
directory listings at all...

>If you want information about the kernel's state, look in /kern.

well...there's not that much there, but then again, (almost) all the
stuff that's already there can be gotten at via sysctl.

/kern/boottime	-> kern.boottime
/kern/copyright	-> (use dmesg(8) instead)
/kern/hostname	-> kern.hostname
/kern/hz	-> kern.clockrate
/kern/loadavg	-> vm.loadavg
/kern/msgbuf	-> (use dmesg(8) instead)
/kern/pagesize	-> hw.pagesize
/kern/physmem	-> hw.physmem
/kern/rootdev	-> kern.root_device
/kern/time	-> (use date(1) instead, sans for microseconds)
/kern/version	-> kern.version

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."