From: "Ludovic Courtès" <ludo@gnu.org>
To: 69302@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#69302] [PATCH 2/2] doc: Add “Inspecting Services” section.
Date: Wed, 21 Feb 2024 17:47:30 +0100 [thread overview]
Message-ID: <29cc7ff49d15dda51a3c2eb091a4bf603d1f097b.1708527097.git.ludo@gnu.org> (raw)
In-Reply-To: <cover.1708527096.git.ludo@gnu.org>
* 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 = (#<service-type localed cabba93>
+ @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
next prev parent reply other threads:[~2024-02-21 19:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 14:58 [bug#69302] [PATCH 0/2] New "Getting Started" section for Guix System Ludovic Courtès
2024-02-21 16:47 ` [bug#69302] [PATCH 1/2] doc: Add “Getting Started with the System” section Ludovic Courtès
2024-02-22 15:57 ` Oleg Pykhalov
2024-02-24 11:26 ` Ludovic Courtès
2024-02-24 22:24 ` Oleg Pykhalov
2024-02-24 22:35 ` Ludovic Courtès
2024-02-25 14:48 ` [bug#69302] [PATCH v2 0/2] New "Getting Started" section for Guix System Ludovic Courtès
2024-02-25 14:48 ` [bug#69302] [PATCH v2 1/2] doc: Add “Getting Started with the System” section Ludovic Courtès
2024-02-27 11:21 ` pelzflorian (Florian Pelz)
2024-02-27 11:39 ` pelzflorian (Florian Pelz)
2024-02-28 21:48 ` Ludovic Courtès
2024-03-01 9:18 ` pelzflorian (Florian Pelz)
2024-03-02 16:28 ` bug#69302: " Ludovic Courtès
2024-02-25 14:48 ` [bug#69302] [PATCH v2 2/2] doc: Add “Inspecting Services” section Ludovic Courtès
2024-02-27 11:54 ` pelzflorian (Florian Pelz)
2024-02-22 19:09 ` [bug#69302] [PATCH 1/2] doc: Add “Getting Started with the System” section pelzflorian (Florian Pelz)
2024-02-24 11:30 ` Ludovic Courtès
2024-02-21 16:47 ` Ludovic Courtès [this message]
2024-02-22 17:56 ` [bug#69302] [PATCH 2/2] doc: Add “Inspecting Services” section pelzflorian (Florian Pelz)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29cc7ff49d15dda51a3c2eb091a4bf603d1f097b.1708527097.git.ludo@gnu.org \
--to=ludo@gnu.org \
--cc=69302@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.