ADSM provides a wide variety of QUERY commands that you can use to display formatted information about ADSM definitions, settings, processes, and status. In some cases, you can display the information in either of two formats: standard or detailed. The standard format presents partial information and is useful in displaying an overview of many objects.
Note: | For information about creating customized queries of the ADSM database, see "Using SQL to Query the ADSM Database". |
As part of the set up of an ADSM system, an administrator may define many ADSM objects such as storage management policies, database and recovery log volumes, storage pools, and device classes. ADSM provides queries that display information about these objects.
Most of these definition queries let you request standard format or detailed format. Standard format limits the information and usually displays it as one line per object. It is typically used when you want to query many objects, for example, all registered client nodes. Detailed format displays all definition parameters, both default and specified. Detailed format might be requested when you want to see all the information about a limited number of objects.
Here is an example of the standard output for the QUERY NODES command:
+--------------------------------------------------------------------------------+ |Node Name Platform Policy Days Days Locked? | | Domain Since Since | | Name Last Password | | Access Set | |---------- -------- --------- ------ -------- ------- | |CLIENT1 (?) STANDARD 6 6 No | |GEORGE OS/2 STANDARD 1 1 No | |JANET (?) STANDARD 1 1 No | |JOEOS2 OS/2 STANDARD <1 <1 No | |TOMC (?) STANDARD 1 1 No | +--------------------------------------------------------------------------------+
Here is an example of the detailed output for the QUERY NODES command:
+--------------------------------------------------------------------------------+ | Node Name: JOEOS2 | | Platform: OS/2 | | Policy Domain Name: STANDARD | | Last Access Date/Time: 05/19/1997 09:59:52 | | Days Since Last Access: 2 | | Password Set Date/Time: 05/18/1997 11:04:45 | | Days Since Password Set: 3 | | Invalid Password Limit: | | Minimum Password Length: | | Locked?: No | | Contact: | | Compression: No | | Archive Delete Allowed?: Yes | | Backup Delete Allowed?: No | | Registration Date/Time: 05/18/1997 11:04:45 | | Registering Administrator: OPEN_REGISTRATION | |Last Communication Method Used: Tcp/Ip | | Bytes Received Last Session: 226 | | Bytes Sent Last Session: 556 | |Duration of Last Session (sec): 3.32 | | Pct. Idle Wait Last Session: 88.48 | | Pct. Comm. Wait Last Session: 6.63 | | Pct. Media Wait Last Session: 0.00 | +--------------------------------------------------------------------------------+
When administrators or users access ADSM, an administrative or client node session is established with the server. Each client session is assigned a unique session number.
To request information about client sessions, enter:
query session
Figure 51 shows a sample client session report.
Figure 51. Information about Client Sessions
+--------------------------------------------------------------------------------+ | Sess Comm. Sess Wait Bytes Bytes Sess Platform Client Name | |Number Method State Time Sent Recvd Type | |------ ------ ------ ------ ------- ------- ----- -------- -------------------- | | 3 Tcp/Ip IdleW 9 S 7.8 K 706 Admin OS/2 TOMC | | 5 Tcp/Ip IdleW 0 S 1.2 K 222 Admin OS/2 GUEST | | 6 Tcp/Ip Run 0 S 117 130 Admin OS/2 MARIE | | | +--------------------------------------------------------------------------------+
Check the session state and wait time to determine the session state of the server and how long (in seconds, minutes, or hours) the session has been in the current state. The server session state can be one of the following:
If a client does not initiate communication within the specified time limit set by the IDLETIMEOUT option in the server options file, then ADSM cancels the client session.
For example, if the IDLETIMEOUT option is set to 30 minutes, and a user does not initiate any operations within those 30 minutes, then ADSM cancels the client session. The client session is automatically reconnected to the server when it starts to send data again.
Most ADSM commands run in the foreground, but others generate background processes. In some cases, you can specify that a process run in the foreground. ADSM issues messages that provide information about the start and end of processes. In addition, ADSM lets you request information about active background processes. If you know the process ID number, you can use the number to limit the search. However, if you do not know the process ID, you can display information about all background processes by entering:
query process
Figure 52 shows a server background process report after a DELETE FILESPACE command was issued. The report displays a process ID number, a description and a completion status for each background process.
Figure 52. Information about Background Processes
+--------------------------------------------------------------------------------+ | Process Process Description Status | | Number | |-------- ------------------------ --------------------------------------------- | | 2 DELETE FILESPACE Deleting filespace DRIVE_D for node CLIENT1: | | 172 files deleted. | | | +--------------------------------------------------------------------------------+
Any administrator can request information about the general server parameters defined by SET commands. To query the status of the server, enter:
query status
ADSM displays information about the server, such as:
Task | Required Privilege Class |
---|---|
Query server options | Any administrator |
Use the QUERY OPTION command to display information about one or more server options.
You can issue the QUERY OPTION command with no operands to display general information about all defined server options. You also can issue the QUERY OPTION command with a specific option name or pattern-matching expression to display information on one or more server options.
To display general information about all defined server options, enter:
query option
You can set options through the ADSM Server Utilities or by editing the server options file (see ADSM Administrator's Reference).
The QUERY SYSTEM command lets you combine multiple queries of your ADSM system into a single command. This command can be used to collect statistics and to provide information for problem determination by IBM service. When you issue the QUERY SYSTEM command, ADSM issues the following queries:
select platform_name,count(*) from nodes group by platform_name
select stgpool_name,devclass_name,count(*) from volumes group by stgpool_name,devclass_name
The first command displays the number of client nodes by platform.
The second command displays the name and associated device class of all storage pools having one or more volumes assigned to them.