From nobody Sun Jun 02 23:18:33 2024 X-Original-To: pkg@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 4Vst8Q1g3Xz5LS62 for ; Sun, 02 Jun 2024 23:18:46 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vst8P3MFhz46jj for ; Sun, 2 Jun 2024 23:18:45 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-62a0849f8e5so36389827b3.2 for ; Sun, 02 Jun 2024 16:18:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717370324; x=1717975124; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=RGrXSnQCxIrMYE50hPD2/uT0WgENyBbMljGpxUD5wRs=; b=ASySsGqoMxpCK6ZISS9Fn1Gsm8sKxAjcqSuAX1wHWD6ml83Ubmp36Wkj+PCiumXO/L WzPIipgm6AdXdeE1kG3M3u80xVLPPgxGScGHubRVJU1tfcR0Gk3x2uVJR1m0AitSPIqz ou/LtF72qE8wrZQgXkfaTrf0ugenUoXuQ7dmZH3lpeQ3n8PxL93K+xZpTE2D0XCe1OFq Xp17Vdr7mQp5jF4op2eBFwLhkHEbBwW5r7fAVyRsRhiDm5MxtlPmfxhICOahoeI/N4Ju nZ7+4ACCjBUdGtkXoAf2wWOzIBsLCgwMcL4QSQ0CEdWv9SPOUOuUM4+MQ5Z7Uo459z24 SGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717370324; x=1717975124; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RGrXSnQCxIrMYE50hPD2/uT0WgENyBbMljGpxUD5wRs=; b=GFuFsPPzpLZTRxGZDZYweA/NWFdgOXQRUcYEM7arcd+PMUBNxkYGQFhAbMEwjYcb9n IGcbenB5vBHmWsHMOgq375STK9Lcm1dCTWWu9wOwupk7IDzO8K1B4LRS2M99fNxjxMzY kImGbrXKCb0yPb/Q394D6G3SU5NPnLfMLcZZG2WJ8vi+brasroTUG0Lc43XYo5+k3bNy whbYnN6lzVykSRcIykZAvc2DEqedc2wCtWCYEdxfInF//7BCNbw9gD+dLk4LLakTSENI Ewm6gQ6MFbl2cN2VXpEkgPVU9gCS29j5Y3+OKfb8yI9uF9cCrcNRIhllts96sltr0Q0t lfGA== X-Forwarded-Encrypted: i=1; AJvYcCXkXzqJ4sUJj703uRVRcJmTcZU/qabsRIt2VumxuX8dJmGYarrFdz4gnj88yAdpCIYezFPU1guf4tLzQQ5Nans= X-Gm-Message-State: AOJu0YxDcH3599qnzz2wDwMvkUom+06Qq+Dxet5N/+1cRVwLs8Q9bylb Xcxt8v/B7FE47BUGzJgiGIsZILu3kK2AjudQyXuERpRNKLN27LiCoJeoRQ== X-Google-Smtp-Source: AGHT+IEQlXDFxH70AIvGhpj23nnNuUOQvC80Pm4Sp7ivtFmuRA5eoF9nYghSuhaQWYhz2vPGid96Uw== X-Received: by 2002:a0d:e649:0:b0:62a:530:3710 with SMTP id 00721157ae682-62c797fac90mr79097367b3.32.1717370324008; Sun, 02 Jun 2024 16:18:44 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-43ff23a170asm33461301cf.2.2024.06.02.16.18.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Jun 2024 16:18:43 -0700 (PDT) Date: Sun, 2 Jun 2024 19:18:33 -0400 From: Mark Johnston To: Budi Janto Cc: Dan Langille , pkg@freebsd.org Subject: Re: NULL result with net-snmp-5.9.4_1,1 Message-ID: References: <908894bb-9be8-455b-8fee-e7164d2451e9@studiokaraoke.co.id> List-Id: Binary package management and package tools discussion List-Archive: https://lists.freebsd.org/archives/freebsd-pkg List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-pkg@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4Vst8P3MFhz46jj On Sun, Jun 02, 2024 at 02:36:44PM +0700, Budi Janto wrote: > On 6/1/24 22:45, Mark Johnston wrote: > > I believe that in net-snmp-5.9.4_1,1, snmpd is running as the "snmpd" > > user rather than as root. Can you confirm this? net-snmp-5.9.4_2,1 > > reverts back to running as root. Does that fix the problem for you? > > Sure, > > # ps axu | grep snmpd > root 1756 0.0 0.0 34688 13512 - S Sat07 1:15.54 > /usr/local/sbin/snmpd -p /var/run/net_snmpd.pid -c /usr/local/etc/snmpd.conf > root 79855 0.0 0.0 12876 2432 0 S+ 14:29 0:00.00 grep > snmpd I guess this is with net-snmp-5.9.4_2,1? > # grep snmp-cpu-temperature.sh /usr/local/etc/snmpd.conf > extend cpu-temperature /root/x/snmp-cpu-temperature.sh > > > What is in your snmp-cpu-temperature.sh script? Does it need to run as > > root? (I'd be a bit surprised if so.) > > Yes, running with root privilege. > > # cat /root/x/snmp-cpu-temperature.sh > #!/usr/bin/env sh > > for index in $(jot - 0 11) > do > sysctl -n dev.cpu.$index.temperature | awk '{gsub("C",""); print}' > done This script does not need to run as root. If you change snmpd.conf to: extend cpu-temperature sh /root/x/snmp-cpu-temperature.sh and set snmpd_sugid="YES" in rc.conf (to make snmpd drop privileges) and restart snmpd, are you able to see the temperatures again?