where to check failed service at system boot

rawandnet
rawandnet used Ask the Experts™
on
Hi to all,

While Linux server was booting, a service failed to startup, I don’t remember the name, where can I check under log files which service faild to start at boot time?

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
hi,

you will find the logs in /var/svc/log

thanks,
Sasi

Author

Commented:
there isn't no /var/svc folder. do you mean /var/log/?
there are lots of files under /var/log, which one gives info about services?
try the /var/log/boot.log in Linux.
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

If the service doesn't start up, you should also see some errors on the /var/log/mesages file.

Good luck
To check log first find out where is the service writing log. This can be found in /etc/syslog.conf. Based on the information in this file check the log file.

Author

Commented:
from /dev/syslog.conf, it sould be under /var/log/boot.log, but this file is empty.
(((((((((((
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.
mail.*                                                  -/var/log/maillog

# Log cron stuff
cron.*                                                  /var/log/cron

# Everybody gets emergency messages
*.emerg                                                 *

# Save news errors of level crit and higher in a special file.
uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log
local7.*                                                /var/log/boot.log
Hi,

Here is an excerpt from Bugzilla.redhat.com. Try doing this and see if boot.log gets populated.

Putting in a workaround for anyone who is curious:

* You need to edit /etc/init.d/functions file. There are 4 points: success,
failure, passed, warning.


* before:

:
# Log that something succeeded
success() {
  #if [ -z "${IN_INITLOG:-}" ]; then
  #   initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
  #fi
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_success
  return 0
}
:

* after:

:
# Log that something succeeded
success() {
  if [ -z "${IN_INITLOG:-}" ]; then
     initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
  fi
  [ "$BOOTUP" != "verbose" -a -z "${LSB:-}" ] && echo_success
  return 0
}
:


Do this to all four functions.  Note:  Your console will be flooded by each
service echoing out: "WARNING: initlog is deprecated and will be removed in a
future release" but /var/log/boot.log will be populated.

From - https://bugzilla.redhat.com/show_bug.cgi?id=151238

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial