View previous topic :: View next topic |
Author |
Message |
widlokm Tux's lil' helper
Joined: 22 Sep 2007 Posts: 75 Location: Poland
|
Posted: Sat Jan 24, 2015 7:01 pm Post subject: OpenRC - what are you doing? |
|
|
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 |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Sat Jan 24, 2015 7:13 pm Post subject: |
|
|
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 |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54236 Location: 56N 3W
|
Posted: Sat Jan 24, 2015 7:19 pm Post subject: |
|
|
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 |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Jan 24, 2015 10:17 pm Post subject: |
|
|
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 |
|
|
widlokm Tux's lil' helper
Joined: 22 Sep 2007 Posts: 75 Location: Poland
|
Posted: Sun Jan 25, 2015 1:50 pm Post subject: |
|
|
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 |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Mon Jan 26, 2015 6:04 am Post subject: |
|
|
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 |
|
|
|