Administrator's Reference

QUERY ACTLOG (Search Activity Log for Messages)

Use the QUERY ACTLOG command to search the server activity log for messages selected by a range of time or date, message number, or string expression. If you do not specify any parameters for this command, all messages that were generated in the last hour are displayed.
Note:You cannot schedule the QUERY ACTLOG command using the DEFINE SCHEDULE command (central scheduling).

The activity log contains all the messages that are sent to the server console under normal operation. These messages include session start and termination, background process messages, sequential access media mount information, and inventory expiration. Responses to commands entered at the server console are not recorded in the activity log, unless the command affects or starts a background process or client session. All error messages are retained in the activity log.

To minimize the processing time when querying the activity log, do the following:

Privilege Class

Any administrator can issue this command.

Syntax

                  .-BEGINDate--=--currentdate--.
>>-Query ACtlog---+----------------------------+---------------->
                  '-BEGINDate--=--begindate----'
 
     .-BEGINTime--=--currenttime_minus_1_hour--.
>----+-----------------------------------------+---------------->
     '-BEGINTime--=--begintime-----------------'
 
     .-ENDDate--=--currentdate--.  .-ENDTime--=--currenttime--.
>----+--------------------------+--+--------------------------+->
     '-ENDDate--=--enddate------'  '-ENDTime--=--endtime------'
 
>----+----------------------+--+------------------------+------->
     '-MSGno--=--msgnumber--'  '-Search--=--stringexpr--'
 
    .-ORiginator--=--ALL------------------.
>---+-------------------------------------+--------------------><
    '-ORiginator--=--+-ALL-------------+--'
                     +-SErver----------+
                     '-CLient--| A |---'
 
A
 
|--+------------------------+--+--------------------------+----->
   '-NODEname--=--nodename--'  '-OWNERname--=--ownername--'
 
>---+---------------------------------------------------------+->
    '-SCHedname--=--schedulename--Domainname--=--domainname---'
 
>---+---------------------------+-------------------------------|
    '-SESsnum--=--sessionumber--'
 

Parameters

BEGINDate=date

Specifies the beginning date of the range for the messages to be displayed, in MM/DD/YYYY format, and displays all the messages meeting the time range criteria that occurred after this date. The default value is the current date. This parameter is optional. Possible values are:

MM/DD/YYYY

Specifies that you want to display information beginning with records created on a specific date, using MM/DD/YYYY format (for example, 01/31/1997).

TODAY

Specifies that you want to display information beginning with records created on the current date.

TODAY-numdays or -numdays

Specifies that you want to display information beginning with records created on the current date minus a specific number of days. The maximum value for the number of days is 9999.

For example, to display information beginning with records created a week ago, you can specify TODAY-7 or simply -7.

BEGINTime=currenttime_minus_1_hour

Specifies the beginning time of the range for messages to be displayed, in HH:MM format, and displays all the messages meeting the time range criteria that occurred after this time. If you do not specify a value for this parameter, all messages that occurred in the last hour are displayed. This parameter is optional. Possible values are:

HH:MM:SS

Specifies that you want to display information beginning with records created at a specific time on the specified begin date using HH:MM:SS format (for example, 12:33:28).

NOW

Specifies that you want to display information beginning with records created on or before the current time on the specified begin date.

NOW+numhours:numminutes or +numhours:numminutes

Specifies that you want to display information beginning with records created on or before the current time plus a specific number of hours (and, optionally, minutes) on the specified begin date.

For example, if you issue the QUERY ACTLOG command at 9:00 with BEGINTime=NOW+3 or BEGINTime=+3, ADSM displays records with a time of 12:00 or later on the specified begin date.

NOW-numhours:numminutes or -numhours:numminutes

Specifies that you want to display information beginning with records created on or before the current time minus a specific number of hours (and, optionally, minutes) on the specified begin date.

For example, if you issue the QUERY ACTLOG command at 9:00 with BEGINTime=NOW-3:30 or BEGINTime=-3:30, ADSM displays records with a time of 5:30 or later on the specified begin date.

ENDDate=date

Specifies the ending date of the range for messages to be displayed, in MM/DD/YYYY format. All messages meeting the time range criteria that occurred before this date are displayed. If you do not specify a value for this parameter, the current date is used. All the dates and times used are server date and time. This parameter is optional. Possible values are:

MM/DD/YYYY

Specifies that you want to display information ending with records created on a specific date using MM/DD/YYYY format (for example, 02/28/97).

TODAY

Specifies that you want to display information ending with records created on the current date.

TODAY-numdays or -numdays

Specifies that you want to display information ending with records created on or before the current date minus a specific number of days. The maximum value for the number of days is 9999.

For example, to display all volume history information created up to yesterday, you can specify TODAY-1 or simply -1.

ENDTime=currenttime

Specifies the ending time of the range for messages to be displayed, in HH:MM format, and displays all the messages meeting the time range criteria that occurred before this time. If you do not specify a value for this parameter, all messages are displayed up to the time when you issued this command. This parameter is optional. Possible values are:

HH:MM:SS

Specifies that you want to display information ending with records created on or before a specific time on the specified end date using HH:MM:SS format (for example, 12:33:28).

NOW

Specifies that you want to display information ending with records created on or before the current time on the specified end date.

NOW+numhours:numminutes or +numhours:numminutes

Specifies that you want to display information ending with records created on or before the current time plus a specific number of hours (and, optionally, minutes) on the specified end date.

For example, if you issue the QUERY ACTLOG command at 9:00 with ENDTime=NOW+3 or ENDTime=+3, ADSM displays records with a time of 12:00 or later on the specified end date.

NOW-numhours:numminutes or -numhours:numminutes

Specifies that you want to display information beginning with records created on or before the current time minus a specific number of hours (and, optionally, minutes) on the specified end date.

For example, if you issue the QUERY ACTLOG command at 9:00 with ENDTime=NOW-3:30 or ENDTime=-3:30, ADSM displays records with a time of 5:30 or later on the specified end date.

MSGno=msgnumber

Specifies an integer that defines the number of the message to be displayed from the activity log. This is the numeric part of the message without the ANR prefix or the message type suffix (that is, I, W, E, S, or D). If you do not specify a value for this parameter, all activity log messages are displayed. This parameter is optional.

Search=stringexpr

Specifies a string expression that you want to search for in the activity log. The string expression must be enclosed in quotation marks if it contains blanks. You can use a pattern-matching expression to specify this string. All matching strings are displayed. If you do not specify a value for this parameter, all strings are displayed. This parameter is optional.

ORiginator=originatorname

Specifies whether you want messages logged by the client or by the server. Messages from both the client and the server are displayed if not specified. This parameter is optional. Possible values are:

ALL

Specifies that you want to display messages from both the client and the server.

SErver

Specifies that you want to display only server messages.

CLient

Specifies that you want to display only client messages.

NODEname=nodename

Specifies that you want to display messages logged for a particular node. If you do not specify a value for this parameter, messages for all nodes are displayed. This parameter is optional.

OWNERname=ownername

Specifies that you want to display messages logged for a particular owner. If you do not specify a value for this parameter, messages for all owners are displayed. This parameter is optional.

SCHedname=schedulename

Specifies that you want to display messages logged by a particular scheduled client activity. If you do not specify a value for this parameter, messages for all schedules are displayed. This parameter is optional.

DOmainname=domainname

Specifies the policy domain to which a named schedule belongs. This parameter is optional, unless you are specifying a schedule name.

SESsnum=sessionnumber

Specifies that you want to search for messages logged for a particular node session number. If you do not specify a value for this parameter, messages for all sessions are displayed. This parameter is optional.

Examples

Task 1

Search the activity log for all messages appearing on April 27, 1997 (04/27/97), between 14:57 and 15:39.

Command:
query actlog begindate=04/27/l997 begintime=14:57 endtime=15:39

Output:
 

+--------------------------------------------------------------------------------+
|Date/Time            Message                                                    |
|-------------------- -------------------------------------------------          |
|04/27/1997 14:57:30  ANR0402I Session 17 started for administrator              |
|                      TOMC (AS400).                                             |
|04/27/1997 15:19:43  ANR0811I Inventory client file expiration                  |
|                      started.                                                  |
|04/27/1997 15:19:43  ANR0812I Inventory client file expiration                  |
|                      complete: 0 files deleted.                                |
|04/27/1997 15:31:30  ANR0482W Session 17 terminated - idle more than            |
|                      15 minute(s).                                             |
|04/27/1997 15:38:35  ANR0402I Session 18 started for administrator              |
|                      TOMC (AS400).                                             |
+--------------------------------------------------------------------------------+

See Task 4 for parameter definitions.

Task 2

Search the activity log for any message that contains the string "delete". The output includes only messages produced during the past hour.

Command:
query actlog search=delete

Output:
 

+--------------------------------------------------------------------------------+
|Date/Time            Message                                                    |
|-------------------- -------------------------------------------------          |
|08/27/1997 15:19:43  ANR0812I Inventory client file expiration                  |
|                      complete: 0 files deleted.                                |
+--------------------------------------------------------------------------------+

See Task 4 for parameter definitions.

Task 3

Display messages that contain the text string export. Search the activity log for messages that occurred on May 5, 1997 (05/05/1997), after 10:00.

Command:
query actlog begindate=05/05/l997 begintime=10:00 search=export*

Output:
 

+--------------------------------------------------------------------------------+
|Date/Time            Message                                                    |
|-------------------- -------------------------------------------------          |
|05/05/1997 10:00:27  ANR1360I Export volume EXP001 opened (sequence             |
|                      number 1).                                                |
|05/05/1997 10:00:27  ANR0610I EXPORT SERVER started by JANET                    |
|                      as process 4.                                             |
|05/05/1997 10:00:27  ANR0639I EXPORT SERVER: Processing domain                  |
|                      ACCDOMAIN.                                                |
|05/05/1997 10:00:27  ANR0639I EXPORT SERVER: Processing domain                  |
|                      STANDARD.                                                 |
|05/05/1997 10:00:27  ANR0640I EXPORT SERVER: Processing policy set              |
|                      ACTIVE in policy domain ACCDOMAIN.                        |
|05/05/1997 10:00:27  ANR0640I EXPORT SERVER: Processing policy set              |
|                      STANDARD in policy domain ACCDOMAIN.                      |
|05/05/1997 10:00:27  ANR0640I EXPORT SERVER: Processing policy set              |
|                      ACTIVE in policy domain STANDARD.                         |
|05/05/1997 10:00:27  ANR0640I EXPORT SERVER: Processing policy set              |
|                      STANDARD in policy domain STANDARD.                       |
|05/05/1997 10:00:27  ANR0641I EXPORT SERVER: Processing management              |
|                      class STANDARD in domain ACCDOMAIN, set ACTIVE.           |
|05/05/1997 10:00:27  ANR0641I EXPORT SERVER: Processing management              |
|                      class STANDARD in domain ACCDOMAIN, set                   |
|                      STANDARD.                                                 |
|05/05/1997 10:00:27  ANR0641I EXPORT SERVER: Processing management              |
|                      class STANDARD in domain STANDARD, set ACTIVE.            |
|05/05/1997 10:00:27  ANR0641I EXPORT SERVER: Processing                         |
|                      management class MC in domain STANDARD, set               |
|                      STANDARD.                                                 |
|05/05/1997 10:00:27  ANR0641I EXPORT SERVER: Processing management              |
|                      class STANDARD in domain STANDARD, set STANDARD.          |
|05/05/1997 10:00:28  ANR0643I EXPORT SERVER: Processing archive copy            |
|                      group in domain ACCDOMAIN, set ACTIVE,                    |
|                      management class STANDARD.                                |
+--------------------------------------------------------------------------------+

See Task 4 for parameter definitions.

Task 4

Search the activity log for ADSM messages from the client for node JEE.

Command:
query actlog originator=client node=jee

Output:
 

+--------------------------------------------------------------------------------+
|Date/Time           Message                                                     |
|-------------------- -----------------------------------------------------      |
|06/10/1997 15:46:22 ANE4007E (Session No: 3 Node: JEE) Error processing         |
|                      '/jee/report.out': access to the object is                |
|                      denied                                                    |
|06/11/1997 15:56:56 ANE4009E (Session No: 4 Node: JEE) Error processing         |
|                     '/jee/work.lst': disk full condition                       |
|                                                                                |
+--------------------------------------------------------------------------------+

where:

Date/Time

Specifies the date and time that the message was generated.

Message

Specifies the message.

Related Commands

Table 119. Command Related to QUERY ACTLOG
Command Description
SET ACTLOGRETENTION Specifies the number of days to retain log records in the activity log.


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