Table of content
Title: Implementing Traceinfo.cti to Diagnose CTI Intelligent Serial Adapters
Date: February 3, 1999
To assess the performance, and assist in the diagnosis of Connect Tech Inc’s Intelligent serial adapters installed in QNX 4.XX, the file traceinfo.cti is distributed for use by our customers. Traceinfo.cti is a filter which must be used to accurately interpret any trace events that may be recorded in the trace buffer. There are several ways in which this may be accomplished; two popular means are by reading in the trace format information each time traceinfo is run, and by appending traceinfo.cti to the existing traceinfo file in the /etc/config directory.
Tracelogging info for Dev.nt960
Dev.nt960 and Dev32.nt960 now support the QNX4 tracelogging features. Run time errors are no longer posted to the active console, but are now posted to “tracelogger”.
Simple usage: traceinfo -e /<tracefile directory>/traceinfo.cti
<tracefile directory> = /usr/nt960 or /etc/config
This will print all trace events recorded in Proc’s trace buffer to the standard output.
Step 1 – Run tracectrl to choose an appropriate severity level to log.
tracectrl -s3 (suggested).
Step 2 – Run tracelogger to log all trace events to a file.
tracelogger -f /<tracefile directory>/nt960.log &
This will run tracelogger as a background task, and record all trace events to the NT960.log file in /usr/nt960
Step 3 – To view the contents of the NT960.log log file:
traceinfo -e /<tracefile directory>/traceinfo.cti /<tracefile directory>/nt960.log
Note: The traceinfo.cti file can also be appended to the /etc/config/traceinfo file for convenience. Refer to the following section.
The detailed usage will log ALL trace events to the supplied log file name. This infomation can be useful for debugging. Some of the interesting events the Dev.nt960 will report to the tracelogger include: Dev.nt960 Started, ACM Reset, Parity & Framing & Overrun errors, CD ON,
CD OFF (HUP) and Break Detect. See KDB-168, or contact Technical support for additional details.
Note: Depending on the users application the tracelogger might log numerous events, causing the harddisk to thrash. The tracectrl utlity can be used to filter what events are recorded in the tracelogger.
tracectrl -s1 (only log severe problems)
0: Major fault SIG:SEG:V, should never happen
1: Severe, Port Restored, i960 Restart, other Hardware problems
2: Parity, Framing, Overruns Errors.
3: HUP, Carrier, Nt960 Booting
6: Very commom messages, should never log.
7: Never, Never log.
Appending traceinfo.cti to /etc/config/traceinfo
Traceinfo.cti may be found in the /etc/config directory upon driver installation. This is where QNX 4’s traceinfo file may be found as well. To append the traceinfo.cti file to the /etc/config/traceinfo file, consider the following procedure:
1) Back up the current traceinfo file:
cp traceinfo traceinfo.bak
2) Append traceinfo.cti to the existing traceinfo file:
cat traceinfo traceinfo.cti > traceinfo.tmp
3) Substitute in the new traceinfo file:
cp traceinfo.tmp traceinfo
4) Now traceinfo may be run without specifying the additional trace format information in the traceinfo.cti file:
traceinfo filename | more
Additional Filtering Options
In addition to using traceinfo, here are some other suggestions to consider:
To direct the traceinfo output to a file:
traceinfo filename > newfile
To search the previous results for trace messages from the NT960 only (consider that messages discarded may be just as important as those that are kept!):
grep -e 3de newfile
To save these results to another file:
grep -e 3de newfile > newfile2
Note: At any point, grep or traceinfo may be piped to more ( | more) to display all information.
These files may be sent to firstname.lastname@example.org for analysis
End of KDB-242