AIX client logging and tracing

This topic describes the logging and tracing capabilities available on SAN File System AIX® clients.

Logs

In AIX, use the syslog utility to enable logging on an AIX client. The log messages are routed through the syslog utility on the AIX operating system. The syslog utility captures log output from the kernel, as well as 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 by modifying the/etc/syslog.conf file.
  • Specifying a file as the destination

    You can specify a file to receive kernel messages, such as /var/adm/ras/messages. Perform the following steps to specify that file:
    1. Create the file /var/adm/ras/messages if it does not already exist. You can use the AIX touch command to create an empty file.
    2. Edit the /etc/syslog.conf file.
    3. Insert this line:

      kern.debug /var/adm/ras/messages

      You can also redirect the kern.debug to /var/spool/mqueue/syslog instead of /var/adm/ras/messages by specifying that file. Create the /var/spool/mqueue/syslog file first by using the touch command.

    4. Restart the syslogd daemon.
      kill -hup syslogd_PID
      Refer to either AIX 5L™ Version 5.1 Commands Reference, Volume 5 or AIX 5L™ Version 5.2 Commands Reference, Volume 5, s-u 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:
    1. Edit the /etc/syslog.conf file.
    2. Insert this line:

      kern.debug /dev/console

    3. Restart the syslogd daemon.
      kill -hup syslogd_PID
      Refer to either AIX 5L Version 5.1 Commands Reference, Volume 5 or AIX 5L Version 5.2 Commands Reference, Volume 5, s-u for more information about the syslogd daemon.

Log messages

When you specify kern.debug as shown in the previous examples, all levels of kernel output are routed because debug is the lowest priority level of kernel output. You can specify a different level of output, such as kern.info to show just informational messages.

The following example messages show the format of log messages:

Apr 21 07:43:50 aixclient1 unix: STFS: disk configuration process created
   with PID = 13348
Apr 21 07:43:50 aixclient1 unix: STFS: cleaner process created with PID 12028
Apr 21 07:43:50 aixclient1 unix: STFS: CSM process created with PID 10860

Traces

The SAN File System client generates trace messages on the AIX 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 disabled by default and you can enable 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.

Viewing SAN File System classes

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.

To view the classes, enter:
sanfstrace list 

Enabling trace messages

By default, SAN File System maintains its messages in the internal ring buffer so that it can recover them after a system crash. To enable or disable tracing on the AIX client, use the sanfstrace set command. For example, to enable tracing on all classes at the same level, enter:
sanfstrace set -level=number 
where number is a level of verbosity of the tracing that increases from 1 to 9.
To enable tracing for selected classes, enter:
sanfstrace set -class=classname -level=number 
Where 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.
Note: To disable tracing for a particular class, enter a zero as the level.

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

Library | Support | Terms of use | Feedback
(C) Copyright IBM Corporation 2003, 2004. All Rights Reserved.
IBM TotalStorage SAN File System v2.2