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
For example, to display information beginning with records created a week ago, you can specify TODAY-7 or simply -7.
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.
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.
For example, to display all volume history information created up to yesterday, you can specify TODAY-1 or simply -1.
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.
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.
Examples
Task 1
Search the activity log for all messages appearing on April 27, 1997 (04/27/97), between 14:57 and 15:39.
+--------------------------------------------------------------------------------+ |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.
+--------------------------------------------------------------------------------+ |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.
+--------------------------------------------------------------------------------+ |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.
+--------------------------------------------------------------------------------+ |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:
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. |