From owner-freebsd-questions@freebsd.org Sun Jan 19 04:27:44 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5704D22D3B8 for ; Sun, 19 Jan 2020 04:27:44 +0000 (UTC) (envelope-from ihor@antonovs.family) Received: from mail.antonovs.family (mail.antonovs.family [100.25.240.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 480hbz17p8z3L8W for ; Sun, 19 Jan 2020 04:27:42 +0000 (UTC) (envelope-from ihor@antonovs.family) Received: from localhost (localhost [127.0.0.1]) by mail.antonovs.family (Postfix) with ESMTP id 3CA68138A36 for ; Sun, 19 Jan 2020 04:27:35 +0000 (UTC) Received: from mail.antonovs.family ([127.0.0.1]) by localhost (mail.antonovs.family [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id b0Z048YcPCFN for ; Sun, 19 Jan 2020 04:27:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.antonovs.family (Postfix) with ESMTP id 5636B138A45 for ; Sun, 19 Jan 2020 04:27:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.antonovs.family 5636B138A45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antonovs.family; s=D65AA412-CB7F-11E9-A561-802C9D403B77; t=1579408054; bh=iwSD8J5m8lqMGXZbtfqjWtwB8cAGoQ1njYBU9hmvCOc=; h=From:To:Date:Message-ID:MIME-Version; b=IG743pAu5YHw4N/Ry07xIzgY+2bpM12fkRbQ1GYQdL5LRAaDvjvt80OP++QhY+wS3 5M0stAiOHA7DKkTEvtyCtY3Aaxk+qdL1Pmz7RPEdtuYT4pZsSktk2O/Q5L4fRkzjKS kbpD42+V0oidh/tIdUI7oyUkLGE1JfevEEe3LanYZo9m5kudJ7wXnKG8N5p60Lc3mZ V1J9YULWyr6nVj7lsm0jkQ7uWy8m7YJ3SJhzPXwtXef92VXQi3U0Gq+svOWXWV4M5o KN3KBPJ70EWUbcDqhL/8UsKeFPUvIVZX+Ca9YKFQK5gZSbEE3yoFad47CScnBQk3r5 5xGngRTD6zykQ== X-Virus-Scanned: amavisd-new at antonovs.family Received: from mail.antonovs.family ([127.0.0.1]) by localhost (mail.antonovs.family [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Z7pi_Jeot06Q for ; Sun, 19 Jan 2020 04:27:34 +0000 (UTC) Received: from t800.localnet (c-73-83-210-79.hsd1.wa.comcast.net [73.83.210.79]) by mail.antonovs.family (Postfix) with ESMTPSA id 0950D138A36 for ; Sun, 19 Jan 2020 04:27:33 +0000 (UTC) From: Ihor Antonov To: freebsd-questions@freebsd.org Subject: sysctl and /sysfs Date: Sat, 18 Jan 2020 20:27:27 -0800 Message-ID: <4538784.31r3eYUQgx@t800> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4213813.LvFx2qVVIh"; micalg="pgp-sha256"; protocol="application/pgp-signature" X-Rspamd-Queue-Id: 480hbz17p8z3L8W X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=antonovs.family header.s=D65AA412-CB7F-11E9-A561-802C9D403B77 header.b=IG743pAu; dmarc=pass (policy=none) header.from=antonovs.family; spf=pass (mx1.freebsd.org: domain of ihor@antonovs.family designates 100.25.240.195 as permitted sender) smtp.mailfrom=ihor@antonovs.family X-Spamd-Result: default: False [-5.65 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[antonovs.family:s=D65AA412-CB7F-11E9-A561-802C9D403B77]; RCVD_COUNT_FIVE(0.00)[6]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.05)[ipnet: 100.24.0.0/13(-2.14), asn: 14618(-3.04), country: US(-0.05)]; DKIM_TRACE(0.00)[antonovs.family:+]; DMARC_POLICY_ALLOW(-0.50)[antonovs.family,none]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MID_RHS_NOT_FQDN(0.50)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:14618, ipnet:100.24.0.0/13, country:US]; RCVD_TLS_LAST(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[79.210.83.73.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.10] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jan 2020 04:27:44 -0000 --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--