all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* more informative logging for (shepherd) services
@ 2018-10-30 17:10 Florian Dold
  2018-10-31 13:13 ` Maxim Cournoyer
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Dold @ 2018-10-30 17:10 UTC (permalink / raw)
  To: help-guix

Hi Guix,

is there a way to obtain more informative logging from services that are
started directly or indirectly (by GuixSD service) via shepherd?

It seems right now, only what is sent to the syslog is logged.  However,
it would be immensely helpful if

1. the actual commands run by the shepherd for a service
2. the stdout/stderr of the service
3. the exit code of a process when it unexpectedly terminates

would also be available.  Is there there a way to enable this or plans
to implement it?

The make-forkexec-constructor of Shepherd does have a log-file
parameter, so (2) is already kind of possible.  However, some GuixSD
services (for example fcgiwrap) do not allow to pass this option down to
the shepherd service.  Any way around this?

I'm currently struggling to get the fcgiwrap service to run, as the logs
only tell me that it couldn't be started, and that it's getting disabled
after too many retries.

Generally, how do folks debug GuixSD/shepherd services?  I found it
pretty difficult, as it looks like the Guile code that defines a service
is minified and somewhere in the store.  Is there a way to ask shepherd
for the definition of a service?

- Florian

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: more informative logging for (shepherd) services
  2018-10-30 17:10 more informative logging for (shepherd) services Florian Dold
@ 2018-10-31 13:13 ` Maxim Cournoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Cournoyer @ 2018-10-31 13:13 UTC (permalink / raw)
  To: Florian Dold; +Cc: help-guix

Hello Florian,

Florian Dold <me@fdold.eu> writes:

> Hi Guix,
>
> is there a way to obtain more informative logging from services that are
> started directly or indirectly (by GuixSD service) via shepherd?
>
> It seems right now, only what is sent to the syslog is logged.  However,
> it would be immensely helpful if
>
> 1. the actual commands run by the shepherd for a service
> 2. the stdout/stderr of the service
> 3. the exit code of a process when it unexpectedly terminates

I can echo those feature requests :). I find shepherd pretty opaque to
debug (but I do like it :).

> would also be available.  Is there there a way to enable this or plans
> to implement it?

I think it was discussed at some point, have you searched the mailing
list archives?

[...]

> Generally, how do folks debug GuixSD/shepherd services?  I found it
> pretty difficult, as it looks like the Guile code that defines a service
> is minified and somewhere in the store.  Is there a way to ask shepherd
> for the definition of a service?

The indirect way I've been proceeding (based on advice from Ludovic), is
grepping through the requisites of my system profile:

guix gc -R /var/guix/profiles/system | grep yourservice

And then opening that service definition in Emacs with Guix-Emacs
installed. It should reindent the Scheme code to make it readable (it
can be fired manually doing M-x guix-scheme-mode as well).

I hope this helps a bit,

Maxim

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-31 13:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-30 17:10 more informative logging for (shepherd) services Florian Dold
2018-10-31 13:13 ` Maxim Cournoyer

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.