Artix Linux Forum

Init systems => S6 => Topic started by: Funami on 30 November 2021, 13:52:30

Title: [SOLVED] Some beginners questions
Post by: Funami on 30 November 2021, 13:52:30
Title: Re: Some beginners questions
Post by: Dudemanguy on 01 December 2021, 15:18:38
Answering in order here.

Title: Re: Some beginners questions
Post by: Funami on 02 December 2021, 06:41:41
Thanks, that really helped me a lot!  :)
Title: Re: [SOLVED] Some beginners questions
Post by: strajder on 02 December 2021, 07:45:54
In the wiki it says "Note: There is a bundle within default called boot." If that is true, is it possible to see the services in a bundle (e.g. default bundle) as a tree structure?

Not in s6.

66 (https://wiki.artixlinux.org/Main/Suite66) has "trees" and a command to show a tree similar to tree(1).

Where can I find the logs of cronie-s6? It doesn't seem like there is a log service.
/var/log/crond.log

(Disclaimer: I use syslog-ng.)

If you are interested in logs, I recommend installing a file manager like GNU mc, a clone of Norton Commander (sudo pacman -S mc) and going to /var/log in it (Alt+C, then type /var/log inside mc). F3 previews a file and also ends the preview. F10 exits. Some log files require root privileges for reading, so you would have to run it as root, just be careful not to move (F6), delete (F8) or edit (F4) and save any files.
Title: Re: [SOLVED] Some beginners questions
Post by: Funami on 02 December 2021, 15:06:17
Thanks, installing syslog-ng-s6, starting it, and then restarting cronie helped and there is now a file called /var/log/crond.log.  :)
But I'm not so sure, what happens when cronie starts before syslog-ng on startup. Is that a race condition or will the logs work nonetheless?

Quote
Not in s6. 66 has "trees" and a command to show a tree similar to tree(1).
I see, thanks. I will try to create my own tree command, then.

Quote
I recommend installing a file manager like GNU mc, a clone of Norton Commander
I will take a look at it. Currently, I'm just using (sudo) cat.
Title: Re: [SOLVED] Some beginners questions
Post by: Dudemanguy on 02 December 2021, 15:18:32
There's no race condition for any daemon that reads syslog. Stuff that is written to /dev/log before the daemon is up is still read. If you are on "plain" s6, you can also opt to use syslogd-s6 instead of syslog-ng-s6 which integrates directly with s6-log so it works just like all the other logging daemons.
Title: Re: [SOLVED] Some beginners questions
Post by: Funami on 02 December 2021, 15:39:54
Quote
There's no race condition for any daemon that reads syslog. Stuff that is written to /dev/log before the daemon is up is still read.
I see, good to know :)

Just tried syslogd-s6. Does the path of the log file change with using this?
Because when I did
Code: [Select]
sudo s6-rc -d change cronie && sudo s6-rc -u change cronie
I could see a change in the log with syslog-ng-s6. But no changes with syslogd-s6.
Title: Re: [SOLVED] Some beginners questions
Post by: Dudemanguy on 02 December 2021, 15:57:23
Just tried syslogd-s6. Does the path of the log file change with using this?

Yes, the log files are stored in /var/log/syslogd.
Title: Re: [SOLVED] Some beginners questions
Post by: Funami on 02 December 2021, 16:02:46
Quote
Yes, the log files are stored in /var/log/syslogd.
That worked, thanks.  :)