[TUHS] UNIX of choice these days?

Bakul Shah bakul at bitblocks.com
Sun Oct 1 07:56:29 AEST 2017

On Sep 30, 2017, at 1:29 PM, Kevin Bowling <kevin.bowling at kev009.com> wrote:

> I seem to recall proc is loosely deprecated in Linux anyway in favor
> of sysfs.  GregKH mentioned people misuse both, for instance making
> them output pretty histograms instead of simple text values, that
> defeat the fundamental design tenants of these interfaces -- which is
> to try and maintain a stable API.

> One thing I think Linux did pretty well is the whole object
> orientation in C thing with kobject, and that nets you automatic sysfs
> directories and nodes for pretty much everything.

The Linux /sys fs is truly bizarre. On a RaspberryPi running Linux 4.4.21+:

$ find /sys | wc		# total entries
$ find /sys -type l | wc	# count of symlinks
$ find /sys -type f | wc 	# count of "regular" files

I am not sure exposing most everything via a namespace in this
manner is such a good idea (or at least in "good taste" :-)
Interfaces should be lean.

Similarly the /proc fs is quite strange. Why does it have any
non process subdirectory?

$ echo /proc/[0-9]* | wc -w 	# count of processes
$ echo /proc/[^0-9]* | wc -w 	# count of non-process directories


Linux (raspberryPi + X windows):
$ echo /proc/[0-9]* |wc -w	# how many processes
$ find /proc/[0-9]* | wc -l	# how many proc related files+dirs

FreeBSD (10.3 amd64+zfs+4 lightweight jails):
$ echo /proc/[0-9]* | wc -w	# how many processes
$ find /proc/[0-9]* | wc -l	# how many proc related files+dirs

Plan9 (mostly quiescent):
$ echo /proc/[0-9]* | wc -w
$ du -a /proc/[0-9]* | wc -l

Anyone feeling sad about /proc in FreeBSD should consider
the alternative!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20170930/93f5f777/attachment.html>

More information about the TUHS mailing list