SHOW ALERT

Purpose

Shows the contents of the alert log in the default editor.

Syntax and Description

show alert [-p "predicate_string"] [-tail [num] [-f]] [-term]
  [-file alert_file_name]

Except when using the -term flag, this command works with only a single current ADR home. If more than one ADR home is set, ADRCI prompts you to choose the ADR home to use.


Table 17-12 Flags for the SHOW ALERT command

Flag Description

-p "predicate_string"

Uses a SQL-like predicate string to show only the alert log entries for which the predicate is true. The predicate string must be enclosed in double quotation marks.

Table 17-13 lists the fields that can be used in the predicate string.

-tail [num] [-f]

Displays the most recent entries in the alert log.

Use the num option to display the last num entries in the alert log. If num is omitted, the last 10 entries are displayed.

If the -f option is given, after displaying the requested messages, the command does not return. Instead, it remains active and continuously displays new alert log entries to the terminal as they arrive in the alert log. You can use this command to perform live monitoring of the alert log. To terminate the command, press CTRL+C.

-term

Directs results to the terminal. Outputs the entire alert logs from all current ADR homes, one after another. If this option is not given, the results are displayed in the default editor.

-file alert_file_name

Enables you to specify an alert file outside the ADR. alert_file_name must be specified with a full path name. Note that this option cannot be used with the -tail option.



Table 17-13 Alert Fields for SHOW ALERT

Field Type

ORIGINATING_TIMESTAMP

timestamp

NORMALIZED_TIMESTAMP

timestamp

ORGANIZATION_ID

text(65)

COMPONENT_ID

text(65)

HOST_ID

text(65)

HOST_ADDRESS

text(17)

MESSAGE_TYPE

number

MESSAGE_LEVEL

number

MESSAGE_ID

text(65)

MESSAGE_GROUP

text(65)

CLIENT_ID

text(65)

MODULE_ID

text(65)

PROCESS_ID

text(33)

THREAD_ID

text(65)

USER_ID

text(65)

INSTANCE_ID

text(65)

DETAILED_LOCATION

text(161)

UPSTREAM_COMP_ID

text(101)

DOWNSTREAM_COMP_ID

text(101)

EXECUTION_CONTEXT_ID

text(101)

EXECUTION_CONTEXT_SEQUENCE

number

ERROR_INSTANCE_ID

number

ERROR_INSTANCE_SEQUENCE

number

MESSAGE_TEXT

text(2049)

MESSAGE_ARGUMENTS

text(129)

SUPPLEMENTAL_ATTRIBUTES

text(129)

SUPPLEMENTAL_DETAILS

text(4000)

PROBLEM_KEY

text(65)


Examples

This example shows all alert messages for the current ADR home in the default editor:

show alert

This example shows all alert messages for the current ADR home and directs the output to the terminal instead of the default editor:

show alert -term

This example shows all alert messages for the current ADR home with message text describing an incident:

show alert -p "message_text like '%incident%'"

This example shows the last twenty alert messages, and then keeps the alert log open, displaying new alert log entries as they arrive:

show alert -tail 20 -f

This example shows all alert messages for a single ADR home in the default editor when multiple ADR homes have been set:

show alert

Choose the alert log from the following homes to view:

1: diag/tnslsnr/dbhost1/listener
2: diag/asm/+asm/+ASM
3: diag/rdbms/orcl/orcl
4: diag/clients/user_oracle/host_9999999999_11
Q: to quit

Please select option:
3

See Also:

"SET EDITOR"