Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jan 2020 20:27:27 -0800
From:      Ihor Antonov <ihor@antonovs.family>
To:        freebsd-questions@freebsd.org
Subject:   sysctl and /sysfs
Message-ID:  <4538784.31r3eYUQgx@t800>

Next in thread | Raw E-Mail | Index | Archive | Help
--nextPart4213813.LvFx2qVVIh
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

Hi everyone,

I am coming to FreeBSD from Linux and I have questions about system structure.

I noticed that FreeBSD makes heavy use of `sysctl` to read and write kernel 
parameters. Linux has /proc and /sys filesystems that represent various kernel 
data structures, some of which could be writable.

In the spirit of Unix philosophy "everything is a file" I was wondering if 
FreeBSD provides a view into kernel's parameters similar to sysfs on linux?
It feels a bit strange that instead of naturally exposing hierarchical kernel 
data structures in a form of filesystem one has to use sysctl and text values 
in a "parend.child.subchild" pattern. So the question is why?

It is possible that I am missing something or maybe FreeBSD has a different 
view on this problem - I would love to understand! 

Thanks
-- 
Ihor Antonov
https://useplaintext.email
--nextPart4213813.LvFx2qVVIh
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part.
Content-Transfer-Encoding: 7Bit

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEERRGvVtv7zdxEBhtZWJxtLLeFgVIFAl4j2q8ACgkQWJxtLLeF
gVLu5hAAvcxt4AuBcdJgfsp3UNkJMbcgkLIF8IS+1SyJgcCoG3D3XHstwEpbiGCR
BRLT9cFMKpTDcozdwNWachXAPl3nyc+i+BAzyEFhVeDycL2e3zTIK67uB5VqBK6+
Mk2plsZbXA1Pn1Vl4waWgCqIjxlh7gKaKVY21E7NpuTdQW5crCAhyyfAztGSHNMF
P0V9xEes65BVlfvj62BBe3luRqMs/VdZNrWiLYg9nunx2/o3cMN6D3+qR2Oo4dyA
aJbSHOAaK05tr2xNID3j5lHnUzivo/cisvWQEVdfo4n/FAOQ6+lD5udTRjzujhmM
HpOAcHvO+mtvGSPHFlkI+BlQemEGlsv32udaJz0xqloFzNzzidBx6SaXsSpppHoT
2r5jC9rsEZwPVOEOGQxUoaRJAAW3wxTNI5CQ1gOVgkIi+59o0QnYaacsxXxOyhYI
XQLIMTFBZtKyJ8OIb8OcSX+k7gTTBjR/CpFa31cSPLSIMDWNqcYqvHvfykhzbgeW
hFWFfJH9YSqApjykxbDdNQwjfA9vcbCpmaxHgxSYcORJHMq4vFxcoi1Jmi4Zp0Cl
9WIw68+7H1zvd530BMe7uRzDAavbaXT8fbCH0fG+WeRWcZ89lRgG9/K0H8vbVAw5
J5PGP7O5Kx/fGaNVPiOVcLr+ff5WT1M+uNhetjxy3Nxb0b89a90=
=rqEy
-----END PGP SIGNATURE-----

--nextPart4213813.LvFx2qVVIh--






Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?4538784.31r3eYUQgx>