Manage Log Files Using CLE and HSS Commands
Introduction to various log files.
Boot, diagnostic, and other Hardware Supervisory System (HSS) events are logged on the SMW in the /var/opt/cray/log directory, which is created during the installation process. The time-stamped bootinfo, console, consumer, and netwatch log files are located in the /var/opt/cray/log/sessionid directory by default.
For example, the HSS xtbootsys command starts the xtconsole command, which redirects the output to a time-stamped log file, such as /var/opt/cray/log/p0-20120716t104708/console-20120716.
The SMWinstall, SMWconfig, and SMWinstallCLE commands create several detailed log files in the /var/adm/cray/logs directory. The log files are named using the PID of the SMWinstall or the SMWinstallCLE command; the exact names are displayed when the command is invoked.
CLE logs are saved on the SMW in /var/opt/cray/log/sessionid.
Controller logs are saved on the SMW in /var/opt/cray/log/controller/cabinet/controller/messages-yyyymmdd, where cabinet is of the form c0-0, c1-0, etc.; and controller is either of the form c0-0, c1-0 for cabinet controllers (CC) or c0-0c0s0 for blade controllers (BC) .
For more information, see the intro_llm_logfiles(5) man page.
Filter the Event Log
The xtlogfilter command enables the system administrator to filter the event log for information such as the time a particular event occurred or messages from a particular cabinet.
For more information, see the xtlogfilter(8) man page.
Finding information in the event log
For this example, search for all console messages from node c9-2c0s3n2:
crayadm@smw> xtlogfilter -f /var/opt/cray/log/event-yyyymmdd c9-2c0s3n2
Add Entries to Log Files
The system administrator can add entries (e.g., the start or finish of system activities) to the syslog with the logger command. The entry is then available to anyone who reads the log.
For more information, see the logger(1) man page.
Add entries to syslog file
For this example, mark the start of a new system test:
login# logger -is "Start of test 4A $(date) " Start of test 4A Thu Jul 14 16:20:43 CDT 2011
The system log shows:
Jul 14 16:20:43 nid00003 xx[21332]: Start of test 4A Thu Jul 13 16:20:43 CDT 2012
Examine Log Files
Time-stamped log files of boot, diagnostic and other HSS events are located on the SMW in the /var/opt/cray/log directory. The time-stamped bootinfo, console, consumer, and netwatch log files are located in the /var/opt/cray/log/sessionid directory by default.
For example, the HSS xtbootsys command starts the xtconsole command, which redirects the output to a time-stamped log file, such as /var/opt/cray/log/p0-20120716t104708/console-20120716.
The SMWinstall, SMWconfig, and SMWinstallCLE commands create several detailed log files in the /var/adm/cray/logs directory. The log files are named using the PID of the SMWinstall or the SMWinstallCLE command; the exact names are displayed when the command is invoked.
Remove Old Log Files
The xttrim utility provides a simple and configurable method to automate the compression and deletion of old log files. The xttrim utility is intended to be run on the SMW from cron and is automatically configured to do this as part of the SMW software installation process. Review the xttrim.conf configuration file and ensure that xttrim will manage the desired directories and that the compression and deletion times are appropriate.
The xttrim utility does not perform any action unless the --confirm flag is used (to avoid unintended actions), nor will xttrim perform any action on open files. All actions are based on file-modified time.
For additional information, see the xttrim(8) and xttrim.conf(5) man pages.