Source: https://patents.google.com/patent/US7500154B2/en
Timestamp: 2020-01-20 09:34:56
Document Index: 634137772

Matched Legal Cases: ['ART 108', 'ART 108', 'ART 108', 'ART 102', 'ART.\n10', 'ART.\n18', 'ART.\n22']

US7500154B2 - Method and system for generating a console log - Google Patents
Method and system for generating a console log Download PDF
US7500154B2
US7500154B2 US11/016,094 US1609404A US7500154B2 US 7500154 B2 US7500154 B2 US 7500154B2 US 1609404 A US1609404 A US 1609404A US 7500154 B2 US7500154 B2 US 7500154B2
US11/016,094
US20060143529A1 (en
2004-12-17 Application filed by Cisco Technology Inc filed Critical Cisco Technology Inc
2004-12-17 Priority to US11/016,094 priority Critical patent/US7500154B2/en
2004-12-17 Assigned to CISCO TECHNOLOGY, INC. reassignment CISCO TECHNOLOGY, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: MOLTENI, MARCO, MOON, BILLY G., SCHNELL, MARK
2006-06-29 Publication of US20060143529A1 publication Critical patent/US20060143529A1/en
2009-03-03 Publication of US7500154B2 publication Critical patent/US7500154B2/en
A method and system are provided for generating a console log of a device (e.g., a router). During the powering on of the device, certain information may have to be written to the console log. If the information to be written is critical, the console log is generated. In case the information is non-critical, the system checks whether a console device is connected to the device. If a console device is connected to the device, the information is written to the console log. Otherwise, if there is no console device connected to the device, the information is not written to the console log.
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.
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.
In one embodiment, the invention provides a method for generating a console log of a device when the device is powered on. The console log is generated in response to a request from the device to write information to the console log. The method comprises the steps of (i) checking whether the information is critical, and (ii) writing the information to the console log if it is critical. If the information is not critical, the method comprises checking for the presence of a console device attached to a console port, and by-passing writing information to the console log if the console device is not detected. Therefore, an embodiment of the present invention provides a method comprising: (i) checking whether the information is critical, (ii) writing the information to the console log if it is critical; else (iii) checking for the presence of a console device attached to a console port, and (iv) by-passing writing the information to the console log if the console device is not detected.
In another embodiment of the invention, a method for generating a console log of a device is provided. The method comprises (i) writing critical information to the console log during the powering on of the device, (ii) writing non-critical information to the console log during the powering on of the device if a console device is attached to a console port of the device, (iii) checking whether the device has a message to display once it is powered on, and (iv) writing the message to the console log if the console device is detected.
In another embodiment, the invention provides a method for generating a console log of a device when the device is powered on. The console log is generated in response to a request from the device to write information to the console log. The method comprises (i) checking for the presence of a console device attached to a console port, (ii) by-passing writing the information to the console log if the console device is not detected, and (iii) writing the information to the console log if the console device is detected.
In another embodiment, the invention provides a system for generating a console log of a device when the device is powered on. The device sends a request to write information to the console log. The system comprises (i) means for checking whether the information is critical, (ii) means for writing the information to the console log, and (iii) means for checking for the presence of a console device attached to a console port. The information is not written to the console log if the console device is not detected.
In another embodiment, the invention provides a system for generating a console log of a router. The system comprises (i) an information writer for writing information to the console log, (ii) a console checker for checking whether a console device is connected to a console port of the device, wherein the information is not written to the console log if the console device is not detected, (iii) and a message checker for checking whether the device has a message to write to the console log once it is powered on.
FIG. 1 illustrates a schematic diagram of the environment wherein a console log generator can be implemented, in accordance with an exemplary embodiment of the present invention.
FIG. 2 illustrates a schematic diagram of a console log generator, in accordance with an exemplary embodiment of the invention.
FIG. 3 illustrates a flow diagram describing a method for generating a console log during the powering on of a device, in accordance with an exemplary embodiment of the invention.
FIG. 4 illustrates a flow diagram describing the method for generating the console log after a request to write the information to the console log has been given, in accordance with an exemplary embodiment of the invention.
The invention provides a method and system to generate a console log for devices, such as routers. During the powering on of the device, diagnostic information relating to the device may be written to a console log. Also, after the powering on, the device may send a message that is to be written to the console log. In various embodiments of the invention, the diagnostic information may be printed by means of a console device. It is to be noted that the process of writing to the console device is hereinafter referred to as printing.
FIG. 1 illustrates a schematic diagram of the environment wherein a system for generating a console log can be implemented, in accordance with an exemplary embodiment of the present invention. The environment comprises a device 102, a console log generator 104, a console device 106, and a UART 108. Device 102 may be a router in various embodiments. It sends information to be written to a console log. The information may be diagnostic information, copyright notices or agreement notices in various embodiments of the invention. In an embodiment of the invention, the information may be classified as either critical or non-critical. Examples of critical information include fatal errors and crash stack traces or security alert. An example fatal error might be a memory fault, which would prevent the platform from booting. A crash trace might happen when a process attempts to address improper memory (software logic error) in which case a calling stack with pointers to code segments is printed so that the defect may be traced. An example of a security alert would be when the system configuration is changed or attempted to be changed. Console log generator 104 sends the information to be written in to the console log only if console device 106 is connected to a console port of device 102. Additionally, in various embodiments of the invention, console log generator 104 checks whether the information is critical or non-critical, and accordingly, sends the information to be written to console device 106. In another embodiment, UART 108 may be connected to console port of device 102. The receive data pin of UART 108 may be connected to console log generator 104. UART 102 uses console log generator to determine whether console device 106 is connected to device 102. If console device 106 is detected, a log is generated. Console device 106 may be a printer, a display device, a modem to provide remote access to the platform, a terminal server that aggregates the output of several co-located routers into a single device or a monitor that reads the console logs and takes other action such as reconfiguring the system or sounding an alarm. In one embodiment, console log generator 104 is a part of device 102.
FIG. 2 illustrates a schematic diagram of console log generator 104, in accordance with an embodiment of the invention. Console log generator 104 includes an information checker 202, an information writer 204, a console checker 206, and a message checker 208.
During the powering on, device 102 sends information that is to be written to the console log. This information may be sent in the form of data packets, each packet comprising various fields, such as a field that indicates the criticality of the information. In an embodiment, the packet may be a log-d packet. In another embodiment, the information may be sent via an application program interface (API) by an internal application. Information checker 202 checks whether the information sent by device 102 is critical or non-critical. If the information is critical, information writer 204 writes the information to the console log. If the information is non-critical, console checker 206 checks whether console device 106 is connected to a console port. In an embodiment of the invention, information checker 202 reads the data packets sent by device 102 and checks the appropriate tag of the packet, to identify whether the information is critical or not.
The console port is a part of device 102 and enables connection with console device 106. The console port includes a UART. The UART may be interrupt-driven or poll-driven.
Console checker 206 identifies the presence of console device 106 connected to device 102 by measuring the ‘idle voltage’ on a receive data pin of the console port. In one embodiment, when a console device is attached to the console port, the ‘idle voltage’ is a low reference voltage, for example, 12 V or less. In one embodiment, idle voltage is anything less than −3 volts on the device's receive data pin. The receive data pin is the pin through which the router receives data. When console device 106 is attached to the console, it is required to pull the receive data pin to −12 volts to indicate an RS232 idle condition. Console checker 206 therefore can detect when console device 106 is attached. If console device 106 is connected, then information writer 204 writes the information to the console log. In an embodiment of the invention, console checker 206 may be a comparator circuit that compares the voltage at the receive data pin of the console port with the low reference voltage. In another embodiment, devices (e.g., device 102) check whether console device 106 is sending a start bit. A start bit indicates a busy state. Either of busy or idle state indicates the presence of console device 106. Also, neither busy nor idle state indicates the absence of console device 106. In another embodiment, a timer condition may be applied during the busy state. If a signal indicates busy state for more than a given time period, then it is implied that a functioning console device 106 is not attached. The time period is typically greater than ten byte times.
Further, once device 102 is powered on, it may send a message to be written to the console log. Subsequently, message checker 208 checks whether device 102 has sent a message. In various embodiments, this check is periodically performed. In an embodiment of the present invention, message checker 208 periodically sends a polling message to device 102, to check for the information to be written to the console log. In another embodiment of the present invention, message checker 208 waits for a signal from device 102. The signal indicates the presence of information to be written into the console log.
Each of the elements of console log generator 104 can be implemented on a chip as a part of, for example, an application-specific integrated circuit and field-programmable gate arrays. Further, some of the elements of console log generator 104, for example information checker 202 can be implemented as software modules or as a combination of hardware and software modules.
FIG. 3 illustrates a flow diagram describing a method to generate the console log after a request to write the information to the console log is made, in accordance with an exemplary embodiment of the invention. At step 302, device 102 sends a request to write the information to the console log. At step 304, information checker 202 checks whether the information or the message is critical or non-critical. If the information is non-critical, console checker 206 checks the ‘idle voltage’ at the receive data pin at step 306. Based on the ‘idle voltage’, a check is carried out to identify whether a console device is connected, as shown in step 308. If a console device is connected, the information is written to the console log, as shown in step 310. If the console device is not connected, the information is not written to the console log. If it is identified at step 304 that the information is critical, then the information is directly written to the console log, as shown in step 310.
FIG. 4 illustrates a flow diagram describing the method for generating the console log during the powering on of a device, in accordance with an exemplary embodiment of the invention. Booting or powering on of the device takes place, as shown in step 402. During the powering on, device 102 sends a request to write the critical and non-critical information to the console log, as shown in steps 404 and 406, respectively. Once the request to write the information to the console log is made, the steps described in conjunction with FIG. 3 are followed. Subsequently, after the device has been powered on, for example, when ‘buginfo’ is to be written, or the synchronous output is to be specified in a command line interface of the router, message checker 208 periodically checks device 102 for new messages, as shown in step 408. If it is identified at step 410 that device 102 has a message that needs to be written to the console log, then device 102 may send a request to write the message, along with an information priority. The information priority decides whether the information is critical or non-critical. Subsequently, the message is written into the console log, if the console device is present at step 412, by following steps described in conjunction with FIG. 3.
Embodiments of the present invention have the advantage that the powering on time of device 102 is reduced. Another advantage is that device 102 does not use resources to write information to be written to the console device, unless the console device is actually connected.
Although the invention has been discussed with respect to specific embodiments thereof, these embodiments are merely illustrative and not restrictive of the invention.
Therefore, while the present invention has been described herein with reference to particular embodiments thereof, latitude of modification and various changes and substitutions are intended in the foregoing disclosures. It will be appreciated that in some instances some features of the embodiments of the invention will be employed without the corresponding use of other features, without departing from the scope and spirit of the invention, as set forth. Therefore, many modifications may be made, to adapt a particular situation or material to the essential scope and spirit of the present invention. It is intended that the invention is not limited to the particular terms used in the following claims, and/or to the particular embodiment disclosed, as the best mode contemplated for carrying out this invention. The invention will include any and all embodiments and equivalents falling within the scope of the appended claims.
1. A method for generating a console log of a device when the device is powered on, the device sending a request to write information to the console log, the method comprising:
checking whether the information is critical;
writing the information to the console log if it is critical;
checking for the presence of the console device attached to a console port to determine if the console device is able to receive the information for the console log; and
by-passing writing the information to the console log if the console device is not detected such that the by-passing of writing of the information to the console log does not block performing of one or more processes to be performed during powering on of the device.
2. The method according to claim 1 further comprises writing the information to the console log if the console device is detected.
3. The method according to claim 1, wherein the console port comprises a Universal Asynchronous Receiver Transmitter (UART).
4. The method according to claim 3, wherein the UART is poll-driven or interrupt driven.
5. The method according to claim 1, wherein the presence of the console device is detected by measuring the idle voltage at the console port.
6. The method according to claim 5, wherein the user console device is connected to the console port if the idle voltage is a low reference voltage.
7. The method according to claim 1, wherein the device is a router.
8. A method for generating a console log of a device, the method comprising:
writing critical information to the console log during the powering on of the device;
writing non-critical information to the console log during the powering on of the device if a console device is attached to a console port of the device;
by-passing writing the non-critical information to the console log if the console device is not detected such that the by-passing of writing of the information to the console log does not block performing of one or more processes to be performed during powering on of the device;
checking whether the device has a message to display once it is powered on; and
writing the message to the console log if the console device is detected.
9. The method according to claim 8, wherein the console port comprises a UART.
10. The method according to claim 9, wherein the UART is interrupt driven or poll-driven.
11. The method according to claim 8, wherein presence of the console device is detected by measuring the idle voltage at the console port.
12. The method according to claim 11, wherein the console device is connected to the console port if the idle voltage is a low reference voltage.
13. The method according to claim 8, wherein the device is a router.
14. The method according to claim 8, wherein the checking for the message is performed periodically.
15. A method for generating a console log of a device, the device sending a request to write information to the console log, the method comprising:
detecting the presence of a console device attached to a console port of the device;
by-passing writing the information to the console log if the console device is not detected such that the by-passing of writing of the information to the console log does not block performing of one or more processes to be performed during powering on of the device; and
writing the information to the console log if the console device is detected.
16. A system for generating a console log of a device when the device is powered on, the device sending a request to write information to the console log, the system comprising:
means for checking whether the information is critical;
means for writing the information to the console log; and
means for checking for the presence of a console device attached to a console port, wherein the information is not written to the console log if the console device is not detected such that not writing of the information to the console log does not block performing of one or more processes to be performed during powering on of the device.
17. The system according to claim 16, wherein the console port comprises a UART.
18. The system according to claim 16, wherein the means for checking for the presence of the console device measures the idle voltage at the console port.
19. The system according to claim 18, wherein the console device is connected to the console port if the idle voltage is a low reference voltage.
20. A system for generating a console log of a router comprising:
an information writer for writing information to the console log;
an information checker for checking whether information is critical or non-critical;
a console checker for checking whether a console device is connected to a console port of the device, wherein the information is not written to the console log if the console device is not detected such that not writing of the information to the console log does not block performing of one or more processes to be performed during powering on of the device; and
a message checker for checking whether the device has a message to write to the console log once it is powered on.
21. The system according to claim 20, wherein the console port comprises a UART.
22. The system according to claim 21, wherein the UART is interrupt driven or poll-driven.
23. The system according to claim 20, wherein the presence of the console device is detected by measuring the idle voltage at the console port.
24. The system according to claim 20, wherein the message checker performs the check periodically.
25. An apparatus for generating a console log of a router comprising:
one or more instructions for checking whether the information is critical;
one or more instructions for writing the information to the console log; and
one or more instructions for checking for the presence of a console device attached to a console port, wherein the information is not written to the console log if the console device is not detected such that the writing of the information to the console log does not block performing of one or more processes to be performed during powering on of the device.
26. A machine-readable medium including instructions executable by the processor comprising:
27. The method of claim 1, wherein writing of the information to the log comprises a synchronous operation that blocks other operations from being performed during powering on of the device.
28. The method of claim 8, wherein writing of the information to the log comprises a synchronous operation that blocks other operations from being performed during powering on of the device.
29. The system of claim 20, wherein writing of the information to the log comprises a synchronous operation that blocks other operations from being performed during powering on of the device.
US11/016,094 2004-12-17 2004-12-17 Method and system for generating a console log Active 2026-06-27 US7500154B2 (en)
US11/016,094 US7500154B2 (en) 2004-12-17 2004-12-17 Method and system for generating a console log
US20060143529A1 US20060143529A1 (en) 2006-06-29
US7500154B2 true US7500154B2 (en) 2009-03-03
ID=36613214
US11/016,094 Active 2026-06-27 US7500154B2 (en) 2004-12-17 2004-12-17 Method and system for generating a console log
US (1) US7500154B2 (en)
2004-12-17 US US11/016,094 patent/US7500154B2/en active Active
Cisco Systems, "SFR System Functional Specification" (Paper Document), Copyright (C) 2004, 34 pages.
US20060143529A1 (en) 2006-06-29
US7020573B2 (en) 2006-03-28 Enhanced testing for compliance with universal plug and play protocols
US20020152421A1 (en) 2002-10-17 Diagnostic cage for testing redundant system controllers
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:MOON, BILLY G.;MOLTENI, MARCO;SCHNELL, MARK;REEL/FRAME:016109/0439