Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OpenRC - what are you doing?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
widlokm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2007
Posts: 75
Location: Poland

PostPosted: Sat Jan 24, 2015 7:01 pm    Post subject: OpenRC - what are you doing? Reply with quote

Dear Members,

Recently I've updated rather old gentoo system, switching to eudev and openrc in the process. The installation went great and now system works nice with default eudev and openrc configuration. For a long time I've used very basic sysvinit configuration, now I want to stick to openrc.

Is there any way to find out exactly what openrc is doing when booting? I know about openrc log, interactive mode or rc.conf file (rc_verbose=yes) - these are OK, but I would like to get still more verbose output. For example what command is used when "* Loading key mapping [US] ... [ok]"?

Thanks in advance,
Michael Widlok

PS. I DO NOT have a probelm with openrc, booting or kernel now - I just like to know what my PC is doing :-).
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Jan 24, 2015 7:13 pm    Post subject: Reply with quote

You can look at the source code of the init scripts in "/etc/init.d/". Some of the commands that are invoked by the init scripts take command line options that will increase verbosity and that can be set in the configuration files for the init scripts in "/etc/conf.d/". To see what can be done, you need to look at the man pages for the individual commands you find in the source code of the init scripts themselves. Absent that, you've already set up for maximum verbosity.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54236
Location: 56N 3W

PostPosted: Sat Jan 24, 2015 7:19 pm    Post subject: Reply with quote

widlokm,

OpenRC works its way through the services defined to start in the various runlevels.
Ordering is defined by the requires, needs, befores, after etc statements in the files in /etc/init.d
Thus openrc will start services that are needed but not explicitly listed (by you) in any runlevel.

The configurations come (mostly from) /etc/conf.d/

Read /etc/init.d/keymaps to see what openrc is doing when it sets your keymap and /etc/conf.d/keymaps to see where the setting comes from.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Sat Jan 24, 2015 10:17 pm    Post subject: Reply with quote

If you want to easily see exactly what happens at boot, try app-benchmarks/bootchart2: there's a verbose option that makes it graph a tree of every process being run, with their full command lines intact. If you need more than that, there's always the raw audit logs...
Back to top
View user's profile Send private message
widlokm
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2007
Posts: 75
Location: Poland

PostPosted: Sun Jan 25, 2015 1:50 pm    Post subject: Reply with quote

Thank You for help!

I'm a bit surprised that there is no simple way to instruct openrc to print commands it is executing, or logging them somewhere. Am I the only person interested :-)?

I've just installed bootchart2, and I will try it in a few minutes, thanks for pointing out this package!

Best Regards,
Michael Widlok

PS. bootchart2 works great, I wish I knew about it earlier...
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Jan 26, 2015 6:04 am    Post subject: Reply with quote

widlokm wrote:
I'm a bit surprised that there is no simple way to instruct openrc to print commands it is executing, or logging them somewhere. Am I the only person interested :-)?

The only time you really need to do that is when debugging an /etc/init.d runscript.

In that case, we'd just fall back to shell scripting, and use: set -x before the bit we're interested in, and set +x after.

I tend to save those off to an error/log file when it's needed. So I: exec 2>/var/log/foo.init before hand. Though I use a dir under /etc for early-boot/late-shutdown things, like lvm.

Before you get to that stage though, you normally need to inspect initscript dependencies first. That's the tricky part, ime.

HTH,
steveL.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum