From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id +JzCGzFX22X6vgAAe85BDQ:P1 (envelope-from ) for ; Sun, 25 Feb 2024 16:05:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id +JzCGzFX22X6vgAAe85BDQ (envelope-from ) for ; Sun, 25 Feb 2024 16:05:21 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BOaKAd4J; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708873521; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4dLaOo6qHiJ23CPxKXv26OkLsuOdMQtZIE64LFXZdYQ=; b=QtASQsLhKXBV+yBqWYDh+Ws91yKxSv9OsMMdC1CLfR041Mu0GNAdqUx26IGlULEiqz6tqo +21T5uY+YYB1bk+vUGWgRTgvm2XvJQ7kF7iAN2aGEkHIwKHldxHoSPUaIksWOCNo48EKwP UEahR3v9zL11bfMoMrnMrE/gDz0YUKCOcbaiuvEqgPPPA943l1W1+JqU8L1v9aiK/uezff m+bdGhYzAHETC0qUwZRG/5VhXU+yKCQEu/CKIpfUogALaNIYg+yUJnalciqCv+YefQBYpC 243S8D/4eyDYwjqEPNzrxEXYExwdG0m5PTtLo+BFNtOuE8jh+s2eK5RC3ImRyw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=BOaKAd4J; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708873521; a=rsa-sha256; cv=none; b=ChRQRrI841YacZlaVtBogeAOqQzbWVb1+BxEEfRl2NrA30Bn++A8CFCaISrwNqSeG82/3x OY6ip+5xbEgK4mGccX3E/ILfUwpjDjKSgejS69V8cLKGZD5CMs2aCwt2IpjMDGkbQOahED 7oREzM1WXCjpiuM6xeqlKp5LEnpynKG/srnPV951kWZ0OSi4kwZxQWX0ZnWS2DZVic27/I SMY5zlHXW2JT6Rn3AekvNLNjC7YAiHcpzm/+hipb8xKhA+1ZqSxr23rQKm/xm0kEfOlc+S dWDMSH/cf5Mb9mDzzNOGRVR9MRTGv+hcLPXD9+3hqOnwgDdTETCLGa93EUkcew== 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 3688B4399B for ; Sun, 25 Feb 2024 16:05:21 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1reG3X-0004cG-NV; Sun, 25 Feb 2024 10:04:43 -0500 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 1reG3T-0004bd-QP for guix-patches@gnu.org; Sun, 25 Feb 2024 10:04:39 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1reG3R-0003yX-Vy for guix-patches@gnu.org; Sun, 25 Feb 2024 10:04:39 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1reG3q-0004y2-GP for guix-patches@gnu.org; Sun, 25 Feb 2024 10:05:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69302] [PATCH v2 2/2] doc: Add =?UTF-8?Q?=E2=80=9CInspecting_?= =?UTF-8?Q?Services=E2=80=9D?= section. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Feb 2024 15:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69302 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69302@debbugs.gnu.org Cc: Oleg Pykhalov , Ludovic =?UTF-8?Q?Court=C3=A8s?= , "pelzflorian \(Florian Pelz\)" Received: via spool by 69302-submit@debbugs.gnu.org id=B69302.170887346018979 (code B ref 69302); Sun, 25 Feb 2024 15:05:02 +0000 Received: (at 69302) by debbugs.gnu.org; 25 Feb 2024 15:04:20 +0000 Received: from localhost ([127.0.0.1]:52457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reG3A-0004vw-3N for submit@debbugs.gnu.org; Sun, 25 Feb 2024 10:04:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1reG36-0004vB-9i for 69302@debbugs.gnu.org; Sun, 25 Feb 2024 10:04:16 -0500 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 1reFod-0001Tc-8N; Sun, 25 Feb 2024 09:49:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=4dLaOo6qHiJ23CPxKXv26OkLsuOdMQtZIE64LFXZdYQ=; b=BOaKAd4Jgxr7Wq9s0FG+ x6YNH2yn2wTF3Yu+zrNA+id4B09Kq2v9xQjuL6nTVpfJAfMpaH3WJ87bOHTNH7LXWMooT8cDTO223 OfxaYzN4uyagyP4ar6S0aVY7rsMnlgdb6+APARx1zgN+HuXloThD3k7AdkPK2HAzjCjMYmcJOhAcZ hhUKVl8rsg/I48kZHFYGC7eEaH562NlB4NNX8ILZMeTL0cJIpU67uNcF9V10cD/mN6GvHqONcj6aD GFYarrfdqfhPJw/RraLLZJIRoEnKJytvcvSFG2bTBmcjtcIA4KldCcHXwsqoLk7cGn1qnT7B1mvOe ZpP2h5CsF0B4fA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Sun, 25 Feb 2024 15:48:54 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <87zfvp4hja.fsf@gnu.org> References: <87zfvp4hja.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.67 X-Spam-Score: -4.67 X-Migadu-Queue-Id: 3688B4399B X-Migadu-Scanner: mx13.migadu.com X-TUID: YV4n1ARvxvdd * doc/guix.texi (Inspecting Services): New subsection. Change-Id: I71378101de913a494e0d0e93cc76434c5a70b520 --- doc/guix.texi | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 0634d5051e..3e5514cf45 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17536,6 +17536,61 @@ Using the Configuration System (delete avahi-service-type)) @end lisp +@unnumberedsubsec Inspecting Services + +@cindex troubleshooting, for system services +@cindex inspecting system services +@cindex system services, inspecting +As you work on your system configuration, you might wonder why some +system service doesn't show up or why the system as not as you expected. +There are several ways to inspect and troubleshoot problems. + +@cindex dependency graph, of Shepherd services +First, you can inspect the dependency graph of Shepherd services like +so: + +@example +guix system shepherd-graph /etc/config.scm | \ + guix shell xdot -- xdot - +@end example + +This lets you visualize the Shepherd services as defined in +@file{/etc/config.scm}. Each box is a service as would be shown by +@command{sudo herd status} on the running system, and each arrow denotes +a dependency (in the sense that if service @var{A} depends on @var{B}, +then @var{B} must be started before @var{A}). + +@cindex extension graph, of services +Not all ``services'' are Shepherd services though, since Guix System +uses a broader definition of the term (@pxref{Services}). To visualize +system services and their relations at a higher level, run: + +@example +guix system extension-graph /etc/config.scm | \ + guix shell xdot -- xdot - +@end example + +This lets you view the @dfn{service extension graph}: how services +``extend'' each other, for instance by contributing to their +configuration. @xref{Service Composition}, to understand the meaning of +this graph. + +Last, you may also find it useful to inspect your system configuration +at the REPL (@pxref{Using Guix Interactively}). Here is an example +session: + +@example +$ guix repl +scheme@@(guix-user)> ,use (gnu) +scheme@@(guix-user)> (define os (load "config.scm")) +scheme@@(guix-user)> ,pp (map service-kind (operating-system-services os)) +$1 = (# + @dots{}) +@end example + +@xref{Service Reference}, to learn about the Scheme interface to +manipulate and inspect services. + @unnumberedsubsec Instantiating the System @cindex system instantiation -- 2.41.0