I now have both my machines running OpenRC and have logging turned on in /etc/rc.conf with rc_loger="YES". As I have been playing around with OpenRC I have been looking at /var/log/rc.log and it is quite interesting.
Each chunk of the output has timestamps aroung it in the style :-
rc sysinit logging started at Wed May 30 08:21:28 2018
...
rc sysinit logging stopped at Wed May 30 08:21:28 2018
The chunks seem to include sysinit, default and off. This is probably quite reasonable although there is an oddity, in that the rc off chunks are repeated 3 times in all, Twice next to each other and then again after a reboot, following the rc sysinit chunk, with the actual times being repeated, followed by a repeat of the sysinit chunk! Only the first appearance of the off chunk actually has the closing timestamp. I wonder whether there is a problem with doing some of the logging when the disk may not be available and the info is stored in memory and then cleared to disk later, but it seems to be carried over a boot from cold! This is not a major problem, although it is a bit untidy and rc.log will grow quicker that necessary.
If the time stamps are to be believed then the length of time taken for each stage would appear to be
sysinit <1 sec.
default ~12 sec.
off ~4 sec. which includes saving the dependency cache
I have also tried turning on the parallel boot in /etc/rc.conf with rc_parallel="YES". So far this has not caused any hangs. The logging gets a bit more interesting as the messages from the parallel daemons gets interleaved. This is a sort of "you asked for it, you got it"! To help you decipher the logs, each part of a message is prefixed by the name of the service. Is it any faster? Well, looking at the timestamps again :-
sysinit <1 sec.
default ~6 sec.
off ~1 sec. which still includes saving the dependency cache
So you might think that the boot is 6s faster and shutdown 3s faster. I'm not sure that it is that obvious when you are sat in front of the machine.
Looking at the logs like this, you tend to notice error messages that you might have otherwise missed. I spotted that this line appears a couple of times :-
networking |/sbin/dhclient-script: 10: [: =: unexpected operator
I assume that this is supposed to be an error on line 10. Having a look at /sbin/dhclient-script and depending on how you count the lines (!) I can see
while ! { : >> "$file"; } 2>/dev/null; do
but I don't know if this is where or what the problem might be. Anyway dhcp seems to work.
Geoff
]]>Geoff
]]>https://dev1galaxy.org/viewtopic.php?id=2078
Geoff
]]>I have tried editing /etc/rc.conf to set rc_logger="YES" in order to see what it was logging. Originally I also set rc_verbose="YES", but that put out too much info for me, but with that turned off the logging was quite reasonable.
Geoff
]]>You can see some of the housekeeping in /run/openrc.
Geoff
]]>https://github.com/OpenRC/openrc
This includes a user guide as well as various scripts.
Geoff
]]>I have been running runit as a process supervisor, which I chose to roll back before installing OpenRC. I report that in my thread on runit.
https://dev1galaxy.org/viewtopic.php?id=1748
The next thing was to install Openrc. Synaptic wanted to remove bum and sysv-rc and also install libeinfo1 and librc1. The installation proceeds normally producing the following warning :-
**********************************************************************
*** WARNING: if you are replacing sysv-rc by OpenRC, then you must ***
*** reboot immediately using the following command: ***
for file in /etc/rc0.d/K*; do s=`basename $(readlink "$file")` ; /etc/init.d/$s stop; done
**********************************************************************
I had seen a mesage on DNG that the above command hangs the system and that you should just reboot,
so I did just reboot and everything came back up normally.
https://lists.dyne.org/lurker/message/2 … d7.en.html
The next qustion was "is openrc running?" Running ps uaxf shows :-
root 1 1.6 0.0 15816 1884 ? Ss 15:59 0:00 init [2]
Switching to the console with <CTRL><ALT><F1> does not show any messages referring to openrc.
Checking with synaptic, openrc is installed ;-)
There are a couple of commands to check how things are running. You can run rc-status as yourself while rc-update show needs to be run as root. These seem to show that the services are running under openrc. It is also possible to check a specific service with, e.g. :
/etc/init.d/lxdm status
[ ok ] lxdm is running.
There is some documentation at :-
https://wiki.gentoo.org/wiki/OpenRC
I am hoping to try using runit under OpenRC
https://wiki.gentoo.org/wiki/Runit#runitintegration
Geoff
]]>