From nobody Sun Nov 03 15:25:13 2024 X-Original-To: stable@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 4XhJM13dbbz5cJtq for ; Sun, 03 Nov 2024 15:25:17 +0000 (UTC) (envelope-from ml@ft-c.de) Received: from einhorn-mail-out.in-berlin.de (einhorn-mail.in-berlin.de [217.197.80.20]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.in-berlin.de", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XhJM01FxZz4GWT for ; Sun, 3 Nov 2024 15:25:16 +0000 (UTC) (envelope-from ml@ft-c.de) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of ml@ft-c.de designates 217.197.80.20 as permitted sender) smtp.mailfrom=ml@ft-c.de; dmarc=none X-Envelope-From: ml@ft-c.de X-Envelope-To: Received: from authenticated.user (localhost [127.0.0.1]) by einhorn.in-berlin.de with ESMTPSA id 4A3FPDin3826787 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT) for ; Sun, 3 Nov 2024 16:25:14 +0100 Message-ID: <38a67d488aba4272c6af98e3e41650993d7c66d4.camel@ft-c.de> Subject: Re: screen hardstatus alwayslastline with sysctl command - solved From: ft Reply-To: ml@ft-c.de To: stable@freebsd.org Date: Sun, 03 Nov 2024 16:25:13 +0100 In-Reply-To: <7625746720e02315e7b3282889dc0fa2ce95cd81.camel@ft-c.de> References: <7625746720e02315e7b3282889dc0fa2ce95cd81.camel@ft-c.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 FreeBSD GNOME Team List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.org MIME-Version: 1.0 X-Spamd-Result: default: False [-3.32 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; NEURAL_HAM_SHORT(-0.93)[-0.928]; R_SPF_ALLOW(-0.20)[+ip4:217.197.80.0/20]; RCVD_IN_DNSWL_LOW(-0.10)[217.197.80.20:from]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:29670, ipnet:217.197.80.0/20, country:DE]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[stable@freebsd.org]; REPLYTO_ADDR_EQ_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[stable@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[ft-c.de]; HAS_REPLYTO(0.00)[ml@ft-c.de] X-Rspamd-Queue-Id: 4XhJM01FxZz4GWT X-Spamd-Bar: --- Here is the solution backtick 1 9 9 /sbin/sysctl -n dev.cpu.0.temperature=20 backtick 2 9 9 /sbin/sysctl -n dev.cpu.1.temperature=20 backtick 3 9 9 /sbin/sysctl -n dev.cpu.2.temperature=20 backtick 4 9 9 /sbin/sysctl -n dev.cpu.3.temperature=20 hardstatus alwayslastline "%{=3D RY} %H %{BW} %l %{Gb} %Y-%m-%d %c %{BW} %1= ` %2` %3` %4` %=3D" On Sun, 2024-11-03 at 15:03 +0100, ft wrote: > Hello,=20 >=20 > I work with screen. >=20 > it is possible to integrate the command > $(/sbin/sysctl dev.cpu.0.temperature) > or (better) > $(/sbin/sysctl dev.cpu.0.temperature | cut -d ' ' -f 2 ) > into the screen programm into=C2=A0 > hardstatus alwayslastline?=20 >=20 > Now my line is: > hardstatus alwayslastline "%{=3D RY}%H %{BW}%l %{Gb}%Y-%m-%d %c%=3D" > it works fine. >=20 > (1) > "%{=3D kw}CPU Temp: %{G}$(/bin/sh -c '/sbin/sysctl dev.cpu.0.temperature'= )" > doesn't work. > it prints the command string $(...) >=20 > (2) > "%{=3D RY}%H %{BW}%l %{Gb}%Y-%m-%d %c%{BW}$(/sbin/sysctl > dev.cpu.0.temperature)%=3D" > doesn't work. >=20 > (3) > "%{=3D RY}%H %{BW}%l %{Gb}%Y-%m-%d %c%{BW}$(cat > /home/ft/skripte/cronjobs/tempft_screen.log)%=3D" > doesn't work. > =C2=A0 > the following command from (3) works: > (filecontent with current temperature) > cat /home/ft/skripte/cronjobs/tempft_screen.log > 62,1 >=20 > Have someone an idea=C2=A0to intgrate the sysctl command into the hardsta= tus? >=20 > Franz >=20 >=20