From owner-freebsd-questions@freebsd.org Sun Jan 19 08:41:54 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 612C41F1655 for ; Sun, 19 Jan 2020 08:41:54 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 480pFD6lHYz41ZZ for ; Sun, 19 Jan 2020 08:41:52 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.222.10.201]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPA (Nemesis) id 1N9dkD-1jetIB2eMH-015e15; Sun, 19 Jan 2020 09:41:42 +0100 Date: Sun, 19 Jan 2020 09:41:42 +0100 From: Polytropon To: Ihor Antonov Cc: freebsd-questions@freebsd.org Subject: Re: sysctl and /sysfs Message-Id: <20200119094142.0bc64292.freebsd@edvax.de> In-Reply-To: <3038969.aeNJFYEL58@t800> References: <4538784.31r3eYUQgx@t800> <20200119064151.7f781748.freebsd@edvax.de> <3038969.aeNJFYEL58@t800> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:mxxf6mxdmNZ7f6LYyBkx+KVkHKUtsrBGjVx2Uh+EopqNH0aC2xt wMF9X79boQKEa9Rtg86mlH6kcDR6DMTeFhXfENnqQbBnUzTudOfPyxKLdGX+9gkXCAvKLQ8 yiVC3MLn5yJnVNCMoxD0Pv1Cq/oiNPTqb/BC4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ication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.133) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.84 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RECEIVED_SPAMHAUS_PBL(0.00)[201.10.222.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.98)[0.979,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[133.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[133.126.227.212.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.46)[ip: (1.24), ipnet: 212.227.0.0/16(-1.16), asn: 8560(2.26), country: DE(-0.02)] 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 08:41:54 -0000 On Sat, 18 Jan 2020 23:49:31 -0800, Ihor Antonov wrote: > On Saturday, January 18, 2020 9:41:51 PM PST Polytropon wrote: > > > In context of Linux... > > > > https://www.youtube.com/watch?v=9-IWMbJXoLM#t=8m20s > > > > Sorry, couldn't resist. ;-) > > Thanks, I really enjoyed this talk. I agree that "everything is > a file" is not > applicable everywhere. Exactly. There just is no "one size fits all" approach to things that are fundamentally different, both in what they do (and why) and when they were invented. > > The core "problem" (which actually isn't a problem at all) > > is that exposing _everything_ as a file or a hierarchical > > filesystem doesn't seem to work for each and every case. > > That's why different approaches have been taken that worked > > out in a better way. With sysctl, direct access to kernel > > system information has been unified. There is still some > > kind of hierarchy preserved. > > > > See "man 3 sysctl" and "man 1 sysctl" for details. > > > > > Sidenote: > > > > Watching "What UNIX Cost Us" by Benno Rice at "linux.conf.au" > > (LCA) 2020 does actually help understanding _why_ the use of > > the "everything is a file" metaphor doesn't always work. > After watching this talk I also watched another talk of his: > > Tragedy of Systemd: https://www.youtube.com/watch?v=o_AIw9bGogo > > And I must say, Benno has a point. FreeBSD definitely lacks something like > systemd (and I want to stress "like", not "exactly" ) Do you know of any > ongoing efforts to bring a unified system management functionality to > FreeBSD? I'm not sure. The rc.d mechanism present in FreeBSD to manage system services, their order and dependencies, is somewhat tied into devd, a mechanism that allows you to "dynamically react to system events". However, it more or less lacks the "dynamic" aspect. For static start / stop / restart actions, it works quite nicely, and it does _not_, as opposed to Systemd, try to incorporate all the things into some "thingd" with a separate configuration directory "/etc/thing.d/". Note that it hasn't been the case all the time: in the past, specific rc. scripts handled things, but they had to do lots on their own. With rc.d, things like prequisites, start order, provided functionalities and user-specific keywords can be managed more easily, and it is the same concept both for the OS in /etc/rc.d/, and for 3rd party programs that supply such scripts in /usr/local/etc/rc.d/; furthermore, user-specific directories can be added, let's say /opt/rc.d/, for something managed entirely independently. In Linux land, there are several startup management systems, with systemd probably being the most prominent one. My assumption is: Before FreeBSD attempts to implement something comparable, maybe Linux should be standardized... but yeah, I know, that's not going to happen... ;-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...