Go to main content

Managing System Services in Oracle® Solaris 11.4

Exit Print View

Updated: February 2022
 
 

Viewing Service Log Files

SMF records information about significant restarter actions, method standard output, and standard error output to /var/svc/log/service:instance.log for each service instance. Hyphens are substituted for forward slashes in the service name in the log file name. The svcs command with the -L, -l, or -x option shows the full path name of the log file for the specified service instance. The svcs -xL command shows the last few lines of the log file and tells you to use the svcs -Lv command to view the complete log file. The svcs -Lv command displays the complete file, which could be quite long. If you prefer to view the log file in an editor or view just the last n entries, for example, operate on the output of the svcs -L command.

The following example shows how to use the log file to investigate why the service shown in the svcs listing is temporarily disabled.

$ svcs
STATE          STIME        FMRI
legacy_run     13:50:15     lrc:/etc/rc2_d/S89PRESERVE
disabled       13:49:11     svc:/platform/i86pc/acpihpd:default
online         13:48:41     svc:/system/early-manifest-import:default
online         13:48:41     svc:/system/svc/restarter:default
$ svcs -x acpihpd
svc:/platform/i86pc/acpihpd:default (Intel ACPI hot-plug daemon)
 State: disabled since July  8, 2020 at  1:49:11 PM PDT
Reason: Temporarily disabled by service method: "no acpidr device was found on this system."
   See: http://support.oracle.com/msg/SMF-8000-1S
   See: acpihpd(8)
   See: /var/svc/log/platform-i86pc-acpihpd:default.log
Impact: This service is not running.
$ svcs -xL acpihpd
svc:/platform/i86pc/acpihpd:default (Intel ACPI hot-plug daemon)
 State: disabled since July  8, 2020 at  1:49:11 PM PDT
Reason: Temporarily disabled by service method: "no acpidr device was found on this system."
   See: http://support.oracle.com/msg/SMF-8000-1S
   See: acpihpd(8)
   See: /var/svc/log/platform-i86pc-acpihpd:default.log
Impact: This service is not running.
   Log:
[ 2020 Mar  3 09:43:45 Enabled. ]
[ 2020 Mar  3 09:44:09 Executing start method ("/lib/svc/method/svc-acpihpd"). ]
[ 2020 Mar  3 09:44:09 Method "start" exited with status 101. ]
[ 2020 Mar  3 09:44:09 "start" method requested temporary disable: "no acpidr device was found on this system"
 ]
[ 2020 Jul  8 13:48:47 Enabled. ]
[ 2020 Jul  8 13:49:11 Executing start method ("/lib/svc/method/svc-acpihpd"). ]
[ 2020 Jul  8 13:49:11 Method "start" exited with status 101. ]
[ 2020 Jul  8 13:49:11 "start" method requested temporary disable: "no acpidr device was found on this system"
 ]

   Use: 'svcs -Lv svc:/platform/i86pc/acpihpd:default' to view the complete log.
$ svcs -L acpihpd
/var/svc/log/platform-i86pc-acpihpd:default.log
$ view `svcs -L acpihpd`

Other log files that you might find useful include the log for the master restarter daemon and the system log. To see the log file name and view the log file for the svc.startd restarter daemon, use the service name restarter with the svcs command. To see the log file name and view the log file for the syslogd system log daemon, use the service name system-log.

$ svcs -L restarter
/var/svc/log/svc.startd.log
$ svcs -L system-log
/var/svc/log/system-system-log:default.log
/var/svc/log/system-system-log:rsyslog.log

See Specifying the Amount of Startup Messaging for instructions to change the amount of messaging you see on system boot. See Configuring Notification of State Transition and FMA Events for instructions to configure services to notify you when they transition into or out of a service state or when an FMA event occurs.