From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id UExeBS0hW2bnNgEAe85BDQ:P1 (envelope-from ) for ; Sat, 01 Jun 2024 15:25:01 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id UExeBS0hW2bnNgEAe85BDQ (envelope-from ) for ; Sat, 01 Jun 2024 15:25:01 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=imJ9IolL; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717248300; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=DiKcQGJ3sdeP/OVxt8hoBp64Sm1qXYia7G5upzRC4mA=; b=CZEgkLjkogx3z1RuQJu9NSR9mS695iclukhlf94k4o913ZvHbfucYdppAwkoaElaKDnOpe YBef2dBtkiIisExUHOWOJtsoV9oBaR3/1pJ5iaIGgw8GNtlL1bc6NEeIW1H76L+B/dWt6P xupITMJ5/vlID7SiFnY0bbllNTsf/Ij66NdWBIuFhX3LP9DB4cWFT58UZtUFpcU1UducdT gqbyfcsa82VYin32TrLm7Lk+DwWX5lnDB1R1OCpfpvXK96e3Z/oX1Y9A7+TR9bqr7ATfNp 9oqMyOcnMqOsA6zVWwW+U/4FzmzT+hutFEIJvD2MUF8RpgQIKBNYtO91IJvBdQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=imJ9IolL; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717248300; a=rsa-sha256; cv=none; b=Gc3dDlOLdiYsSg2WKrVN91JC50XY3DPoaWunseJN6S94qRwIvehxZwD3ZkH6OMf0IgRlgu nGPIskRQw86elbGSGhCPCHqlhHqVjfTOOgWTvt1+sS48A9GCRt4VCctIT/DgLWufGxKBa7 xUbW3ScCHU2+JnPP8cLvGpCpCawyPYMwpYOh95iJoksCvDpDFvozUkNMXFSEEXjs+VxY/o d+6B2ouw0kifLRGtTd1pZbhssRSROAR+2MyXJjWDknzNKdbk6ZJH7kHtQdC+1y+49HEMr5 Dj55e2iqZmxyeyISLcC5MdiTnMY+rhFOVuinukxu9VVfJXbw48FS9gaOiC+3+Q== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DE4E02709F for ; Sat, 1 Jun 2024 15:25:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDOiz-0006Ty-8S; Sat, 01 Jun 2024 09:24:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDOix-0006TY-JF for guix-devel@gnu.org; Sat, 01 Jun 2024 09:24:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sDOiw-0001gN-A1; Sat, 01 Jun 2024 09:24:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=DiKcQGJ3sdeP/OVxt8hoBp64Sm1qXYia7G5upzRC4mA=; b=imJ9IolLWIqgYRHRgy9E /puKaMbGHeucCqeU6dCFe1/Wy/Nl7kuRTg/NFv4o3bVikpQ1swozTYBwnMgSsNi85mmUtdJqh0HdN bmqdW0KHvaG5rwfcSSBUlnEkjTSC5K+5mPvqMzGQbdezrjPgFUz0p+uBD0jyxvbeF1CxGLOf6hSh5 onclpi4DRUBALBg32Ebe4Uboqc2GeG2N379H33MsNRsERyvNxBdDbBqxCavyXPjNeyvulgAm/dYCt s2Vsa6cgVQAAhbvDny6+GBtQ2+TrNv6YAZz7IgT/pNVcvkTHGsgQc4IN3hjkUqUppJmVyCBVfo/xF Bga+sWcZkXiEmw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Felix Lechner via "Development of GNU Guix and the GNU System distribution." Cc: Attila Lendvai , Felix Lechner Subject: Re: Upgrading Shepherd services In-Reply-To: <87y181s2pg.fsf@lease-up.com> (Felix Lechner via's message of "Wed, 22 May 2024 19:04:59 -0700") References: <87le49uymn.fsf@lease-up.com> <87y181s2pg.fsf@lease-up.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 14 Prairial an 232 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de l'Acacia 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: Sat, 01 Jun 2024 15:24:40 +0200 Message-ID: <87v82spzhj.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -11.10 X-Migadu-Queue-Id: DE4E02709F X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -11.10 X-TUID: tX1v0DcY2gc9 Hello! Felix Lechner via "Development of GNU Guix and the GNU System distribution." skribis: > (define (garbage-collector-shepherd-service config) FWIW, if it can help, I have something very similar in my config: --8<---------------cut here---------------start------------->8--- (define %gc-service (simple-service 'gc shepherd-root-service-type (list (shepherd-service (provision '(gc)) (requirement '(user-processes)) (modules '((shepherd service timer))) (start #~(make-timer-constructor (calendar-event #:minutes '(0)) (command '("/run/current-system/profile/bin/guix" "gc" = "-F2G") #:user "ludo"))) (stop #~(make-timer-destructor)) (documentation "Run the garbage collector (GC).") (actions (list (shepherd-action (name 'trigger) (documentation "GC!") (procedure #~trigger-timer)))))))) --8<---------------cut here---------------end--------------->8--- =E2=80=A6 and I add =E2=80=98%gc-service=E2=80=99 to my =E2=80=98services= =E2=80=99 field. Works as advertised: --8<---------------cut here---------------start------------->8--- $ sudo /run/current-system/profile/bin/herd status gc Password:=20 Status of gc: It is running since Mon 27 May 2024 08:39:28 AM CEST (5 days ago). Timed service. Periodically running as "ludo": /run/current-system/profile/bin/guix gc -= F2G. It is enabled. Provides: gc. Requires: user-processes. Will be respawned. Recent runs: 2024-05-31 21:00:00 Process exited successfully after 0 seconds. 2024-05-31 22:00:00 Process exited successfully after 0 seconds. 2024-05-31 23:00:00 Process exited successfully after 0 seconds. 2024-06-01 00:00:00 Process exited successfully after 0 seconds. 2024-06-01 01:00:00 Process exited successfully after 0 seconds. 2024-06-01 11:00:00 Process exited successfully after 0 seconds. 2024-06-01 12:00:00 Process exited successfully after 0 seconds. 2024-06-01 13:00:00 Process exited successfully after 0 seconds. 2024-06-01 14:00:00 Process exited successfully after 0 seconds. 2024-06-01 15:00:00 Process exited successfully after 0 seconds. Recent messages: 2024-06-01 15:00:00 guix gc: already 4169.06 MiBs available on /gnu/store= , nothing to do Upcoming timer alarms: 04:00:00 PM (in 37 minutes) 05:00:00 PM (in 97 minutes) 06:00:00 PM (in 3 hours) 07:00:00 PM (in 4 hours) 08:00:00 PM (in 5 hours) --8<---------------cut here---------------end--------------->8--- HTH! Ludo=E2=80=99.