This topic describes the logging and tracing capabilities available on SAN File System Solaris clients.
In Solaris, use the syslog utility to enable logging on a Solaris client. The log messages are routed through the syslog utility on the Solaris operating system. The syslog utility captures log output from the kernel and other operating system services. By default, the syslog utility discards all kernel output; however, you can configure the syslog utility to specify a destination for the messages.
kern.debug /var/log/messages
/sbin/service syslog restartRefer to the Solaris Commands Reference for more information about the syslogd daemon.
Specifying the console as the destination
Perform the following steps to specify the console as the destination for kernel messages:
kern.debug /dev/console
/sbin/service syslog restartRefer to the Solaris Commands Reference for more information about the syslogd daemon.
Log messages
The following example messages show the format of log messages created by the Solaris client code that resides in the kernel:
Apr 29 19:30:08 gas sanfs: [ID 967454 kern.warning] WARNING: csmGetRequest: \tmGetServerRequest() failed. tmrc:7 Apr 29 19:33:39 gas sanfs: [ID 991888 kern.warning] WARNING: Lost lease with server 0 lease 0x3000488cde0. Apr 29 19:34:51 gas sanfs: [ID 733070 kern.notice] NOTICE: TmProcessIdentifyResp : clusterId:15022 installationId:740883aae7649163
The following example messages show the format of log messages created by the Solaris FlexSAN daemon:
Apr 29 19:34:53 gas sanfsd[1007]: [ID 826785 daemon.error] Couldn't send the SCSI command 0x12 to device /dev/dsk/c0t1d0s2: I/O error Apr 29 19:34:54 gas sanfsd[1007]: [ID 518328 daemon.error] Failed to add the disk /dev/dsk/c2t9d0s2 for /mnt/mwytank Apr 29 19:34:54 gas sanfsd[1007]: [ID 484526 daemon.error] osDoDiscoverVols: failed to add device /dev/rdsk/c2t9d0s2
The SAN File System client generates trace messages on the Solaris operating system. Trace messages are recorded in a memory-based trace buffer. The trace buffer is a circular buffer. Trace messages are overwritten with new messages when the buffer overflows.
First failure tracing is enabled by default and cannot be disabled. All other tracing levels are enabled by default and you can disable them using the sanfstrace set utility.
Use the sanfstrace log utility to retrieve logged trace messages from the trace buffer and append them in text format to a specified log file. If you do not specify a file, SAN File System sends the messages to the standard output device.
You can use the sanfstrace utility to set and list levels of tracing.
Tracing in SAN File System is controlled by components called classes. A class loosely corresponds to a file system operation such as mounting or reading. Every trace class has an associated level of output. The higher you set the level of the trace class, the greater number of trace messages you receive from the class. A trace class set at level zero is disabled. When SAN File System encounters trace messages in the classes, it saves them to the internal ring buffer. No output is generated until you retrieve them using the sanfstrace log utility.
sanfstrace list
sanfstrace set -level=numberwhere number is a level of verbosity of the tracing that increases from 1 to 9.
sanfstrace set -class=classname -level=numberWhere classname is the class for which you are enabling tracing, and number is the level of tracing that increases from 1 to 9. You can set as many classes as needed by separating them with a comma and no spaces.
The following example messages show the format of trace messages:
Apr 28 13:17:09 aixclient1 unix: STFS: 1051550182.439290 50337 STFS traceBuf_daemonize: going to sleep till shutdown Apr 28 13:17:09 aixclient1 unix: STFS: 1051550182.448769 196267 STFS CSM OS-dependent services initialized. Apr 28 13:17:09 aixclient1 unix: STFS: 1051550182.448827 196267 STFS Pager Strategy initialized. Apr 28 13:17:09 aixclient1 unix: STFS: 1051550182.448875 196267 STFS GFS hooks initialized. Apr 28 13:17:09 aixclient1 unix: STFS: 1051550182.448969 196267 STFS doInit(): system Initialized
Parent topic: Client diagnostic tools