Tivoli Header

Administrator's Reference


QUERY EVENT (Query Scheduled and Completed Events)

Use this command to check whether schedules processed successfully. You can minimize the time it takes to process this query by limiting the output to events whose scheduled start times fall within a date and time range.

The QUERY EVENT command may display information about an event for which there is no event record. For example, if you request information about a scheduled future event, this command will display the status of Future. Future indicates that an event record has not been created for this event. In addition, this command will display the status for past events whose event records have already been removed from the database. In this case, the server returns the status of Uncertain because the server cannot determine the actual event status without the event records.

The command syntax differs for queries that apply to scheduled client operations and to scheduled administrative commands.

QUERY EVENT -- Client Schedules

Use the QUERY EVENT command to display scheduled and completed events for selected clients.

Tivoli Storage Manager keeps only one version of an event record in the database. If a client schedule is changed, all previous event records for that schedule are removed from the database.

Privilege Class

Any administrator can issue this command.

Syntax

>>-Query EVent--domain_name--schedule_name---------------------->
 
   .-Type--=--Client-.
>--+-----------------+--+-------------------------+------------->
                        |           .-,---------. |
                        |           V           | |
                        '-Nodes--=----node_name-+-'
 
   .-BEGINDate--=--current_date-.  .-BEGINTime--=--00:00-.
>--+----------------------------+--+---------------------+------>
   '-BEGINDate--=--date---------'  '-BEGINTime--=--time--'
 
   .-ENDDate--=--end_date-.  .-ENDTime--=--23:59-.
>--+----------------------+--+-------------------+-------------->
   '-ENDDate--=--date-----'  '-ENDTime--=--time--'
 
   .-EXceptionsonly--=--No------.
>--+----------------------------+------------------------------->
   '-EXceptionsonly--=--+-No--+-'
                        '-Yes-'
 
   .-Format--=--Standard-----.
>--+-------------------------+---------------------------------><
   '-Format--=--+-Standard-+-'
                '-Detailed-'
 
 

Parameters

domain_name (Required)
Specifies the name of the policy domain to which the schedules belong. You can use a wildcard character to specify this name.

schedule_name (Required)
Specifies the name of the schedule for which events display. You can use a wildcard character to specify this name.

Type=Client
Specifies that the query displays events for client schedules. This parameter is optional. The default is CLIENT.

Nodes
Specifies the name of the client node that belongs to the specified policy domain for which events display. You can specify multiple client nodes by separating the names with commas and no intervening spaces. You can use wildcard characters to specify nodes. If you do not specify a client name, events for all clients that match the DOMAINNAME and SCHEDULENAME parameters display.

BEGINDate
Specifies the beginning date of the time range for events to be displayed. All events scheduled to start during this time are displayed. This parameter is optional. The default is the current date.

You can specify the data using one of the values below:

Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY+days or +days The current date plus days specified. The maximum number of days you can specify is 9999. TODAY +3 or +3.
TODAY-days or -days The current date minus days specified TODAY-7 or -7.

To query events scheduled to start during the past seven days, specify BEGINDATE=TODAY-7 ENDDATE=TODAY or BEGINDATE=-7 ENDDATE=TODAY.

BEGINTime
Specifies the beginning time of the range for events to be displayed. All events scheduled to start during this time are displayed. This parameter is optional. The default value is 00:00.

You can specify the data using one of the values below:

Value Description Example
HH:MM:SS A specific time on the specified begin date 10:30:08
NOW The current time on the specified begin date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified begin date NOW+03:00 or +03:00.

If you issue this command at 9:00 to query events scheduled to start 3 hours from now, you can specify either BEGINTIME=NOW+03:00 or BEGINTIME=+03:00. TSM displays events at 12:00 on the specified begin date.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified begin date NOW-04:00 or -04:00.

If you issue this command at 9:00 to query events scheduled to start during the last 4 hours, you can specify either BEGINTIME=NOW-04:00 ENDTIME=NOW or BEGINTIME=-04:00 ENDTIME=NOW. TSM displays events at 5:00 on the specified begin date.

ENDDate
Specifies the ending date of the time range for events to be displayed. All events that were schedule to start during this time are displayed. This parameter is optional. The default is the value used for the BEGINDATE.

You can specify the data using one of the values below:

Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY+days or +days The current date plus days specified. The maximum number of days you can specify is 9999. TODAY +3 or +3.
TODAY-days or -days The current date minus days specified TODAY-8 or -8.

To query events scheduled to start during a one-week period that ended yesterday, you can specify either BEGINDATE=TODAY-8   ENDDATE=TODAY-1 or BEGINDATE=-8  ENDDATE=-1.

ENDTime
Specifies the ending time of the range for events to be displayed. All events that were scheduled to start during this time are displayed. This parameter is optional. The default value is 23:59.

You can specify the data using one of the values below:

Value Description Example
HH:MM:SS A specific time on the specified end date 10:30:08
NOW The current time on the specified end date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified end date NOW+03:00 or +03:00.

If you issue this command at 9:00 to query events scheduled to start 3 hours from now, you can specify either BEGINTIME=NOW ENDTIME=NOW+03:00 or BEGINTIME=NOW ENDTIME=+03:00.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified end date NOW-04:00 or -04:00

EXceptionsonly
Specifies the type of information you want on scheduled or completed events. This parameter is optional. The default is NO. Possible values are:

No
Specifies that the information on past and projected events is displayed.

Yes
Specifies that the events that failed or did not process as scheduled are displayed.

Format
Specifies how information displays. This parameter is optional. The default is STANDARD. Possible values are:

Standard
Specifies that partial information for events displays.

Detailed
Specifies that complete information for events displays.

Examples

Task 1

Display partial information for all events scheduled for DOMAIN1 that did not execute successfully. Limit the search to the client named JOE. Limit the events displayed to those that were scheduled to occur from February 11, 2001 (02/11/2001) to February 12, 2001 (02/12/2001).

Command:
query event domain1 * nodes=joe begindate=02/11/2001 
enddate=02/12/2001 exceptionsonly=yes

Output:
 
+--------------------------------------------------------------------------------+
|Scheduled Start      Actual Start          Schedule  Node    Status             |
|                                            Name     Name                       |
|-------------------- --------------------  --------- ----   ---------           |
|02/11/1999 01:00:00  02/11/1999 01:13:55   BACK1      JOE   Failed              |
|02/12/1999 01:00:00                        DAILYBKP   JOE   Missed              |
+--------------------------------------------------------------------------------+

Task 2

Display complete information for all events scheduled for processing by client JOE in DOMAIN1. Use any time from January 16, 1999 (01/16/1999) through January 17, 1999 (01/17/1999).

Command:
query event domain1 * nodes=joe 
begindate=01/16/1999 enddate=01/17/1999 format=detailed

Output:
 
+--------------------------------------------------------------------------------+
|Policy Domain Name: DOMAIN1                                                     |
|     Schedule Name: DAILY_BACKUP                                                |
|         Node Name: JOE                                                         |
|   Scheduled Start: 01/16/1999 01:00:00                                         |
|      Actual Start:                                                             |
|         Completed:                                                             |
|            Status: Missed                                                      |
|            Result: 0                                                           |
|                                                                                |
|Policy Domain Name: DOMAIN1                                                     |
|     Schedule Name: DAILY_BACKUP                                                |
|         Node Name: JOE                                                         |
|   Scheduled Start: 01/16/1999 01:00:00                                         |
|      Actual Start: 01/16/1999 01:13:55                                         |
|         Completed: 01/16/1999 01:18:27                                         |
|            Status: Completed                                                   |
|            Result: 0                                                           |
+--------------------------------------------------------------------------------+

where:

Policy Domain Name
Specifies the name of the policy domain to which the schedule is assigned.

Schedule Name
Specifies the name of the schedule that initiated this event.

Node Name
Specifies the client scheduled to perform the operation.

Scheduled Start
Specifies the scheduled starting date and time for the event.

Actual Start
Specifies the date and time at which the client began processing the scheduled operation. No information is displayed if the schedule has not started executing.

Completed
Specifies the date and time the scheduled event is completed.

Status
Specifies whether the startup of the event has been completed. Possible values are:

Completed
Specifies that the scheduled event has been completed.

Missed
Specifies that the scheduled startup window for this event has passed and the schedule has not begun.

Failed
Specifies that the client reports a failure in executing the scheduled operation and successive retries have not succeeded.

Started
Specifies that the event has begun processing.

Restarted
Specifies that the client has retried processing the scheduled operation.

Severed
Specifies that the communications with the client is severed before the event can complete.

Future
Specifies that the beginning of the startup window for the event is in the future.

Pending
Specifies that the QUERY EVENT command was issued during the startup window for the event, but processing the scheduled operation has not yet begun.

Uncertain
Specifies that the state of the event cannot be determined. The server specifies Uncertain if the QUERY EVENT command does not find an event record. An event record will not be found if the record was deleted or if the server was unavailable during the scheduled startup window (the schedule was never started). Records with Uncertain status do not reside in the database. If you do not want these records to display, either specify EXCEPTIONSONLY=YES or delete the schedule if it is no longer needed.
Note:
When a scheduled operation is processing, without having been restarted within its specified duration, the Status field shows Started. If the operation continues beyond the specified duration, no event record is created. If a query is issued after the specified duration has passed, the Status shows as Failed even if the operation is still running. After the operation completes, an event record is created, and a subsequent query shows the result in the Status field.

Result
Specifies the return code from the client that identifies whether the schedule has processed successfully. If the return code is something other than a zero, examine the option string. You specified this option string by using either the OPTIONS parameter or the OBJECTS parameter in the DEFINE SCHEDULE command.

QUERY EVENT -- Administrative Schedules

Use the QUERY EVENT command to display scheduled and completed events for selected administrative command schedules.

Privilege Class

Any administrator can issue this command.

Syntax

>>-Query EVent--schedule_name--Type--=--Administrative---------->
 
   .-BEGINDate--=--current_date-.  .-BEGINTime--=--00:00-.
>--+----------------------------+--+---------------------+------>
   '-BEGINDate--=--date---------'  '-BEGINTime--=--time--'
 
   .-ENDDate--=--begin_date-.  .-ENDTime--=--23:59-.
>--+------------------------+--+-------------------+------------>
   '-ENDDate--=--date-------'  '-ENDTime--=--time--'
 
   .-EXceptionsonly--=--No------.
>--+----------------------------+------------------------------->
   '-EXceptionsonly--=--+-No--+-'
                        '-Yes-'
 
   .-Format--=--Standard-----.
>--+-------------------------+---------------------------------><
   '-Format--=--+-Standard-+-'
                '-Detailed-'
 
 

Parameters

schedule_name (Required)
Specifies the name of the schedule for which events display. You can use wildcard characters to specify names.

Type=Administrative (Required)
Specifies that the query displays events for administrative command schedules.

BEGINDate
Specifies the beginning date of the time range for events to be displayed. All events scheduled to start during this time are displayed. This parameter is optional. The default is the current date.

You can specify the data using one of the values below:

Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY+days or +days The current date plus days specified. The maximum number of days you can specify is 9999. TODAY +3 or +3.
TODAY-days or -days The current date minus days specified TODAY-7 or -7.

To query events scheduled to start during the past seven days, specify BEGINDATE=TODAY-7 ENDDATE=TODAY or BEGINDATE=-7 ENDDATE=TODAY.

BEGINTime
Specifies the beginning time of the range for events to be displayed. All events scheduled to start during this time are displayed. This parameter is optional. The default value is 00:00.

You can specify the data using one of the values below:

Value Description Example
HH:MM:SS A specific time on the specified begin date 10:30:08
NOW The current time on the specified begin date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified begin date NOW+03:00 or +03:00.

If you issue this command at 9:00 to query events scheduled to start 3 hours from now, you can specify either BEGINTIME=NOW+03:00 or BEGINTIME=+03:00. TSM displays events at 12:00 on the specified begin date.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified begin date NOW-04:00 or -04:00.

If you issue this command at 9:00 to query events scheduled to start during the last 4 hours, you can specify either BEGINTIME=NOW-04:00 ENDTIME=NOW or BEGINTIME=-04:00 ENDTIME=NOW. TSM displays events at 5:00 on the specified begin date.

ENDDate
Specifies the ending date of the time range for events to be displayed. All events that were schedule to start during this time are displayed. This parameter is optional. The default is the value used for the BEGINDATE.

You can specify the data using one of the values below:

Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY+days or +days The current date plus days specified. The maximum number of days you can specify is 9999. TODAY +3 or +3.
TODAY-days or -days The current date minus days specified TODAY-8 or -8.

To query events scheduled to start during a one-week period that ended yesterday, you can specify either BEGINDATE=TODAY-8   ENDDATE=TODAY-1 or BEGINDATE=-8  ENDDATE=-1.

ENDTime
Specifies the ending time of the range for events to be displayed. All events that were scheduled to start during this time are displayed. This parameter is optional. The default value is 23:59.

You can specify the data using one of the values below:

Value Description Example
HH:MM:SS A specific time on the specified end date 10:30:08
NOW The current time on the specified end date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified end date NOW+03:00 or +03:00.

If you issue this command at 9:00 to query events scheduled to start 3 hours from now, you can specify either BEGINTIME=NOW ENDTIME=NOW+03:00 or BEGINTIME=NOW ENDTIME=+03:00.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified end date NOW-04:00 or -04:00

EXceptionsonly
Specifies the type of information you want on scheduled or completed events. This parameter is optional. The default is NO. Possible values are:

No
Specifies that the information on past and projected events is displayed.

Yes
Specifies that the events that failed or did not process as scheduled are displayed.

Format
Specifies how the information displays. This parameter is optional. The default value is STANDARD. Possible values are:

Standard
Specifies that partial information for events displays.

Detailed
Specifies that complete information for events displays.

Examples

Task

Display partial information for all events scheduled for an administrative schedule named DOSADMIN. Limit the query to events that are scheduled for March 30, 1999 (03/30/1999).

Command:
query event dosadmin type=administrative 
begindate=03/30/1999 
enddate=03/30/1999 

Output:
 
+--------------------------------------------------------------------------------+
|Scheduled Start      Actual Start          Schedule Status                      |
|                                            Name                                |
|-------------------- --------------------  --------- ---------                  |
|03/30/1999 00:00:00 03/30/1999 00:00:01    DOSADMIN  Completed                  |
|03/30/1999 04:00:00 03/30/1999 04:00:01    DOSADMIN  Completed                  |
|03/30/1999 12:00:00                        DOSADMIN  Future                     |
|03/30/1999 16:00:00                        DOSADMIN  Future                     |
+--------------------------------------------------------------------------------+

where:

Scheduled Start
Specifies the scheduled starting date and time for the event.

Actual Start
Specifies the date and time at which the client began processing the scheduled operation. No information displays if the schedule has not started executing.

Schedule Name
Specifies the name of the schedule that initiated this event.

Status
Specifies whether the startup of the event has been completed.

Related Commands


Table 184. Commands Related to QUERY EVENT

Command Description
QUERY ACTLOG Displays messages from the server activity log.
DELETE EVENT Deletes event records prior to a specified date and time.
SET EVENTRETENTION Specifies the number of days to retain records for scheduled operations.
SET RANDOMIZE Specifies the randomization of start times within a window for schedules in client-polling mode.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]