# Patent

## Title
Gathering context information used for activation of contextual dumping

## Abstract

An infrastructure is provided for gathering diagnostic data that is relevant to an error or other conditions detected in a monitored system. A diagnosability framework is provided that automates the gathering of relevant diagnostic data upon occurrence of the condition in the monitored system. In one embodiment, context data is determined for the condition detected in the monitored system. A rule-based engine is provided that is configured to automatically determine one or more actions to be performed for the condition detected in the monitored system based on the determined context data. The actions may include performing tasks that gather diagnostic data that is relevant to the detected condition, store the gathered diagnostic data in a repository, recommend one or more diagnostic actions to a user, and other diagnostic related actions.

## Background
CROSS-REFERENCES TO RELATED APPLICATIONS
This application claims the benefit and priority under 35 U.S.C. 119 (e) of U.S. Provisional Application Ser. No. 60/981,456, filed 19 Oct. 2007, entitled DIAGNOSABILITY FRAMEWORK, the contents of which are herein incorporated by reference in their entirety for all purposes.
This application also incorporates by reference for all purposes the entire contents of the following related and commonly-assigned non-provisional applications, all filed concurrently with the present application:

    (1) U.S. application Ser. No. 12/252,056 entitled DIAGNOSABILITY SYSTEM;
    (2) U.S. application Ser. No. 12/251,711 entitled NON-INTRUSIVE GATHERING OF DIAGNOSTIC DATA USING ASYNCHRONOUS MECHANISMS.
    (3) U.S. application Ser. No. 12/251,648 entitled RULES-BASED ENGINE FOR GATHERING DIAGNOSTIC DATA;
    (4) U.S. application Ser. No. 12/251,743 entitled USER-TRIGGERED DIAGNOSTIC DATA GATHERING;
    (5) U.S. application Ser. No. 12/251,661 entitled DIAGNOSTIC DATA REPOSITORY;
    (6) U.S. application Ser. No. 12/251,667 entitled DIAGNOSABILITY SYSTEM: FLOOD CONTROL;
    (7) U.S. application Ser. No. 12/251,671 entitled GATHERING INFORMATION FOR USE IN DIAGNOSTIC DATA DUMPING UPON FAILURE OCCURRENCE;
    (8) U.S. application Ser. No. 12/251,685 entitled SCRUBBING AND EDITING OF DIAGNOSTIC DATA;
    (9) U.S. application Ser. No. 12/251,700 entitled INTELLIGENT COLLECTION OF DIAGNOSTIC DATA FOR COMMUNICATION TO DIAGNOSIS SITE;
    (10) U.S. application Ser. No. 12/252,070 entitled HEALTH METER;
    (11) U.S. application Ser. No. 12/252,128 entitled HEALTH MONITOR.




BACKGROUND OF THE INVENTION
The present invention relates to system maintenance and diagnosis, and more particularly to techniques for gathering diagnostic data that is relevant to a condition detected in a monitored system.
When a system encounters a failure or error, diagnostic data is typically collected and stored to a disk for diagnostic analysis. The diagnostic data may be communicated to a diagnosis site for analysis and resolution of the error. The amount of diagnostic data that is captured varies from one system to another. Using one conventional approach, all of the data associated with the system is gathered and stored to the persistent memory (e.g., a disk) for diagnostic purposes. The stored data is then communicated to a diagnosis site for analysis. Such an approach of complete diagnostic data gathering however consumes a lot of time and valuable system resources. Further, the amount of data that is collected may include thousands of files and many gigabytes of data. Sending such a large volume of data to the diagnosis site is cumbersome, time-consuming, and expensive. Further, if the data received at a diagnosis site is very large, it takes the vendor a long time to analyze the received diagnostic data to identify relevant pieces of data for analyzing a particular problem.
Alternatively, only a basic set of diagnostic data associated with the system is collected and stored during an initial diagnostic process. The diagnostic data gathered by the initial diagnostic process is then analyzed to determine what additional diagnostic processes have to be run to capture additional data that is more relevant to the specific failure and essential for error resolution. This iterative process continues until someone manually determines that sufficient data has been gathered to solve the problem. The second approach thus requires diagnostic data gathering to be performed over multiple stages. At the end of each stage, a manual determination has to be made if sufficient diagnostic data has been gathered. This process is very time-consuming and also error-prone due to its manual component. Thus, using either approach, the time needed to resolve the error is increased, leading to customer dissatisfaction.
As indicated above, several prior solutions for gathering diagnostic data rely on a human to gather the relevant diagnostic data for a failure, analyze the gathered diagnostic data, and determine if any additional data needs to be collected. For example, a system administrator of a software system may track the failures in the system and determine the diagnostic data to be gathered and sent to the software vendor for diagnostic analysis. Typically, the administrator has to manually decide and generate the diagnostic data that is needed for proper diagnosis of the failure. Gathering a sufficient amount of diagnostic data that is relevant for resolving a particular error usually takes several iterations including many round trips between the administrator and the software support/development organization. This results in a long resolution time for the failure or error. Further, because of the manual component and because system administrators can have different skill levels, the reliability of the data gathering process is not assured and not repeatable.
Certain diagnostic data gatherings may not be performed automatically but rather require customer inputs such as customer approval. In today's systems, there is no automated mechanism for managing such diagnostic data gatherings that require customer intervention or customer approval. Often, recommendations to take certain actions for diagnostic data gathering are instead communicated through the vendor's support organization, or through documentation.
BRIEF SUMMARY OF THE INVENTION
Embodiments of the present invention provide an infrastructure for gathering diagnostic data that is relevant to a condition detected in a monitored system. A diagnosability framework is provided that automates the gathering of relevant diagnostic data upon occurrence of the condition in the monitored system. In one embodiment, context data is determined for the condition detected in the monitored system. A rule-based engine is provided that is configured to automatically determine one or more actions to be performed for the condition detected in the monitored system based on the determined context data. The actions may include performing tasks that gather diagnostic data that is relevant to the detected condition, store the gathered diagnostic data in a repository, recommend one or more diagnostic actions to a user, and other diagnostic related actions.
The diagnosability framework according to an embodiment of the present invention may be used with various different systems including but not restricted to software systems including complex enterprise software systems, hardware systems, and others.
According to an embodiment of the present invention, techniques are provided for determining a diagnostic action to be performed in a monitored system. Context data may be determined for a condition detected in the monitored system. The context data determined for the detected condition may comprise information related to the detected condition in the monitored system, information related to functions and/or processes that are being executed in the monitored system, or combinations thereof. A diagnostic action may be determined to be performed responsive to the detected condition based upon the context data determined for the detected condition.
In one embodiment, determining the context data for the detected condition comprises determining an error number and one or more error arguments associated with the condition detected in the monitored system.
In one embodiment, determining the context data for the detected condition comprises determining information related to one or more components in the monitored system. Information related to one or more components may include information related to one or more components that are active on a call stack may be determined, information related to a component that is identified as most likely having caused the detected condition in the monitored system may be determined, information related to a component that signaled the detected condition in the monitored system may be determined, and the like.
In one embodiment, determining the context data for the detected condition comprises determining information related to an impact that the detected condition has on the monitored system.
In one embodiment, determining the context data for the detected condition comprises determining information related to a function or process that is tagged as relevant to diagnosis.
In one embodiment, determining the diagnostic action to be performed comprises determining a set of one or more rules configured for the monitored system and determining that the condition associated with a first rule from the set of rules is satisfied by the context data determined, wherein at least one action specified by the first rule is the diagnostic action determined to be performed in the monitored system. Each rule configured for the monitored system may specify a condition and one or more actions to be performed when the condition specified in the rule is satisfied.
In one embodiment, the determined diagnostic action may be executed. The diagnostic action may be executed to gather diagnostic data that is relevant to the condition detected in the monitored system.
The foregoing, together with other features and embodiments will become more apparent when referring to the following specification, claims, and accompanying drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a simplified block diagram illustrating a diagnosability system according to an embodiment of the invention.
FIG. 2 is a simplified block diagram depicting a diagnostic data extractor (DDE) module according to an embodiment of the invention.
FIG. 3 is a simplified flow chart depicting a method for determining a diagnostic action according to an embodiment of the present invention.
FIG. 4 is a simplified flow diagram illustrating a method for determining context data according to an embodiment of the present invention.
FIG. 5 is a simplified flow diagram illustrating a method for performing a recommended diagnostic action (i.e., user action) according to an embodiment of the present invention.
FIG. 6 is a simplified block diagram of a computer system that may be used to practice an embodiment of the various inventions described in this application.



DETAILED DESCRIPTION OF THE INVENTION
In the following description, for the purposes of explanation, specific details are set forth in order to provide a thorough understanding of the invention. However, it will be apparent that the invention may be practiced without these specific details.
Embodiments of the present invention provide an infrastructure for gathering diagnostic data that is relevant to a condition detected in a monitored system. A diagnosability framework is provided that automates the gathering of relevant diagnostic data upon occurrence of the condition in the monitored system. In one embodiment, context data is determined for the condition detected in the monitored system and is used to automate the diagnostic data gathering that is relevant to the detected condition in the monitored system. The context data may include information related to the detected condition in the monitored system, information related to functions and components in the monitored system, and other information.
In one embodiment, a rule-based engine is provided that is configured to automatically determine one or more diagnostic actions to be performed based on the context data determined for the condition detected in a monitored system. In this manner, the human component of manually iteratively determining the relevant diagnostic data to be gathered is eliminated. This in turn reduces the time-to-resolution for an error or other conditions detected in the monitored system.
Some diagnostic actions determined by the rule-based engine may be automatically performed without any user intervention, while other diagnostic actions (also sometimes referred to as user actions) may be recommended to be performed and may require user inputs such as user approval and/or user input arguments before actually being performed. In one embodiment, a user action is executed at some point much later than when the condition that triggered the recommendation of the action occurred. In this manner, by allowing the user to control the execution of a diagnostic action, the possible system performance impact of automatically performing heavy data gathering at the time of an error or other system condition is avoided.
FIG. 1 is a simplified block diagram of a diagnosability system 100 according to an embodiment of the present invention. Diagnosability system 100 facilitates collection, storage, communication, and analysis of diagnostic data for one or more monitored systems 110 (which may be different products or different instances of the same product). Monitored system 110 may be a software system, a hardware system, an enterprise system, and like. For example, monitored system 110 may be a complex enterprise software system such as a database system and related products provided by Oracle CorporationTM of California.
As depicted in FIG. 1, diagnosability system 100 comprises a diagnosability framework 112 deployed at a system site to provide diagnostic support for monitored system 110. Diagnosability system 100 also comprises a diagnosability framework 116 deployed at a diagnosis site. A diagnosis site may be for example a site of a vendor that is responsible for diagnosing problems that may occur in monitored system 110.
In a typical diagnostic workflow, diagnostic data is captured and stored for monitored system 110 by diagnosability framework 112. For example, diagnosability framework 112 may be configured to gather and store diagnostic data related to monitored system 110 when an error or other condition is detected in monitored system 110. The diagnostic data collected and stored by diagnosability framework 112 may include, for example, trace data, diagnostic dumps, run reports, logs (e.g., error logs), results of diagnosability related actions, and the like. Portions of the diagnostic data stored by diagnosability framework 112 may be communicated to diagnosability framework 116 located at the diagnosis site for analysis, such as failure analysis. The diagnostic data may be communicated from diagnosability framework 112 to diagnosability framework 116 via a communication network 114. Communication network 114 may be any network capable of communicating data such as the Internet, an intranet, a switched network, and the like. Communication network 114 may include wired or wireless communication links. Various communication protocols may be used to communicate data from diagnosability framework 112 to diagnosability framework 116.
As depicted in FIG. 1, diagnosability framework 112 comprises a diagnostic data extractor (DDE) 12a, a diagnostic data repository (DDR) 112b, an active state module 112e, and various tools 112d. The various components depicted in diagnosability framework 112 are merely examples of components that may be included in diagnosability framework 112. In alternate embodiments, diagnosability framework 112 may have less or more components than those shown. The components in diagnosability framework 112 may be implemented in software (e.g., code, program, instructions that are stored on a machine-readable medium and executed by a processor), hardware, or combinations thereof.
In one embodiment, active state module 112e is configured to gather and store information related to monitored system 110 during run time of the monitored system. Upon occurrence or detection of a condition in monitored system 110, a portion of the information that is gathered and stored by active state module 112e during run time is then available and provided as useful contextual data for facilitating the gathering of diagnostic data that is relevant to the detected condition. For example, the information that is gathered and stored by active state module 112e may be provided to DDE 112a for determining one or more diagnostic actions to be performed upon occurrence or detection of the condition in system 110 (e.g., actions for gathering diagnostic data relevant to the condition detected in system). In one embodiment, the information gathered and stored by active state module 112e during run time may be dumped to persistent memory (e.g., disk) upon occurrence or detection of a condition in system 110.
Various different types of information related to monitored system 110 may be gathered and stored by active state module 112e during run time of monitored system 110. In one embodiment, active state module 112e may gather and store information related to one or more local variables that are used in one or more functions in the call stack (a call stack stores information about processes and functions that are currently being executed by monitored system 110). For example, active state module 112e may gather and store pointers to the local variables that are used in a function during run time of the monitored system. If the pointers to the local variables are still pointing to something valid (i.e., local variables are still active) upon occurrence or detection of a condition in system 110, then the information related to the local variables (pointers to the variables and other information related to the variables) may be dumped to persistent memory or output to other components of diagnosability framework 112 for use in diagnostic data dumping.
In one embodiment, active state module 112e may gather and store information related to information that is explicitly tagged as relevant to diagnosis. The tagged information may be a specific section of system code or a specific function or process executing in the monitored system. The information related to the tagged information may include a name for the tag, a tag identifier of the tag, a tag state (e.g., “active” or “inactive”), and other information related to the tagged information. In one embodiment, a user such as a developer may explicitly tag a specific section of a function or a specific operation in monitored system 110 as relevant for diagnostics during design time. During run time of system 110, the tag state for a tag may be changed from “inactive” to “active” depending on whether the tagged information is active on the call stack or not. For example, if a specific function is tagged, and if the tagged function is currently active on the call stack, then the tag state associated with the tag is set to “active” and the tag is deemed to be an active tag. On the other hand, if the specific function is not active on the call stack, then the tag state associated with the tag is “inactive” and the tag is deemed to be an inactive tag.
In one embodiment, information related to the tagged information that is tagged by an active tag is provided as useful contextual data for diagnostic data dumping in monitored system 110 upon occurrence or detection of a condition in system 110. In this manner, tagging provides a window into what was occurring in the monitored system at and around the time of the error. Tagging also enables a user to specify what specific contextual data may be gathered by active state module 112e and used for diagnostic data dumping upon occurrence or detection of a condition in system 110.
DDE 112a is configured to detect occurrences of conditions in system 110 and determine one or more diagnostic actions to be performed in response to the detected conditions. In one embodiment, in response to a condition detected in monitored system 110, DDE 112a is configured to determine one or more diagnostic actions to be performed based upon context data determined for the detected condition. The context data determined for the condition may comprise various pieces of data such as:

    
    
        Information related to the condition detected in monitored system 110, such as error number and error argument, and the like;
        Information related to functions and components of system 110 on the call stack (i.e., a data structure that stores information about processes and/or functions that are currently being executed by monitored system 110) when the condition is detected in system 110;
        Information related to one or more functions and components that signaled the detected condition;
        Information related to the probable impacts that the detected conditions may have on monitored system 110;
        Information that is gathered and provided by active state module 112e, such as the tagged information, and the like.
    
    


In one embodiment, DDE 112a is a rule-based engine that is configured with one or more DDE rules. A DDE rule may identify a DDE condition and one or more diagnostic actions (also referred to as DDE actions) to be performed when the DDE condition specified in the DDE rule is met. A DDE condition specified in a DDE rule may comprise information related to one or more conditions detected in monitored system 110, information related to functions and components that are currently being executed by monitored system 110 when the condition are detected in system 110, information related to tagged functions or processes, and other information. The diagnostic actions specified in a DDE rule may include determining and gathering diagnostic data that is deemed to be relevant to the detected condition in monitored system 110, recommending one or more actions to be performed (possibly for additional diagnostic data gathering or for remedying the impact of the error), invoking health checks (for gathering monitored system-related information for determining the health of the monitored system), and the like. DDE rules may be user-configurable.
In one embodiment, only diagnostic data that is deemed to be relevant to a condition detected in system 110 is gathered. The context data determined for the condition detected in monitored system 110 coupled with the use of the DDE 112a rules-based engine enables diagnosability framework 112 to intelligently gather diagnostic data that is relevant and useful for resolution of the condition that triggered the diagnostic data gathering. The DDE rules may be configured such that the right level of detail is collected and stored for the condition. Once the DDE rules have been evaluated, the diagnostic data to be gathered for a condition detected in monitored system 110 is automatically determined without requiring any human intervention. DDE 112a and its functions are discussed below in further details.
Diagnostic data repository (DDR) 112b (also sometimes referred to as ADR in the applications incorporated by reference in the present application) provides a centralized repository for storing diagnostic data related to monitored system 110 collected by diagnosability framework 112. The diagnostic data collected by diagnosability framework 112 may be stored in a structured format that enables searching and database-like querying capabilities. In one embodiment, DDR 112b is a file-based repository. Various different types of diagnostic data may be stored in DDR 112b such as traces, dumps, alert logs, health monitor reports, and the like. Information gathered by active state module 112e (e.g., such as information related to one or more local variables for a particular function on the call stack) may be stored or dumped into DDR 112b. 
In one embodiment, DDR 112b is capable of storing diagnostic data for multiple monitored systems such as multiple monitored systems 110. The diagnostic data collected for each monitored system 110 may be stored under a separate directory (e.g., an ADR_HOME directory) allocated to that system. The ADR_HOME directories share a common structure to facilitate analysis of the stored data across multiple monitored systems 110. Multiple ADR_HOME directories may be present under a single ADR_BASE directory. In this manner, diagnostic data for multiple monitored systems 110 may be stored and organized in a consistent manner.
In one embodiment, the diagnostic data stored in DDR 112b may be tagged or annotated with metadata information. The metadata information may be used to find correlations between pieces of the diagnostic data stored in DDR 112b. The metadata also enables navigation of the diagnostic data stored in DDR 112b. The metadata may include one or more correlation keys. Further information related to DDR 112b and correlation keys may be found in the applications incorporated by reference in the present application.
Various tools 112d may be provided as part of diagnosability framework 112. These tools may include tools for querying the diagnostic data or information stored in diagnostic data repository 112b, tools for generating reports, analysis tools, and other tools that may use information collected and stored by diagnosability framework 112. Further information regarding tools 112d can be found in the applications incorporated by reference in the present application.
As mentioned previously, the diagnostics data collected by diagnosability framework 112 may also be forwarded to diagnosability framework 116 located at a diagnosis site (for example, the site of a software system vendor) for analysis. As depicted in FIG. 1, diagnosability framework 116 may comprise a diagnostic data repository 116b, and one or more tools 116c. The various components depicted in the diagnosability framework 116 are merely examples of components that may be included in the diagnosability framework. In alternate embodiments, diagnosability framework 116 may have less or more components than those shown in FIG. 1. The components depicted in diagnosability framework 16 may be implemented in software, hardware, or combinations thereof.
In one embodiment, diagnostic data repository 116b provides a repository for storing diagnostic data received from one or more system sites. In one embodiment, the structure of diagnostic data repository 116b is the same as the structure of diagnostic data repository 112b at system sites. This facilitates efficient storage and analysis of the data. In such an embodiment, data received from system site packages is stored in the same directory location in diagnostic data repository 116b as the data that was stored in diagnostic data repository 112b. 
Various tools 116c may be provided in diagnosability framework 116 to help analyze the diagnostic data received from diagnosability framework 112 and to guide management and resolution of problems and errors in monitored systems. These tools may include command line or GUI-based tools for use by personnel at the diagnosis site. For example, the tools may include a tool that may be used to analyze the diagnostic data received from the software system site and to identify causes for the errors, tools for automatically routing the diagnostic data to a correct entity (e.g., a particular group or department responsible for the software that experienced the error, one or more software developers responsible for solving the error, a system administrator, etc.) for diagnosis, and the like.
The present application focuses on DDE 112a of diagnosability framework 112. Information related to the various other components of diagnosability system 100 may be found in the applications incorporated by reference in the present application.
FIG. 2 is a simplified block diagram depicting a diagnostic data extractor (DDE) 112a according to an embodiment of the present invention. The various components depicted in FIG. 2 are merely examples of components that may be included in DDE 112a. In alternate embodiments, DDE module 112a may have less or more components than those shown in FIG. 2. The components depicted in FIG. 2 may be implemented in software (e.g., code, program, instructions that are stored in a machine-readable medium and executed by a processor), hardware, or combinations thereof.
As mentioned previously, DDE 112a is configured as a rule-based engine to automatically determine all of the relevant diagnostic data to be gathered for a condition detected in the monitored system based on context data that is determined for the condition. In one embodiment, a set of one or more DDE rules may be specified for DDE 112a with each rule identifying a DDE condition and one or more diagnostic actions to be performed when the DDE condition is met. The DDE condition specified in a DDE rule may include information related to the condition detected in monitored system 110, information related to function and processes that are executed by monitored system 110, information related to system components on the call stack at the time of the detection of the system condition, and other information. The diagnostic actions determined by DDE 112a may include collecting and storing diagnostic data that is relevant to the condition detected in the monitored system, recommending one or more actions to be executed, invoking one or more health checks, and other diagnostic related actions.
As depicted in FIG. 2, DDE 112a receives information 220 identifying one or more conditions detected in a monitored system, such as system 110 of FIG. 1. The one or more conditions may include one or more errors detected in monitored system 110. In one embodiment, errors may be classified as critical errors. An error may be considered a critical error if the error is caused due to the working of monitored system 110 itself as opposed to an error caused by a client or user's improper use of system 110. For example, a critical error may be an internal error, a system access violation, or some external error (e.g., an object being accessed no longer exists). Another type of error condition detected in system 110 may be classified as a soft assert. An error may be considered a soft assert if the error does not cause immediate harm to the monitored system. For example, leaving a file open rather than closing it when the process ends can be viewed as a soft assert—its an error, but not harmful typically.
As mentioned previously, various context data may be determined for a condition detected in monitored system 110. In one embodiment, the context data determined for a condition detected in monitored system 110 may be stored in diagnostic data repository 112b. The context data determined for a condition detected in monitored system 110 may include an error number and one or more error arguments associated with the condition detected in system 110. An error number and error arguments may identify the condition detected in system 110. For example, in an Oracle database system, error number ORA-60x identifies internal errors that occur in the monitored database system, and error number ORA-4020 identifies an external error that occurs in the database system such as a deadlock detected while trying to lock a library object.
A single error number may be associated with multiple errors or system conditions. Errors or other system conditions that are associated with the same error number may belong to the same class of errors or conditions. Since many errors or system conditions may be classified under the same error number, one or more error arguments may be used to further identify the errors or system conditions. For example, an error argument associated with an error or other system condition identified by an error number may indicate a specific code location that threw an exception that caused the error or other system condition. In this manner, error arguments provide additional information about the error or other system condition in monitored system 110.
The context data determined for a condition detected in monitored system 110 may include an error level associated with the condition detected in system 110. In one embodiment, the following error levels may be defined and associated with the condition detected in system 110:

    
    
        Level 0—This error level is associated with system conditions related to error handling code and DDE module 112a; 
        Level 1—This error level is associated with all internal errors and OS exceptions detected in the monitored system;
        Level 2—This error level is associated with external errors that are handled by DDE module 112a. 
        Level 3—This error level is associated with external errors that are not handled by DDE module 112a. The rule-based processing performed by DDE 112a may not be invoked for these errors.
    
    


The context data determined for a condition detected in monitored system 110 may include impact information associated with the condition specifying the potential impact(s) that the condition may have on the monitored system. In one embodiment, the impact information associated with the condition detected in monitored system 110 describes the potential consequences of the condition in terminology that is understandable by users such as system administrators who can use the information to take remedial actions to repair or mitigate the impacts.
For example, the impact information for a memory corruption error related to the dictionary heap may indicate that the dictionary is corrupted. As another example, the impact information related to a memory corruption error related to a heap that belongs to row cache may indicate that the row cache has been corrupted. Accordingly, the same condition (i.e., memory corruption) that is detected in monitored system 110 may have different associated impacts depending upon the context of the condition. The impact information thus provides specific contextual information related to the impact of a detected condition on monitored system 110, such as which particular memory was corrupted rather than some generic impact information such as “memory corruption”.
In one embodiment, the impact information may be specified in an external file that maps the impact information to an error number and/or error arguments that are associated with the condition detected in system 110. In this embodiment, given an error number and/or error arguments that are associated with the system condition, DDE 112a may use the external file to map the error number and/or error arguments to the associated impact information.
The context data determined for a condition detected in monitored system 110 may include information related to information that is explicitly tagged as relevant to diagnosis. The tagged information may be a specific section of system code or a specific function or process executing in the monitored system. The information related to the tagged information may include a name for the tag, a tag identifier of the tag, a tag state (e.g., “active” or “inactive”), and other information related to the tagged information. During runtime of system 110, the tag state for a tag may be changed from “inactive” to “active” depending on whether the tagged information is active on the call stack or not. If the tagged information (e.g., a tagged function/process) is active on the call stack upon occurrence or detection of a condition in system 110, then the information related to the tagged information is provided to DDE 112a as useful contextual data for gathering diagnostic data that is relevant to the condition detected in monitored system 110.
The tagged information that is provided by active state module 112e provides useful contextual data other than just a component or a function name, which tends to be too coarse grained for diagnostic purposes. In this manner, tagging provides a window into what was occurring in the monitored system at and around the time of the error. Tagging also enables a user to specify what specific contextual data may be gathered by active state module 112e and used for diagnostic data dumping upon failure occurrence.
The context data determined for a condition detected in monitored system 110 may include information related to function and/or process that are being executed in the monitored system. The context data may also include information related to system components. The component information may include information related to system components that are on the call stack, information related to the system component that signaled the system condition, information related to the system component that has been identified as most likely having caused the condition in system 110, and the like.
In one embodiment, the component information may be determined by a component module 202. For example, component module 202 may determine one or more different functions on the call stack upon occurrence or detection of a condition in the monitored system. Component module 202 may then map the function to the various component information that is associated with the function on the call stack. In one embodiment, in order to prevent issues arising from function name mangling among different monitored system platforms, component module 202 may be configured to first normalize the various different function names on the call stack and then use the normalized names for mapping purposes.
The context data determined for a condition detected in monitored system 110 may further include information associated with an incident that is generated for an error detected in system 110. In one embodiment, an incident represents a single occurrence of an error in monitored system 110. In one embodiment, an incident may be generated only for a critical error detected in monitored system 110. In one embodiment, DDE 112a comprises an incident module 204 that is configured to create an incident for an error detected in monitored system 110. In one embodiment, incident module 204 is configured to create incidents only for critical errors in monitored system 110.
Various different information may be associated with and stored for an incident that is created by incident module 204. A problem key may be generated for and associated with the incident. The problem key for the incident may comprise an error number, one or more error arguments, and other information that is associated with the error that caused the creation of the incident. In one embodiment, a problem key is used to map the incident to a problem.
In one embodiment, a problem is a set of incidents that are perceived to have the same symptom and problem key. Incidents that have the same associated problem key may be mapped to a single problem representing a specific symptom. Such a mapping may effectively reduce the amount of diagnostic data that is collected for multiple incidents having the same symptom. For example, instead of collecting and storing diagnostic data for each incident that maps to a particular problem, only limited sets of diagnostic data may be collected and stored for a particular symptom for the problem that corresponds to multiple incidents.
As mentioned previously, DDE 112a provides a rule-based engine for determining one or more diagnostic actions to be performed for a condition detected in monitored system 110. In one embodiment, DDE 112a includes a DDE rules engine 212 for determining one or more diagnostic actions to be performed based upon the context data determined for the condition detected in monitored system 110. A set of DDE rules may be specified for DDE rules engine 212 with each DDE rule identifying a DDE condition and one or more diagnostic actions or DDE actions to be performed when the DDE condition specified in the DDE rule is met. In one embodiment, the set of DDE rules specified for DDE 112a is stored in a rule repository 216 that is accessible to DDE 112a. The set of DDE rules may be configured dynamically to suit the needs of different monitored systems. For example, the DDE rules may be configurable via a user interface 218.
In one embodiment, a DDE condition may comprise one or more expressions connected by one or more logic operators. An expression in a DDE condition may be associated with one or more arguments. For example, the following expressions and operators may be defined for a DDE condition:

    
    
        1. Expressions related to an error, such as Error_Number(<error_number>), Error_Arg1(<1st argument>), Is_Internal_Error(<error_number>), Is_External_Error(<error_number>).
        2. Expressions related to system components or function names, such as Active_Component(<component>), Signaling_Component(<component>), Function_Name(<function name>).
        3. Expressions related to impacts that an error or other condition detected in a system may have on the monitored system, such as Impact(<impact_name>). For example, a DDE condition may be defined as Impact(Disk-Corruption).
        4. Expressions related to a diagnostic tag that tags a specific operation as relevant for diagnostic purposes, such as Active_Tag(<tag_name>). For example, Active_Tag(transaction_rollback).
        5. Logical operators may be used to connect multiple expressions. The logical operators may include “and”, “or”, “not”, parentheses, and the like. For example, the following expression may be connected by the logic operator “AND”:
        
            Error_Number(<error_number>) AND Impact(Disk-Corruption)
        
        
    
    


In one embodiment, DDE rules engine 212 is configured to evaluate the set of DDE rules based upon the context data determined for a condition detected in system 110. In one embodiment, DDE rules engine 212 compares the context data determined for the condition detected in system 110 to the DDE condition specified in a DDE rule to determine if the DDE condition is satisfied. For example, for a DDE condition Error_Number (<600>), if the context data determined for a condition detected in monitored system 110 includes an associated error number 600, then the DDE condition Error_Number (<600>) is evaluated to be true and thus satisfied.
If the DDE condition specified in a DDE rule is satisfied based on the context data determined for a condition detected in system 110, then one or more diagnostic actions that are specified in that DDE rule are determined to be performed. For example, a DDE rule “Error_Number (<600>) AND ActiveComponent (Heap Manager)—>HEAPDUMP level=1 and heaptype=UGAHEAP” determines a heap dump action related to the UGA heap to be performed if the associated DDE condition “Error_Number (<600>) AND ActiveComponent (Heap Manager)” is evaluated to be true based upon the context data determined for a condition detected in monitored system 110.
The diagnostic actions or DDE actions that are determined by DDE rules engine 212 may include performing tasks that gather diagnostic data that is relevant to a condition detected in monitored system 110, store the gathered diagnostic data in a repository, recommend the diagnostic actions to be performed subject to user inputs, and other diagnostic related actions. In this way, by evaluating DDE rules based on the context data determined for a condition detected in monitored system 110, DDE 112a automates the gathering of diagnostic data that is relevant to the specific condition detected in monitored system 110. Such a contextual dumping effectively reduces time-to-resolution of errors or other conditions detected in monitored system 110.
A diagnostic action determined by DDE rules engine 212 may be executed by DDE 112a itself or by some other components of diagnosability framework 112 or even by some components of the monitored system. For example, DDE 112a may comprise an execution module 214 that is configured to perform a DDE action determined by DDE rules engine 212. Upon determining that a DDE rule has been satisfied, DDE rules engine 212 may send a signal to execution module 214 to perform one or more DDE actions associated with the DDE rule. Execution module 214 may then execute the identified actions. Alternatively, DDE rules engine 212 may send a signal to some other components of diagnosability framework 112 to perform a DDE action. For example, if the DDE action is a health check, a signal may be communicated to a health monitor module (not shown in FIG. 2) to perform the check.
There are two types of diagnostic actions that are determined by DDE rules engine 212. One type of DDE actions are automatically performed once it is determined that a DDE rule is satisfied. For example, a DDE action may be automatically executed to gather diagnostic data that is relevant to a specific condition detected in system 110 upon occurrence of the condition in monitored system 110. The other type of DDE actions are not executed automatically but instead recommended to the user who determines whether the recommended action is executed or not. Such actions are sometimes referred to as user actions since their executions are triggered by users through user interface 218 (e.g., command line interface or a web-based user interface). For example, the execution of a DDE action may take a long time and/or use significant system resources. As a result, the execution of such an action automatically at the time of an error condition may impact the working of monitored system 110. By allowing the user to control the execution of a DDE action, the possible system performance impact of automatically performing heavy data gathering at the time of the error condition is avoided. In one embodiment, a user action may be executed before a package comprising diagnostic data for a condition is to be transmitted to a vendor for diagnosis. A user action recommended by DDE 112a may be executed using context data determined for a condition that triggers the recommendation of the user action and/or using one or more parameters provided by DDE 112a. User actions are discussed below in further details.
In one embodiment, DDE 112a comprises a flood control module 210 that is configured to control the amount of diagnostic data gathered for a condition detected in monitored system 110 using a set of flood control rules configured for monitored system 110. For example, a flood control rule may be specified for flood control module 210 to collect diagnostic data only once for every third occurrence of an error condition within an hour in monitored system 110, and diagnostic data gathering is suppressed for all the other occurrences of the error condition in the monitored system in the hour. As another example, a flood control rule may be specified for flood control module 210 to execute a DDE action no more than three times in an hour. In this manner, flood control module 210 limits the number of diagnostic actions or DDE actions that are performed, which in turn limits the amount of diagnostic data that is gathered to a manageable limit. In one embodiment, flood control module 210 may be disabled for DDE 112a. If flood control module 210 is disabled, diagnostic data gathering for a condition detected in system 110 and/or DDE actions that are determined by DDE rules engine 212 would not be flood controlled by flood control module 210. Further information related to flood control module may be found in the applications incorporated by reference in the present application.
In one embodiment, DDE 112a comprises DDE action control module 208 that is configured to dynamically modify the DDE actions determined by DDE rules engine 212. DDE action control module 208 provides a mechanism to modify the behavior of DDE rules dynamically by turning off DDE actions determined by DDE rules engine 212 or enabling some pre-existing actions that are triggered by a condition detected in monitored system 110. Following is a list of example DDE controls that may be performed by DDE action control module 208:

    
    
        Enable an action for an error, e.g., 4031→Enable StackDump.
        Disable an action for an error, e.g., 4031→Disable StackDump.
        Delete any previously added control for an <error, action> tuple, e.g., Clear <4031, StackDump>, which means removing whatever control that is previously added for that <error, action> tuple.
        Add/disable/delete actions for a class of errors, e.g., All_External_Errors→Disable StackDump.
    
    


A diagnostic action determined by DDE rules engine 212 may be executed in a synchronous or asynchronous manner. In one embodiment, a DDE action is executed synchronously by the process or thread (also sometimes referred to as the crashing or failing process) that receives the condition that triggered the diagnostic action. For example, a failing process or thread may execute one or more diagnostic actions to collect diagnostic data critical for diagnosis of the condition that caused the process or thread to fail. Alternatively, a diagnostic action determined by DDE rules engine 212 may be executed asynchronously by a different process or thread such that the failing process or thread may continue processing without being affected by the executions of the diagnostic actions. In this manner, the execution of the diagnostic action does not delay the failing process or thread. Further information related to DDE actions executed in an asynchronous manner may be found in the applications incorporated by reference in the present application.
The results from executing a DDE action may be output and/or stored. For example, the results may be output to a user of diagnosability framework 112 or may be stored in diagnostic data repository 112b. The results from executing a DDE action may include information related to monitored system 110 that is determined and/or gathered for diagnostic purposes, such as relevant diagnostic data gathered for a specific condition detected in monitored system 110, information obtained from running a health check, information collected from executing a user action, and the like. In one embodiment, the results from executing a DDE action are organized and stored in diagnostic data repository 112b. Diagnostic data repository 112b provides a centralized location for storing various different types of diagnostic data, such as traces, dumps, alert logs, health monitor reports, and the like, in a structured format. The information and diagnostic data stored in diagnostic data repository 112b may be displayed through a display device or system, such as display device 222.
FIG. 3 is a simplified flow chart depicting a method for determining a DDE action according to an embodiment of the present invention. The processing depicted in FIG. 3 may be performed by software (executed by a processor), hardware, or combinations thereof.
Referring to FIG. 3, at 302, information is received identifying a condition detected in monitored system 110. The information received in 302 may include information identifying the detected condition and related information. In one embodiment, the information in 302 may be received by DDE 112a. 
At 304, context data is determined for the condition identified in 302. The context data that is determined for the condition may include information related to the condition such as error number and error arguments associated with the condition, information related to function and/or processes that are being executed in the monitored system, information related to components of the monitored system on the call stack when the condition identified in 302 occurred or was detected, information that is captured by active state module 112e such as information related to tagged function or process, information related to an incident that is created as a result of the detected condition, and the like. The context data determined in 304 may be provided to or accessed by DDE 112a. Further details related to determining context data are described below with respect to FIG. 4 and the accompanying description.
At 306, DDE 112a may create an incident and an associated problem key for the condition identified in 302.
At 308, a DDE rule is evaluated to determine one or more DDE actions to be performed if the DDE condition specified for the DDE rule is satisfied based upon the context data determined in 304. As described previously DDE 112a is a rule-based engine with each DDE rule identifying a DDE condition and one or more DDE actions or diagnostic actions to be performed when the condition are met based on the context data determined in 304. The DDE actions that are determined in 308 may include gathering relevant diagnostic data for the condition identified in 302 that triggered evaluation of the DDE rule and invocation of the DDE actions, recommending a user action to a user, running one or more health checks, and other diagnostic related actions.
If it is determined in 308 that a DDE action is to be performed, at 309, processing is performed to determine whether the action determined in 308 is a user action that should be recommended to a user such as a system administrator. If it is determined in 309 that the DDE action is a user action recommendation, then the action determined in 308 is recommended to a user, and processing may be returned to 308 when there are more than one DDE rules to evaluate. Otherwise, at 310, the DDE action determined in 308 is executed. The DDE action may be executed by DDE execution module 214 (e.g., gathering relevant diagnostic data) or by some other modules of diagnosability system 100 (e.g., running a health check).
At 312, the results from executing the DDE action in 310 may be output and/or stored. The results from executing a DDE action may include information related to monitored system 110 that is determined and/or gathered for diagnostic purposes, such as relevant diagnostic data gathered for the condition identified in 302 that triggered the DDE action. In one embodiment, the results from executing a DDE action may be displayed to a user via a display device (optional). The results from executing a DDE action may be stored in diagnostic data repository 112b. Processing may be returned to 308 when there are more than one DDE rules to evaluate.
FIG. 4 is a simplified flow diagram illustrating a method for determining context data according to an embodiment of the present invention. The processing depicted in FIG. 4 may be performed by software (executed by a processor), hardware, or combinations thereof. In one embodiment, the processing depicted in FIG. 4 is performed in step 304 depicted in FIG. 3.
Referring to FIG. 4, at 404, information related to the condition identified in 302 is determined. In one embodiment, the information that is determined in 404 includes an error number and one or more error arguments associated with the condition identified in 302.
At 405, information related to function and/or processes that are being executed in the monitored system is determined. For example, the information may be determined from the call stack. At 406, information related to components of monitored system 110 that are active on the call stack when the condition identified in 302 was received or detected is determined. This may involve retrieving information from data structures that store the active functions information. In one embodiment, the information related to active components may be derived from the call stack by matching the function names on the call stack to the corresponding components.
At 408, information related to a component of monitored system 110 that signaled the condition identified in 302 is determined. In one embodiment, the information related to a signaling component is derived from the call stack.
At 410, information related to functions and components on the call stack that are identified as most likely having caused the condition identified in 302 is determined. In one embodiment, the information determined in 410 is derived from the call stack that stores the active functions that are being executed in monitored system 110.
At 412, information related to a probable impact that the condition identified in 302 may have on monitored system 110 is determined. In one embodiment, the information related to an impact may be determined from a table in which conditions are mapped to the corresponding associated impact information. For example, errors identified by error numbers may be each mapped to their corresponding impact information. In such an embodiment, an error number associated with the condition identified in 302 may be used to determine the corresponding impact information.
At 414, information related to tagged function or process that is active on the call stack is determined. For example, a developer may explicitly tag a specific section of a function or a specific operation in monitored system 110 as relevant for diagnostics. Upon occurrence of a condition detected in monitored system 110, if the tagged operation is active on the call stack, then information related to the tagged operation or function is gathered and provided to DDE 112a for facilitating the gathering of diagnostic data that is relevant to the condition identified in 302.
At 416, information related to an incident, if any, created in response to the condition identified in 302 is determined. The information related to an incident may include an incident ID, a problem key, a timestamp when the incident was generated, a set of correlation keys associated with the incident, and the like.
At 418, the information determined in 402, 404, 406, 408, 410, 412, 414, and 416 is provided to or accessed by DDE 112a and DDE rules engine 212 for evaluation of DDE rules.
As mentioned previously, there are two kinds of diagnostic actions or DDE actions that may be associated with a DDE rule. A first type of DDE action is performed as soon as the DDE rule is deemed to have been met or satisfied. Such an action is automatically performed without any user intervention. The other type of DDE action is not executed automatically but instead recommended to the user who determines whether the recommended action is executed or not. Such an action is sometimes referred to as user actions since its execution is triggered by users through user interface 218 (e.g., command line interface or a web-based user interface). The user may be an administrator of monitored system 110 or a user of diagnosability framework 112. Typically, a user action is an action that consumes a significant amount of time and system resources if executed at the time of the failure or error and could thus impact the working of monitored system 110. Accordingly, it is up to the user to determine if the recommended action is to be executed and, if so, when the action is to be executed. In one embodiment, a user action may be executed at some point much later than when the error condition that triggered the recommendation of the action (also sometimes referred to as a postmortem action). For example, a user action that involves building a test case based on SQL statements in a dump may consume a large amount of system resources and have potential security implications for some customers. Accordingly, such an action is only performed after receiving user confirmation and at some point much later than when the error that triggered the recommendation of the action occurred.
FIG. 5 is a simplified flow diagram illustrating a method for performing a recommended diagnostic action (i.e., user action) according to an embodiment of the present invention. The processing depicted in FIG. 5 may be performed by software (executed by a processor), hardware, or combinations thereof.
Referring to FIG. 5, at 504, information is received identifying a user action to be performed. For example, the information identifying the user action may be received from DDE 112a. The information received at 504 may include an action name, an action ID, one or more user-action parameters provided by DDE 112a, and other information related to the user action. For example, if the user action is related to SQL statements, DDE 112a may set the SQL identifier to a current value of the SQL identifier at the time of the detection of the condition identified in 302 and provide the SQL identifier value to the user when recommending the user action in 504.
At 506, processing is performed to determine if the user action is approved for execution. For example, the user may determine whether the recommended action is executed or not. By allowing the user to control the execution of a DDE action, the possible system performance impact of automatically performing heavy data gathering at the time of the error condition is avoided. If it is determined that the user action is not to be executed, then processing ends. For example, the user may deny the user action if such an action would consume a large amount of system resources that exceed a manageable limit.
Otherwise, the user action is executed at 508. For example, the user action may be executed by the user directly or is recommended and executed by the user using the web interface. In one embodiment, a user action may be executed before a package comprising diagnostic data for a condition is to be transmitted to a vendor for diagnosis. A user action recommended by DDE 112a may be executed using context data determined for a condition that triggers the recommendation of the user action and/or using one or more parameters provided by DDE 112a. 
As mentioned previously, a user action may be executed at a much later time than at the time of the detection of the condition identified in 302. By using the context data determined for a condition that triggers the recommendation of the user action (e.g., context data determined in 304), even though the user action is executed much later, the user action is executed as if the action was executed at the time of the detection of the condition identified in 302. In this manner, the downside of not running the recommended user action at the time of the detection of the condition identified in 302 is reduced, if not eliminated.
At 510, the results from executing the recommended user action in 508 may be output and/or stored. For example, the results from executing the user action may be stored in diagnostic data repository 112b. The results from executing the user action may include information related to monitored system 110 that is determined and/or gathered for diagnostic purposes. In one embodiment, the results from executing the user action may be displayed to a user via a display device (optional).
FIG. 6 is a simplified block diagram of a computer system that may be used to practice an embodiment of the various inventions described in this application. Computer system 600 may serve as the platform for the diagnosability frameworks depicted in FIG. 1. For example, a computer system 600 at the monitored system site may serve as a platform for diagnosability framework 112. A computer system 600 located at a diagnosis site may serve as a platform for diagnosability framework 116. A diagnosability framework may also be distributed across multiple computer systems.
As shown in FIG. 6, computer system 600 includes a processor 602 that communicates with a number of peripheral subsystems via a bus subsystem 604. These peripheral subsystems may include a storage subsystem 606, comprising a memory subsystem 608 and a file storage subsystem 610, user interface input devices 612, user interface output devices 614, and a network interface subsystem 616.
Bus subsystem 604 provides a mechanism for letting the various components and subsystems of computer system 600 communicate with each other as intended. Although bus subsystem 604 is shown schematically as a single bus, alternative embodiments of the bus subsystem may utilize multiple busses.
Network interface subsystem 616 provides an interface to other computer systems, networks, and portals. Network interface subsystem 616 serves as an interface for receiving data from and transmitting data to other systems from computer system 600. For example, for the diagnosability framework deployed at the customer site or site where the software system is deployed, network interface subsystem 616 may be configured to transfer diagnostic packages from the customer site to the vendor or diagnosis site.
User interface input devices 612 may include a keyboard, pointing devices such as a mouse, trackball, touchpad, or graphics tablet, a scanner, a barcode scanner, a touch screen incorporated into the display, audio input devices such as voice recognition systems, microphones, and other types of input devices. In general, use of the term “input device” is intended to include all possible types of devices and mechanisms for inputting information to computer system 600.
User interface output devices 614 may include a display subsystem, a printer, a fax machine, or non-visual displays such as audio output devices, etc. The display subsystem may be a cathode ray tube (CRT), a flat-panel device such as a liquid crystal display (LCD), or a projection device. In general, use of the term “output device” is intended to include all possible types of devices and mechanisms for outputting information from computer system 600.
Storage subsystem 606 provides a computer-readable medium for storing the basic programming and data constructs that provide the functionality of the present invention. Software (code modules or instructions) that provides the functionality of the present invention may be stored in storage subsystem 606. These software modules or instructions may be executed by processor(s) 602. Storage subsystem 606 may also provide a repository for storing data used in accordance with the present invention such as the diagnostic data repository. Storage subsystem 606 may comprise memory subsystem 608 and file/disk storage subsystem 610.
Memory subsystem 608 may include a number of memories including a main random access memory (RAM) 618 for storage of instructions and data during program execution and a read only memory (ROM) 620 in which fixed instructions are stored. File storage subsystem 610 provides persistent (non-volatile) storage for program and data files, and may include a hard disk drive, a floppy disk drive along with associated removable media, a Compact Disk Read Only Memory (CD-ROM) drive, an optical drive, removable media cartridges, and other like storage media.
Computer system 600 can be of various types including a personal computer, a portable computer, a workstation, a network computer, a mainframe, a kiosk, a server or any other data processing system. Due to the ever-changing nature of computers and networks, the description of computer system 600 depicted in FIG. 6 is intended only as a specific example for purposes of illustrating the preferred embodiment of the computer system. Many other configurations having more or fewer components than the system depicted in FIG. 6 are possible.
Although specific embodiments of the invention have been described, various modifications, alterations, alternative constructions, and equivalents are also encompassed within the scope of the invention. The described invention is not restricted to operation within certain specific data processing environments, but is free to operate within a plurality of data processing environments. Additionally, although the present invention has been described using a particular series of transactions and steps, it should be apparent to those skilled in the art that the scope of the present invention is not limited to the described series of transactions and steps. While the embodiments of the diagnosability framework have been described as providing diagnostic support for software product instances, in alternative embodiments, embodiments of the present invention may be used for providing diagnostic support for software products, hardware products, or products having combination of software and hardware.
Further, while the present invention has been described using a particular combination of hardware and software, it should be recognized that other combinations of hardware and software are also within the scope of the present invention. The present invention may be implemented using hardware, software, or combinations thereof.
The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that additions, subtractions, deletions, and other modifications and changes may be made thereunto without departing from the broader spirit and scope of the inventions.

## Claims

1. A method for determining a diagnostic action in a monitored system, the method comprising:
determining, by a computer system, context data for a condition detected in the monitored system, wherein the determined context data includes information related to the detected condition in the monitored system, information related to functions and/or processes that are being executed in the monitored system, or combinations thereof,
wherein determining the context data for the detected condition comprises determining, by the computer system, information related to one or more components in the monitored system and information related to a function or process that is tagged as relevant to diagnosis; and
determining, by the computer system, a diagnostic action to be performed responsive to the detected condition based upon the context data determined.

2. The method of claim 1 wherein determining the context data for the detected condition comprises determining an error number and one or more error arguments associated with the condition detected in the monitored system.

3. The method of claim 1 wherein determining the information related to one or more components comprises determining information related to one or more components that are active on a call stack.

4. The method of claim 1 wherein determining the information related to one or more components comprises determining information related to a component that is identified as most likely having caused the detected condition in the monitored system.

5. The method of claim 1 wherein determining the information related to one or more components comprises determining information related to a component that signaled the detected condition in the monitored system.

6. The method of claim 1 wherein determining the context data for the detected condition comprises determining information related to an impact that the detected condition has on the monitored system.

7. The method of claim 1 wherein determining the diagnostic action to be performed comprises:
determining, by the computer system, a set of one or more rules configured for the monitored system, each rule specifying a condition and one or more actions to be performed when the condition specified in the rule is satisfied; and
determining, by the computer system, that the condition associated with a first rule from the set of rules is satisfied by the context data determined, wherein at least one action specified by the first rule is the diagnostic action determined to be performed in the monitored system.

8. The method of claim 1 further comprising executing, by the computer system, the determined diagnostic action.

9. The method of claim 8 wherein executing the determined diagnostic action comprises gathering, by the computer system, diagnostic data that is relevant to the detected condition in the monitored system.

10. A computer-readable storage medium storing a plurality of instructions for controlling a processor to determine a diagnostic action in a monitored system, the plurality of instructions comprising:
instructions that cause the processor to determine context data for a condition detected in the monitored system, wherein the determined context data includes information related to the detected condition in the monitored system, information related to functions and/or processes that are being executed in the monitored system, or combinations thereof,
wherein the instructions that cause the processor to determine the context data for the detected condition comprise instructions that cause the processor to determine information related to one or more components in the monitored system and information related to a function or process that is tagged as relevant to diagnosis; and
instructions that cause the processor to determine a diagnostic action to be performed responsive to the detected condition based upon the context data determined.

11. The computer readable storage medium of claim 10 wherein the instructions that cause the processor to determine the context data for the detected condition comprise instructions that cause the processor to determine an error number and one or more error arguments associated with the condition detected in the monitored system.

12. The computer readable storage medium of claim 10 wherein the instructions that cause the processor to determine the context data for the detected condition comprise instructions that cause the processor to determine information related to one or more components that are active on a call stack.

13. The computer readable storage medium of claim 10 wherein the instructions that cause the processor to determine the context data for the detected condition comprise instructions that cause the processor to determine information related to an impact that the detected condition has on the monitored system.

14. The computer readable storage medium of claim 10 wherein the instructions that cause the processor to determine the diagnostic action to be performed comprise:
instructions that cause the processor to determine a set of one or more rules configured for the monitored system, each rule specifying a condition and one or more actions to be performed when the condition specified in the rule is satisfied; and
instructions that cause the processor to determine that the condition associated with a first rule from the set of rules is satisfied by the context data determined, wherein at least one action specified by the first rule is the diagnostic action determined to be performed in the monitored system.

15. The computer readable storage medium of claim 10 wherein the plurality of instructions further comprises instructions that cause the processor to gather diagnostic data that is relevant to the detected condition in the monitored system.

16. A system for determining a diagnostic action in a monitored system, the system comprising:
a memory; and
a processor coupled to the memory;
wherein the processor is configured to:
determine context data for a condition detected in the monitored system, wherein the determined context data includes information related to the detected condition in the monitored system, information related to functions and/or processes that are being executed in the monitored system, or combinations thereof,
determine information related to one or more components in the monitored system and information related to a function or process that is tagged as relevant to diagnosis; and
determine a diagnostic action to be performed responsive to the detected condition based upon the context data determined.

17. The system of claim 16, wherein the processor is further configured to determine information related to one or more components that are active on a call stack.

18. The system of claim 16, wherein the processor is further configured to determine information related to a component that signaled the detected condition in the monitored system.