From patchwork Sun Feb 25 14:48:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 61108 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7A3D927BBE2; Sun, 25 Feb 2024 15:05:21 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BECAF27BBE2 for ; Sun, 25 Feb 2024 15:05:20 +0000 (GMT) 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?b?4oCcSW5zcGVjdGluZyBT?= =?utf-8?b?ZXJ2aWNlc+KAnQ==?= 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 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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