From unknown Sat Aug 16 21:18:37 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#29699 <29699@debbugs.gnu.org> To: bug#29699 <29699@debbugs.gnu.org> Subject: Status: [PATCH] guix: offload: Add "status" sub-command. Reply-To: bug#29699 <29699@debbugs.gnu.org> Date: Sun, 17 Aug 2025 04:18:37 +0000 retitle 29699 [PATCH] guix: offload: Add "status" sub-command. reassign 29699 guix-patches submitter 29699 Ricardo Wurmus severity 29699 normal tag 29699 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 13 17:44:58 2017 Received: (at submit) by debbugs.gnu.org; 13 Dec 2017 22:44:58 +0000 Received: from localhost ([127.0.0.1]:60934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePFlq-0000Hd-1J for submit@debbugs.gnu.org; Wed, 13 Dec 2017 17:44:58 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePFln-0000HQ-RW for submit@debbugs.gnu.org; Wed, 13 Dec 2017 17:44:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePFlh-0000Vb-Q3 for submit@debbugs.gnu.org; Wed, 13 Dec 2017 17:44:50 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:54528) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePFlh-0000VR-MT for submit@debbugs.gnu.org; Wed, 13 Dec 2017 17:44:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ePFlg-0004SD-Ha for guix-patches@gnu.org; Wed, 13 Dec 2017 17:44:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ePFlc-0000Qk-EY for guix-patches@gnu.org; Wed, 13 Dec 2017 17:44:48 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21109) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ePFlc-0000GA-6O for guix-patches@gnu.org; Wed, 13 Dec 2017 17:44:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1513205054; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; l=2665; bh=LFdwEUFr1zUjTLazGrMWcowduaggyJOE2svKrFFPrrw=; b=L7odWA0NmM3smWHdozgMmPS+TtgyX8JvQnfgxtVHtsESpJK59B3vhvS8O4dcW0aV rM4+ilMkGz6S/9gwjLy9mvaW3gcLvCzFezO8ZShmqQBsrJHf11r2ZOQuWf4cpQO5LdA PsL44iveNmlDfgn53DC/c1PxECnDbLy1Uvg/LpFk= Received: from localhost (port-92-200-38-217.dynamic.qsc.de [92.200.38.217]) by mx.zohomail.com with SMTPS id 1513205054563471.9024089580339; Wed, 13 Dec 2017 14:44:14 -0800 (PST) From: Ricardo Wurmus To: guix-patches@gnu.org Subject: [PATCH] guix: offload: Add "status" sub-command. Date: Wed, 13 Dec 2017 23:44:09 +0100 X-Mailer: git-send-email 2.15.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Message-ID: <20171213224409.417-1-rekado@elephly.net> X-ZohoMailClient: External X-ZohoMail: Z_26063301 SPT_1 Z_26062608 SPT_0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: Ricardo Wurmus X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) * guix/scripts/offload.scm (check-machine-load): New procedure. (guix-offload): Call it when the argument is "status". * doc/guix.texi (Daemon Offload Setup): Document it. --- doc/guix.texi | 9 +++++++++ guix/scripts/offload.scm | 26 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 92ac45b1c..6845a4271 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -1066,6 +1066,15 @@ regular expression like this: # guix offload test machines.scm '\.gnu\.org$' @end example =20 +@cindex offload status +To display the current load of all build hosts, run this command on the +main node: + +@example +# guix offload status +@end example + + @node Invoking guix-daemon @section Invoking @command{guix-daemon} =20 diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm index ebd0bf783..40bc68b11 100644 --- a/guix/scripts/offload.scm +++ b/guix/scripts/offload.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2014, 2015, 2016, 2017 Ludovic Court=C3=A8s +;;; Copyright =C2=A9 2017 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -629,6 +630,19 @@ machine." (for-each assert-node-can-import nodes names sockets) (for-each assert-node-can-export nodes names sockets)))) =20 +(define (check-machine-load machine-file pred) + "Print the load of each machine matching PRED in MACHINE-FILE." + (define (build-machine=3D? m1 m2) + (and (string=3D? (build-machine-name m1) (build-machine-name m2)) + (=3D (build-machine-port m1) (build-machine-port m2)))) + + ;; A given build machine may appear several times (e.g., once for + ;; "x86_64-linux" and a second time for "i686-linux"); test them only on= ce. + (let ((machines (filter pred + (delete-duplicates (build-machines machine-file) + build-machine=3D?)))) + (for-each machine-load machines))) + =0C ;;; ;;; Entry point. @@ -691,6 +705,18 @@ machine." (() (values %machine-file (const #t))) (x (leave (G_ "wrong number of arguments~%")))= ))) (check-machine-availability (or file %machine-file) pred)))) + (("status" rest ...) + (with-error-handling + (let-values (((file pred) + (match rest + ((file regexp) + (values file + (compose (cut string-match regexp <>) + build-machine-name))) + ((file) (values file (const #t))) + (() (values %machine-file (const #t))) + (x (leave (G_ "wrong number of arguments~%")))= ))) + (check-machine-load (or file %machine-file) pred)))) (("--version") (show-version-and-exit "guix offload")) (("--help") --=20 2.15.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 15 05:42:48 2017 Received: (at 29699) by debbugs.gnu.org; 15 Dec 2017 10:42:48 +0000 Received: from localhost ([127.0.0.1]:34720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePnS3-0004lN-TO for submit@debbugs.gnu.org; Fri, 15 Dec 2017 05:42:48 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:54639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePnS1-0004lF-Pa for 29699@debbugs.gnu.org; Fri, 15 Dec 2017 05:42:46 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id AD2F81027A; Fri, 15 Dec 2017 11:42:48 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NXyJBeaZRaBF; Fri, 15 Dec 2017 11:42:47 +0100 (CET) Received: from ribbon (unknown [193.50.110.249]) by hera.aquilenet.fr (Postfix) with ESMTPSA id B76F510315; Fri, 15 Dec 2017 11:42:47 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ricardo Wurmus Subject: Re: [bug#29699] [PATCH] guix: offload: Add "status" sub-command. References: <20171213224409.417-1-rekado@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Frimaire an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 15 Dec 2017 11:42:43 +0100 In-Reply-To: <20171213224409.417-1-rekado@elephly.net> (Ricardo Wurmus's message of "Wed, 13 Dec 2017 23:44:09 +0100") Message-ID: <87lgi4jmqk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 29699 Cc: 29699@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Ricardo Wurmus skribis: > * guix/scripts/offload.scm (check-machine-load): New procedure. > (guix-offload): Call it when the argument is "status". > * doc/guix.texi (Daemon Offload Setup): Document it. Nice, LGTM! > +(define (check-machine-load machine-file pred) > + "Print the load of each machine matching PRED in MACHINE-FILE." > + (define (build-machine=3D? m1 m2) > + (and (string=3D? (build-machine-name m1) (build-machine-name m2)) > + (=3D (build-machine-port m1) (build-machine-port m2)))) > + > + ;; A given build machine may appear several times (e.g., once for > + ;; "x86_64-linux" and a second time for "i686-linux"); test them only = once. > + (let ((machines (filter pred > + (delete-duplicates (build-machines machine-fil= e) > + build-machine=3D?)))) > + (for-each machine-load machines))) Perhaps we could also display information from =E2=80=98uname=E2=80=99, as = in ? Thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 15 16:06:36 2017 Received: (at 29699) by debbugs.gnu.org; 15 Dec 2017 21:06:36 +0000 Received: from localhost ([127.0.0.1]:36162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePxBk-0001vR-FW for submit@debbugs.gnu.org; Fri, 15 Dec 2017 16:06:36 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePxBj-0001vJ-24 for 29699@debbugs.gnu.org; Fri, 15 Dec 2017 16:06:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1513371946; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; l=1391; bh=DB/S+JbM6VqPUb+hGrzTnG7B2srB39Gni4/DszCNCjE=; b=IU+WA199ArH+BDXpLaNH/IxfEsFBP0b80IJJMrbZ6p/cLVe74OskHtF+hjXPJ1iJ Rx2RdWaAsa61t6mCW0ylm8fATNQVr9bLpZPHAF0Iv7QHBSqTAufYggBfjhsbKOenAVm 7r4ByH7XLHphqvFXwPogPABHD2sU+zbmaS06sRMM= Received: from localhost (port-92-200-20-179.dynamic.qsc.de [92.200.20.179]) by mx.zohomail.com with SMTPS id 1513371946719917.9203303299734; Fri, 15 Dec 2017 13:05:46 -0800 (PST) References: <20171213224409.417-1-rekado@elephly.net> <87lgi4jmqk.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#29699] [PATCH] guix: offload: Add "status" sub-command. In-reply-to: <87lgi4jmqk.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Fri, 15 Dec 2017 22:05:42 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <87d13fvh09.fsf@elephly.net> X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 29699 Cc: 29699@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Ludovic Court=C3=A8s writes: > Ricardo Wurmus skribis: > >> * guix/scripts/offload.scm (check-machine-load): New procedure. >> (guix-offload): Call it when the argument is "status". >> * doc/guix.texi (Daemon Offload Setup): Document it. > > Nice, LGTM! > >> +(define (check-machine-load machine-file pred) >> + "Print the load of each machine matching PRED in MACHINE-FILE." >> + (define (build-machine=3D? m1 m2) >> + (and (string=3D? (build-machine-name m1) (build-machine-name m2)) >> + (=3D (build-machine-port m1) (build-machine-port m2)))) >> + >> + ;; A given build machine may appear several times (e.g., once for >> + ;; "x86_64-linux" and a second time for "i686-linux"); test them only= once. >> + (let ((machines (filter pred >> + (delete-duplicates (build-machines machine-fi= le) >> + build-machine=3D?)))) >> + (for-each machine-load machines))) > > Perhaps we could also display information from =E2=80=98uname=E2=80=99, a= s in > ? I didn=E2=80=99t even notice machine-status.scm! Should we just fold that = into offload.scm instead of accepting my simplistic =E2=80=9Ccheck-machine-load= =E2=80=9D procedure? -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 15 17:41:19 2017 Received: (at 29699) by debbugs.gnu.org; 15 Dec 2017 22:41:20 +0000 Received: from localhost ([127.0.0.1]:36216 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePyfP-00042Y-MG for submit@debbugs.gnu.org; Fri, 15 Dec 2017 17:41:19 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:56450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ePyfL-00042O-UB for 29699@debbugs.gnu.org; Fri, 15 Dec 2017 17:41:16 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D75DFF7E5; Fri, 15 Dec 2017 23:41:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cxi5Qs9OLbiI; Fri, 15 Dec 2017 23:41:18 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id A0804B4B3; Fri, 15 Dec 2017 23:41:17 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Ricardo Wurmus Subject: Re: [bug#29699] [PATCH] guix: offload: Add "status" sub-command. References: <20171213224409.417-1-rekado@elephly.net> <87lgi4jmqk.fsf@gnu.org> <87d13fvh09.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 Frimaire an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 15 Dec 2017 23:41:13 +0100 In-Reply-To: <87d13fvh09.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 15 Dec 2017 22:05:42 +0100") Message-ID: <87wp1nehrq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 29699 Cc: 29699@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> Ricardo Wurmus skribis: >> >>> * guix/scripts/offload.scm (check-machine-load): New procedure. >>> (guix-offload): Call it when the argument is "status". >>> * doc/guix.texi (Daemon Offload Setup): Document it. >> >> Nice, LGTM! >> >>> +(define (check-machine-load machine-file pred) >>> + "Print the load of each machine matching PRED in MACHINE-FILE." >>> + (define (build-machine=3D? m1 m2) >>> + (and (string=3D? (build-machine-name m1) (build-machine-name m2)) >>> + (=3D (build-machine-port m1) (build-machine-port m2)))) >>> + >>> + ;; A given build machine may appear several times (e.g., once for >>> + ;; "x86_64-linux" and a second time for "i686-linux"); test them onl= y once. >>> + (let ((machines (filter pred >>> + (delete-duplicates (build-machines machine-f= ile) >>> + build-machine=3D?)))) >>> + (for-each machine-load machines))) >> >> Perhaps we could also display information from =E2=80=98uname=E2=80=99, = as in >> ? > > I didn=E2=80=99t even notice machine-status.scm! Should we just fold tha= t into > offload.scm instead of accepting my simplistic =E2=80=9Ccheck-machine-loa= d=E2=80=9D > procedure? Sure, I guess it=E2=80=99s just a matter of adding (node-eval node '(uname)= ) in =E2=80=98check-machine-load=E2=80=99 and printing that. Thanks, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 15:53:23 2017 Received: (at 29699-done) by debbugs.gnu.org; 16 Dec 2017 20:53:23 +0000 Received: from localhost ([127.0.0.1]:37734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQJSV-0002zq-7Y for submit@debbugs.gnu.org; Sat, 16 Dec 2017 15:53:23 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eQJST-0002zi-BE for 29699-done@debbugs.gnu.org; Sat, 16 Dec 2017 15:53:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1513457561; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; l=1869; bh=7fHtKKQk8bQXN7v191LDBgE1qjrI2BAasLoMhWS/kaU=; b=REMeBQ2h0WxJiX322q4fMXU87J7KHpz5e6BJ63AtV+1Aub1o2vAbN8JzGhTmyEZt j7Ikni0+Nis/Xoink0EDWJpODQMRN2/Of0odNRn02ONNypiJdWIE+KLv8pDrsmuFKcL BX0LjAZ/9bFf/MajQ9tgaxcH0ZCslATnFwyFEMCQ= Received: from localhost (port-92-200-20-179.dynamic.qsc.de [92.200.20.179]) by mx.zohomail.com with SMTPS id 1513457560988504.68551777929224; Sat, 16 Dec 2017 12:52:40 -0800 (PST) References: <20171213224409.417-1-rekado@elephly.net> <87lgi4jmqk.fsf@gnu.org> <87d13fvh09.fsf@elephly.net> <87wp1nehrq.fsf@gnu.org> User-agent: mu4e 0.9.18; emacs 25.3.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#29699] [PATCH] guix: offload: Add "status" sub-command. In-reply-to: <87wp1nehrq.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Sat, 16 Dec 2017 21:52:36 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <87bmiyo0ob.fsf@elephly.net> X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 29699-done Cc: 29699-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Ludovic Court=C3=A8s writes: > Ricardo Wurmus skribis: > >> Ludovic Court=C3=A8s writes: >> >>> Ricardo Wurmus skribis: >>> >>>> * guix/scripts/offload.scm (check-machine-load): New procedure. >>>> (guix-offload): Call it when the argument is "status". >>>> * doc/guix.texi (Daemon Offload Setup): Document it. >>> >>> Nice, LGTM! >>> >>>> +(define (check-machine-load machine-file pred) >>>> + "Print the load of each machine matching PRED in MACHINE-FILE." >>>> + (define (build-machine=3D? m1 m2) >>>> + (and (string=3D? (build-machine-name m1) (build-machine-name m2)) >>>> + (=3D (build-machine-port m1) (build-machine-port m2)))) >>>> + >>>> + ;; A given build machine may appear several times (e.g., once for >>>> + ;; "x86_64-linux" and a second time for "i686-linux"); test them on= ly once. >>>> + (let ((machines (filter pred >>>> + (delete-duplicates (build-machines machine-= file) >>>> + build-machine=3D?)))) >>>> + (for-each machine-load machines))) >>> >>> Perhaps we could also display information from =E2=80=98uname=E2=80=99,= as in >>> ? >> >> I didn=E2=80=99t even notice machine-status.scm! Should we just fold th= at into >> offload.scm instead of accepting my simplistic =E2=80=9Ccheck-machine-lo= ad=E2=80=9D >> procedure? > > Sure, I guess it=E2=80=99s just a matter of adding (node-eval node '(unam= e)) in > =E2=80=98check-machine-load=E2=80=99 and printing that. Okay, pushed to master with commit dafc3dafe. I renamed the procedure to =E2=80=9Ccheck-machine-status=E2=80=9D because i= t does more than just print the load. --=20 Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net From unknown Sat Aug 16 21:18:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 14 Jan 2018 12:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator