Sun Management Center 3.6.1 User's Guide

Reading Sun Management Center Log Files

The Sun Management Center server and agents write to various log files in the directory /var/opt/SUNWsymon/log.

These files are circular log files. A circular log file does not grow in size after a certain limit. As new messages are logged into the file, the oldest messages are removed.

Use the es-run interface with the ctail and ccat commands to view these log files. The es-run interface sets up the proper environment to run Sun Management Center utilities. The utilities ccat and ctail display only the relevant data, after sorting the data in chronological order. The ccat and ctail commands are similar to the UNIX cat and tail commands, but are intended for use with Sun Management Center circular log files.

Using ccat to Read Sun Management Center Log Files

The ccat command reads the specified log file, sorts the messages in chronologically ascending order, and writes to the standard output. The ccat command takes one argument, which is the full path to the circular log file.

To use the es-run interface with the ccat command, you type:


# /opt/SUNWsymon/sbin/es-run ccat path_to_file/filename 

Using ctail to Read Sun Management Center Log Files

The ctail command reads the circular log file and by default writes the last 15 lines of the file to standard output.

The ctail command takes four arguments:

filename

The filename argument is the full path name to the circular log file. The filename argument is mandatory.

-f

The -f option is used to monitor the growth of the log file. As the log file grows, the messages appended to the file are also written to the standard output. The ctail -f option is similar to the -f option for the UNIX tail command.

-l

The -l option is used to print the absolute line number at the beginning of each message.

-n

The -n NumOfLines option is used to change the number of lines that are displayed. By default, only the last 15 lines are printed.

To use the es-run interface with the ctail command, you type:


# /opt/SUNWsymon/sbin/es-run ctail [-f, -l, -n NumOfLines] path_to_file_filename