Bus-Tech > Support > Mainframe Appliance for Storage > Technical Library
Knowledge
Base
Mainframe Appliance for Storage

Mainframe Appliance for Storage
Traces and Logs

The Mainframe Appliance for Storage has several internal traces built in to assist in debugging problems within the MAS or with file transfer problems.



MAS Software Traces

The MAS virtual tape tasks contain a tracing facility that can be used to assist Bus-Tech Support in debugging problems. Normally, tracing is disabled for performance reasons, and should be left off unless you are directed to do otherwise by Bus-Tech Support.

Tracing can be enabled on a virtual device by device basis in the MAS configuration file, by specifying the TRACE=n keyword parameter. Valid values range from 0 (tracing off) to 4 (lots of tracing).

Tracing can also be enabled and disabled on the fly with the MAS operator's SET command. The format is:

    SET TRACE=n [DEVICE=devicename] 
where n ranges from 0 (tracing off) to 4 (lots of tracing). If a specific virtual DEVICE is specified by name, the trace setting is only changed on that one device. If no DEVICE is specified, the trace setting is changed on all devices at once.

The MAS creates a separate a trace file for each virtual tape task. The output trace files can be found in the directory /var/bti/log. The trace files are named btitrc.devicename, where devicename is the virtual drive name.

Once enabled, up to 1 megabyte of trace data is stored in each trace file in a continuous wrap-around fashion. Since the trace continuously wraps around, it is important to stop the trace as soon as possible after capturing the event you want to trace.

When tracing is no longer required, you can turn it off by entering the MAS operator command SET TRACE=0. If tracing was enabled in the configuration file, be sure to reconfigure it off there too. Otherwise, tracing will resume the next time the MAS is restarted.

top



MAS Log Files

The MAS maintains a console log file of all messages displayed on its operator console. The console log files may be helpful in analyzing tape usage, auditing tape creation and deletions, or debugging operational problems.

The log file(s) can be found in the directory /var/bti/log. The most current log file is named btilog. Older logs are kept in files called btilog_nn. The next most recent log file is btilog_01, the next oldest after that is btilog_02, etc.; the oldest log file has the highest number. When the current log file, btilog, reaches approximately 1 MB in size, the log file(s) are "rotated" - all the btilog_nn files are all renamed to one higher number, btilog is renamed to btilog_01, and logging continues in a brand new btilog file.

top



MAS Firmware Traces

The firmware in the MAS channel interface adapters have a trace facility that can be useful in debugging problems on the channel interface. The firmware trace can be enabled or disabled and the trace data can be saved to a disk with the following MAS operator console commands.

To turn on the firmware trace, enter the following MAS command:

    enable firmware trace

While the firmware trace is enabled, the trace data is continuously captured to a wrap-around buffer in memory on the interface adapters(s). To save the current trace data to disk, enter the following MAS command:

       save trace
The trace data will be saved to files named btinn.trb, where nn is a number that is incremented each time you save a trace, so that multiple traces can be saved without losing any previous trace files.  Be sure to note the filename(s) that your trace was saved under.

To turn off the channel adapter firmware trace, enter the following MAS command:

    disable firmware trace

top



Copying Trace Files to a Floppy

The Linux mcopy utility can be used to copy trace and log files from the MAS onto a diskette. First, bring up a terminal session by clicking on the "shell" icon in the bottom left corner of the MAS console.

Compressing the files

You will probably find that the file(s) you want to back up are larger than the capacity of a floppy disk. If so, the Linux tar program can be used to package file(s) into a smaller compressed archive file format. The common Windows unzip programs (PKZIP, WINZIP, etc.) know how to uncompress these tar files.

The general format of the tar command is

    tar -zcf filename.tgz file1 file2 file3 ...etc...
where:
  • -zcf are switches that say to create a new, compressed output file;
  • filename.tgz is the output archive filename;
  • file1 file2 file3 ...etc... are the input file(s) to be put into the compressed output archive file.
For example, to gather up all the trace files in the /var/bti/log directory into a file called traces.tgz, enter:
    tar -zcf traces.tgz /var/bti/log/*trc* 

Or, to gather up all the traces and log files at once, enter:

    tar -zcf traces.tgz /var/bti/log/* 

Copying the files

Once you've tar'ed all the files into a compressed archive file, you can use the mcopy program to copy the files to a diskette. The format of the mcopy command is:

    mcopy filename a: 
For example, to copy the archive file traces.tgz to the floppy, enter:
    mcopy /var/bti/log/traces.tgz a: 




Copyright © 2004 by Bus-Tech, Inc.