1. Field of Invention
This invention relates in general to the boot time associated with a device. More specifically, the invention relates to methods and systems for generating the console log of a device.
2. Description of the Background Art
Hardware devices, such as routers, have the provision to access diagnostic information pertaining to the device. Apart from diagnostic information, console logs for copyright and agreement notices may also be generated by means of this provision. The diagnostic information may be generated or provided during powering on of a device, after powering on the device, or if the device sends a special message during its normal functioning. The diagnostic information is made accessible to a user by generating a console log. The device provides a console port through which the diagnostic information may be transmitted to generate the console log. The console port may consist of a Universal Asynchronous Receiver Transmitter (UART). The UART may be interrupt-driven or poll-driven. It may also contain First In First Out (FIFO) memory, which allows for more than one byte to be queued for transmission. The UART may also have associated control signals that allow the detection of a data terminal or a modem. It may support synchronous or asynchronous calls. Synchronous calls are usually used for printing critical information. However, in such a system, the powering on time of the device is increased substantially, since the information is sent to the console log during the powering on. Also, all the processes are blocked till the critical information has been written or printed to the console log. Typically, a console log printout causes a delay of a minimum of 60 milliseconds and a maximum of 700 milliseconds. Thus, critical information after booting, or any information (i.e., critical or otherwise) during booting, may be written or printed using polling in a synchronous fashion; that is, all process(es) in the platform are blocked until critical information has been written or printed to a console port. This is necessary to guarantee that any message is in fact printed during failure cases. However, this assumes that there is “listener” for the information.
What is needed is an apparatus and method for optimizing a console log by by-passing synchronous (blocking) writing or printing to the console log when no “listener” is present. What is further needed is an apparatus and method for altering or changing the behavior of a print process to a console log, and to not stop processing other tasks, after detecting that no “listener” is present.