unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: rendaw <7e9wc56emjakcm@s.rendaw.me>
Cc: help-guix@gnu.org
Subject: Re: Services and log management/monitoring
Date: Wed, 17 Apr 2019 23:20:49 +0200	[thread overview]
Message-ID: <87bm1472ha.fsf@gnu.org> (raw)
In-Reply-To: <67f09d8d-3ca6-90a0-6e72-c85ec9d1572f@s.rendaw.me> (rendaw's message of "Mon, 15 Apr 2019 03:12:23 +0900")

Hello!

The kind of “service” that Guix manages is those described here:

  https://www.gnu.org/software/guix/manual/en/html_node/Service-Composition.html

The first paragraph tries to explain it:

  Here we define a “service” as, broadly, something that extends the
  functionality of the operating system.  Often a service is a process—a
  “daemon”—started when the system boots: a secure shell server, a Web
  server, the Guix build daemon, etc.  Sometimes a service is a daemon
  whose execution can be triggered by another daemon—e.g., an FTP server
  started by ‘inetd’ or a D-Bus service activated by ‘dbus-daemon’.
  Occasionally, a service does not map to a daemon.  For instance, the
  “account” service collects user accounts and makes sure they exist when
  the system runs; the “udev” service collects device management rules and
  makes them available to the eudev daemon; the ‘/etc’ service populates
  the ‘/etc’ directory of the system.

For services that “map to a daemon”, you’d extend
‘shepherd-root-service-type’ by providing a Shepherd service.  A
Shepherd service is a service managed by PID 1.  You can list them on a
running system by running ‘herd status’ as root.

IOW, Shepherd services are a special case of service.  Just like D-Bus
services are another special case, etc.

About logging: Shepherd does very little in that area.  It limits itself
to providing a #:log-file parameter to capture the processes’s
stdout/stderr to a file.  Other than that we usually configure daemons
to write to syslog, which provides more flexibility regarding storage
and filtering of log entries.

A “non-Shepherd service” as you call them doesn’t necessarily map to a
process, so there’s potentially nothing to log in the first place.

Does that answer your questions?

Thanks,
Ludo’.

  reply	other threads:[~2019-04-17 21:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-14 18:12 Services and log management/monitoring rendaw
2019-04-17 21:20 ` Ludovic Courtès [this message]
2019-04-18 15:11   ` rendaw
2019-04-19 12:09     ` Ludovic Courtès
2019-04-19 15:47       ` rendaw
2019-05-04  7:01         ` Chris Marusich
2019-05-04  8:01           ` rendaw
2019-05-04  8:24             ` Chris Marusich
2019-05-04  8:32               ` rendaw

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bm1472ha.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=7e9wc56emjakcm@s.rendaw.me \
    --cc=help-guix@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).