A computer-implemented method for monitoring a computer system when the computer
system executes a user application using a production operating system (OS) is
disclosed. The method includes providing a diagnostic monitor, the diagnostic monitor
being configured to be capable of executing even if the OS kernel fails to execute,
the diagnostic monitor having a monitor trap arrangement. If a trap is encountered
during execution of the user application, the method includes ascertaining using
the diagnostic monitor whether the trap is to be handled by the OS kernel or the
diagnostic monitor. If the trap is to be handled by the OS kernel, the method includes
passing the trap to the OS kernel for handling.