From nobody Thu Dec 28 18:24:43 2023 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4T1H4C1cgRz56JH9 for ; Thu, 28 Dec 2023 18:25:15 +0000 (UTC) (envelope-from dan@langille.org) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4T1H4B0rLdz4Hd0 for ; Thu, 28 Dec 2023 18:25:14 +0000 (UTC) (envelope-from dan@langille.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=langille.org header.s=fm2 header.b=SZFzcqUr; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=u3i4EJF6; spf=pass (mx1.freebsd.org: domain of dan@langille.org designates 64.147.123.21 as permitted sender) smtp.mailfrom=dan@langille.org; dmarc=pass (policy=none) header.from=langille.org Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailout.west.internal (Postfix) with ESMTP id 250E33200124 for ; Thu, 28 Dec 2023 13:25:11 -0500 (EST) Received: from imap42 ([10.202.2.92]) by compute7.internal (MEProxy); Thu, 28 Dec 2023 13:25:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=langille.org; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1703787910; x=1703874310; bh=JDOH32Ocw0 WupD63ZDDrk5QFZuaK92e1b1otENU6+Ok=; b=SZFzcqUrgEGpCnsfkuXcrhynjI oCnYZS2znm5crN0u4cpu0ih2L/G7DvHiJFNqpyjLce0wfDAP/U0CdTd+QIrp4oyw 24LnXKv9ZjOYquRs4ITMFY8fYlLc3mMgvWZdn9A7qQMHmHs3gP/a1re/Xa7dgX7j EUHSaJKnFhGhYkneZi0hyL/vxHclETR0YscP0r9eE8rffgypGvO5rEqcSi/6k6yk MEyQa69EimthqotKRfYvFsF7bJvUfUPfsB3P311aMghpn5lOQ5lugIGwTaWMc1Ra umrnrNJU2RWOYKJTELzXJsXjKwWGzyL1Hkgnq/t1U2Gq/LLuEa/rzEhTfUgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1703787910; x=1703874310; bh=JDOH32Ocw0WupD63ZDDrk5QFZuaK 92e1b1otENU6+Ok=; b=u3i4EJF6bAQbeR8Bls0oGdMZ2UqeEDDgY873e83pd3kC m4UpX7yq1Ad+xrgh+gMtkrZiWRl09ci3V4Vln0+EAn3h/4r+xLUvqC8nTm2R4LkX A1qc3/1AX2UECYAIqeFToDKHf+eU6BUe5yLjvCv/usFWwAtEscS4qXePBT33NuTi UWggDfQtUOFtw8I2s7DYECL6UHt2dsPGegj0vN3PFE1Q8axz/0RHA5C/GnZqy5Yc h0furyu1TL/t2B31+syfe7swjTkvcOkuahIHpLJyEgLHTQwr4hIDiDTJzr0Wwg/R 7C79yTHmVg7oHzmFyzE8wRpMKr4t8rwbnn8p5diHFw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdefuddguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesmh dtreerreertdenucfhrhhomhepfdffrghnucfnrghnghhilhhlvgdfuceouggrnheslhgr nhhgihhllhgvrdhorhhgqeenucggtffrrghtthgvrhhnpeejjeeuvdekgedufefgvdegle duheehfeetteejkeehieehheevfeevkeegueeikeenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpegurghnsehlrghnghhilhhlvgdrohhrgh X-ME-Proxy: Feedback-ID: ifbf9424e:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 61A18BC007D; Thu, 28 Dec 2023 13:25:10 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Message-Id: In-Reply-To: <95c256b2-ec07-4867-bfa2-32f39ba88504@app.fastmail.com> References: <95c256b2-ec07-4867-bfa2-32f39ba88504@app.fastmail.com> Date: Thu, 28 Dec 2023 13:24:43 -0500 From: "Dan Langille" To: freebsd-ports Subject: Re: net-mgmt/net-snmp needs JAIL : off to get Memory usage Content-Type: multipart/mixed; boundary=5994eefd2f8b4df4883d4ec9d70bd290 X-Spamd-Result: default: False [-4.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[langille.org,none]; RWL_MAILSPIKE_EXCELLENT(-0.40)[64.147.123.21:from]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.21]; R_DKIM_ALLOW(-0.20)[langille.org:s=fm2,messagingengine.com:s=fm2]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[64.147.123.21:from]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; FREEFALL_USER(0.00)[dan]; ARC_NA(0.00)[]; ASN(0.00)[asn:29838, ipnet:64.147.123.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; HAS_ATTACHMENT(0.00)[]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; DKIM_TRACE(0.00)[langille.org:+,messagingengine.com:+]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org] X-Rspamd-Queue-Id: 4T1H4B0rLdz4Hd0 X-Spamd-Bar: ---- --5994eefd2f8b4df4883d4ec9d70bd290 Content-Type: text/plain On Thu, Dec 28, 2023, at 11:28 AM, Dan Langille wrote: > Hello, > > I've just solved a long-puzzling issue with net-mgmt/net-snmp which was > not reporting Memory Usage on my hosts. > > Tests show it is related to the JAIL build-time configuration option. > > JAIL=off: Options for running snmpd within a jail(8) > > If off, the default, Memory Usage is available via snmpd. > > If on, it is not. > > One might ask: why have it on if not running in a jail? > > Simplicity: I build my own packages. I could have one repo specifically > for hosts (i.e. non-jails), but until now, it's never been an issue. > > However, I want to point that that JAIL=off does not seem to affect > usage within a jail. > > It becomes clear what JAIL does when looking at the Makefile: > > if ${PORT_OPTIONS:MJAIL} > NET_SNMP_WITHOUT_MIB_MODULE_LIST+= host > NET_SNMP_WITHOUT_MIB_MODULE_LIST+= ucd-snmp/memory > CONFIGURE_ARGS+= --without-kmem-usage > endif > > Not it's clear. Don't report host-like objects when within a jail. > > It is time for some flavors on this port? I know I'd like one for my > use: one without the above and with. > > I'll see if I can mangle something up which works. This works for me. -- Dan Langille dan@langille.org --5994eefd2f8b4df4883d4ec9d70bd290 Content-Disposition: attachment; filename="patch-net-snmp-jail-flavor" Content-Type: application/octet-stream; name="patch-net-snmp-jail-flavor" Content-Transfer-Encoding: BASE64 ZGlmZiAtLWdpdCBhL25ldC1tZ210L25ldC1zbm1wL01ha2VmaWxlIGIvbmV0LW1nbXQvbmV0 LXNubXAvTWFrZWZpbGUKaW5kZXggZTVmNjBmYWVmY2JkLi42ODZjMzkzOTkxZWEgMTAwNjQ0 Ci0tLSBhL25ldC1tZ210L25ldC1zbm1wL01ha2VmaWxlCisrKyBiL25ldC1tZ210L25ldC1z bm1wL01ha2VmaWxlCkBAIC0xOCw2ICsxOCwxNyBAQCBMSUNFTlNFX0ZJTEU9CSR7V1JLU1JD fS9DT1BZSU5HCiBOT1RfRk9SX0FSQ0hTPQkJbWlwcyBtaXBzNjQKIE5PVF9GT1JfQVJDSFNf UkVBU09OPQlTU1AgaXMgY3VycmVudGx5IGJyb2tlbiBvbiBNSVBTCiAKK0ZMQVZPUlM9CWRl ZmF1bHQgamFpbAorRkxBVk9SUz89CSR7RkxBVk9SUzpbMV19CisKKy5pZiAke0ZMQVZPUjpV fSA9PSBqYWlsCitORVRfU05NUF9XSVRIT1VUX01JQl9NT0RVTEVfTElTVCs9CWhvc3QKK05F VF9TTk1QX1dJVEhPVVRfTUlCX01PRFVMRV9MSVNUKz0JdWNkLXNubXAvbWVtb3J5CitDT05G SUdVUkVfQVJHUys9CQkJLS13aXRob3V0LWttZW0tdXNhZ2UKKy5lbmRpZgorCitqYWlsX1BL R05BTUVTVUZGSVg9CS1qYWlsCisKIE9QVElPTlNfREVGSU5FPQlJUFY2IE1GRF9SRVdSSVRF UyBQRVJMIFBFUkxfRU1CRURERUQgUFlUSE9OIERVTU1ZIFRLTUlCIFwKIAkJTVlTUUwgQVhf U09DS09OTFkgVU5QUklWSUxFR0VEIFNNVVggRE9DUyBKQUlMIEFYX0RJU0FCTEVfVFJBUCBc CiAJCVRMUyBORVdTWVNMT0cgTk9MSUJQS0cgU0NUUAo= --5994eefd2f8b4df4883d4ec9d70bd290--