Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] visualise openrc initscript start order and dependency tree
Date: Sun, 10 Nov 2019 12:16:36
Message-Id: CAGfcS_=Azv-AOhszjgshDM=OwfZD4T2Cc-jcFe1f4Frj65_mOg@mail.gmail.com
In Reply to: Re: [gentoo-user] visualise openrc initscript start order and dependency tree by "J. Roeleveld"
1 On Sat, Nov 9, 2019 at 7:01 AM J. Roeleveld <joost@××××××××.org> wrote:
2 >
3 > On 9 November 2019 11:42:38 CET, Neil Bothwick <neil@××××××××××.uk> wrote:
4 > >On Fri, 08 Nov 2019 21:03:13 +0100, J. Roeleveld wrote:
5 > >
6 > >> I had a similar issue and ended up checking every init-script, conf.d
7 > >> file and rc.conf entry and making a dependency-tree manually on a big
8 > >> white-board.
9 > >>
10 > >> I haven't found a tool that does this automatically yet.
11 > >
12 > >systemd's systemctl ;-)
13 > >
14 > >I'll get my coat...
15 >
16 > Does this parse openrc scripts correctly?
17
18 Only if somebody has created a generator for openrc, which I doubt.
19 It was obviously a semi-trollish comment.
20
21 That said, if somebody is looking to write a utility and wants to see
22 what else is out there, systemd has a couple of useful utilities that
23 work along these lines.
24
25 For example, a short snippet out of systemctl list-dependencies:
26 ● ├─remote-fs.target
27 ● │ ├─mnt-lizardfs.mount
28 ● │ ├─var-lib-machines.mount
29 ● │ └─nfs-client.target
30 ● │ ├─auth-rpcgss-module.service
31 ● │ ├─rpc-statd-notify.service
32 ● │ └─remote-fs-pre.target
33
34 (The full output is obviously long on any complex host, but this gives
35 an idea. A target is basically a virtual service - similar to a
36 virtual package like plasma-meta.)
37
38 There are also some tools in systemd-analyze that give you
39 bootchart-like capabilities based on log scanning. It can figure out
40 the critical path to getting to your target runlevel and what services
41 slowed that down the most (though on a really busy host you need to
42 bear in mind that other stuff was launching in parallel so the times
43 given aren't what you'd get if nothing else was running.)
44
45 Oh, and while bootchart doesn't really show dependencies (at least I
46 don't think it does), if you haven't checked it out you might still
47 find it useful. I believe that does work with openrc, and it at least
48 helps you see where the system is spending its time at boot.
49
50 --
51 Rich

Replies

Subject Author
Re: [gentoo-user] visualise openrc initscript start order and dependency tree Wols Lists <antlists@××××××××××××.uk>