From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.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 AF5bCixM1mWLFAEA62LTzQ:P1 (envelope-from ) for ; Wed, 21 Feb 2024 20:17:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id AF5bCixM1mWLFAEA62LTzQ (envelope-from ) for ; Wed, 21 Feb 2024 20:17:00 +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=AkDr4bVw; 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=1708535472; 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=ofQVT7g62sEJgTdJrwpeenupjuO0qtlaJfyIPf0BMTs=; b=RS2v+yfARBajLfWLgZrq+Y1b8prWknag+n58o+zeCqwxS1TbIrotiwjV3gxBa9D05SFw+B fFcJK1Rkiff48EIzdJoycDI/j3jsQIcMNpMdkQah2PxG9dN7Ew9+vojlwtonrJSQwcbCcD 4EJjomiKCfhfNH6so7SpmDFjm3KWlFNs1Zk6Sy/cWzr6pEI5XnYJeNSTFgwxBnTrAliQ9E XZ0g1zz2MTNT4Pr85COqPARAuq/QhARpy0k7eqGdPL78Vj39dtgWFKpgqEERbV+JVS6Gnt PYL7VLpudasXmaodiu9i+Mxjj74mhQBajjTrgB7K6pw2bpEGIepgco4BENEvqw== 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=AkDr4bVw; 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=1708535472; a=rsa-sha256; cv=none; b=cOxa/1SvztY0hovdI/jIoEOxviypVdJU5hPnzD6RDlgA50kYZex3ClFktldnhHBRyTJadF a7h8QX6Kwu6KsfxWetBsVF3MVY5o91W90O6z6sVRz4j3djHyizh5kAeZCCgW+L0foPW41f SPjfai5X0BBx2Goguc4rH+OFyFhf5E2nJvnR4QfvbKkR+Ba1iV4sNZ+yLPZagWrB3WOsKH Ylw2dbceUlyYMMf85X6Fi3+0PusYA1WFBhkOctH4dHE+u6RcIL6VUK1JzDWqu2HWTL/zZt g+4fHpiX3rACwm4s360Cu+54TTZx5mOs2Re8nYUMH76BCdSieCNNwGMSmqjT2Q== 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 E3A805126B for ; Wed, 21 Feb 2024 18:11:12 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcq7G-0003Ye-TV; Wed, 21 Feb 2024 12:10:42 -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 1rcq7E-0003Y2-T5 for guix-patches@gnu.org; Wed, 21 Feb 2024 12:10:40 -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 1rcq7E-0006Bb-I0 for guix-patches@gnu.org; Wed, 21 Feb 2024 12:10:40 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcq7a-00088y-R1 for guix-patches@gnu.org; Wed, 21 Feb 2024 12:11:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69302] [PATCH 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: Wed, 21 Feb 2024 17:11: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 69302-submit@debbugs.gnu.org id=B69302.170853541231119 (code B ref 69302); Wed, 21 Feb 2024 17:11:02 +0000 Received: (at 69302) by debbugs.gnu.org; 21 Feb 2024 17:10:12 +0000 Received: from localhost ([127.0.0.1]:55147 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcq6m-00085p-CC for submit@debbugs.gnu.org; Wed, 21 Feb 2024 12:10:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48230) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcptZ-0004ht-NI for 69302@debbugs.gnu.org; Wed, 21 Feb 2024 11:56:34 -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 1rcpl3-0008WV-7k; Wed, 21 Feb 2024 11:47:45 -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=ofQVT7g62sEJgTdJrwpeenupjuO0qtlaJfyIPf0BMTs=; b=AkDr4bVwNmiGcwmTsDZo BwidyGYdRZO+k2bkAQBovnXHrkbbAK6GschhBNyMluCVuHOlcnWgqR3quiWC9cQNfSXBvOSksn+wZ GhBHCSNprYBGNXeGjA8NKNghLS5qyFVsvNVq6cCr+5zYXIwL9LPlbDqYs9P2HMfJnH7w0RHzHFLls zoLhE9D783kKjqpx5Kvf66NirAQmbYEz1Frdn8uHIJtKUguL3/9bdWcPkqZ51EEonQj+HFfD6b/yr QSwyA9hh5kpKPm9HO6HydVDc45Q6bV2B+2aJyLPoHIWbd9q+hhJDk6OIX9Hr4ZcdlCHrSOwsWGW5M k2QrGHzDdbCq5A==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 21 Feb 2024 17:47:30 +0100 Message-ID: <29cc7ff49d15dda51a3c2eb091a4bf603d1f097b.1708527097.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: -6.16 X-Spam-Score: -6.16 X-Migadu-Queue-Id: E3A805126B X-Migadu-Scanner: mx13.migadu.com X-TUID: lbCUy3xvruOV * 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 e7f59c8bfd..ea2629a768 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17513,6 +17513,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{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