Browse Prior Art Database

A design to provide dynamic tracing and error logging for the device drivers in the Linux* operating system

IP.com Disclosure Number: IPCOM000022537D
Original Publication Date: 2004-Mar-19
Included in the Prior Art Database: 2004-Mar-19
Document File: 6 page(s) / 51K

Publishing Venue

IBM

Abstract

Disclosed is a design that provides a dynamic tracing and error logging functionality that can be implemented in a device driver in the Linux operating system. It provides an appropriate tracing and error logging design for the device drivers in the Linux operating system.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 19% of the total text.

Page 1 of 6

A design to provide dynamic tracing and error logging for the device drivers in the Linux* operating system

1. Background

    Tracing and error logging are very important for the device drivers. Using the tape device driver as an example, tracing and error logging provide a method to verify the data transferred between the upper level tape device drivers and the middle level driver in the Linux SCSI stack. They also provide a tool to track and diagnose any SCSI problems with the host bus adapter device drivers or the attached tape devices. In case of an error occurs, the trace and error logging can often be used determine the root cause of the error.

    Tracing and error logging messages for most device drivers in the SCSI stack of the Linux operation system are logged into a single, shared system log file, normally /var/log/message. Another known solution is to use the Linux /proc file system to check the data stored in the current kernel memory associated with the device driver. The drawbacks of these solutions are as follows:
1. The system log file logs all the kernel messages, and is not dedicated to a certain device driver(s). 1. When all relevant and irrelevant messages are written to a single file, it becomes cumbersome to debug a problem that is only associated with a certain device or device driver.
2. Normally, device drivers run with debug mode set off in their default settings. To enable the debug mode, customers need to remove the driver from memory, and load a new version of the driver into kernel memory with the debug mode enabled. Sometimes a recompile of the device driver is needed to set debug mode on. This may interrupt other jobs running on the server.
3. Examining the /proc file system only shows current data stored in memory. It cannot be used to see data and events associated with previous device driver activity. Having data associated with previous events for SCSI I/O activities is often essential for diagnosing the root cause of an error condition for sequential-accessed devices, such as tape devices.

This disclosed design provides the following capabilities:
1. Customers can designate specific files to which tape I/O activities and errors are logged. Thus, error messages will not go into the system log file, /var/log/messages. This will allow interested parties to be able to easily collect relevant data to diagnose or debug a problem.
2. As I/O to and from the tape devices occurs, relevant trace information is written into the trace file, keeping a history of I/O activity.
3. The size of the trace file is configurable by the user. In addition, when the amount of data gathered exceeds the size specified by the user, the user can choose to save that data in an archive. Thus, if a situation occurs which requires examining a large history, the design naturally supports that requirement.
4. Tracing and error logging may be recorded separately for each logical device. This is especially useful when there are many devices...