Go to main content

Managing System Services in Oracle® Solaris 11.4

Exit Print View

Updated: Febuary 2019
 
 

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     Sep_09   lrc:/etc/rc2_d/S47pppd
legacy_run     Sep_09   lrc:/etc/rc2_d/S81dodatadm_udaplt
legacy_run     Sep_09   lrc:/etc/rc2_d/S89PRESERVE
disabled       Sep_09   svc:/system/vbiosd:default
online         Sep_09   svc:/system/early-manifest-import:default
online         Sep_09   svc:/system/svc/restarter:default
...
$ svcs -x vbiosd
svc:/system/vbiosd:default (BIOS call emulation)
 State: disabled since Mon Sep  9 18:42:37 2013
Reason: Temporarily disabled by service method: "vbiosd is not supported on UEFI systems."
   See: http://support.oracle.com/msg/SMF-8000-1S
   See: vbiosd(8)
   See: /var/svc/log/system-vbiosd:default.log
Impact: This service is not running.
$ svcs -xL vbiosd
svc:/system/vbiosd:default (BIOS call emulation)
 State: disabled since Mon Sep  9 18:42:37 2013
Reason: Temporarily disabled by service method: "vbiosd is not supported on UEFI systems."
   See: http://support.oracle.com/msg/SMF-8000-1S
   See: vbiosd(8)
   See: /var/svc/log/system-vbiosd:default.log
Impact: This service is not running.
   Log:
[ Sep  9 18:42:27 Enabled. ]
[ Sep  9 18:42:37 Executing start method ("/lib/svc/method/svc-vbiosd start"). ]
[ Sep  9 18:42:37 Method "start" exited with status 101. ]
[ Sep  9 18:42:37 "start" method requested temporary disable: "vbiosd is not supported on UEFI systems"
 ]

   Use: 'svcs -Lv svc:/system/vbiosd:default' to view the complete log.
$ svcs -L vbiosd
/var/svc/log/system-vbiosd:default.log
$ view `svcs -L vbiosd`

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.