HPlogo APPC Subsystem on MPE XL Node Manager's Guide: HP 3000 MPE/iX Computer Systems > Chapter 5 Managing the APPC Subsystem

Managing APPC Sessions

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

This section discusses the APPCCONTROL STATUS and APPCCONTROL SESSIONS commands.

You issue the APPCCONTROL STATUS command to check the status of the APPC subsystem during run time.

You use the APPCCONTROL SESSIONS command to control the number of active APPC sessions.

Checking APPC Subsystem Status

At subsystem startup, the number and characteristics of active sessions are determined by the parameters in the APPC configuration file. However, once the APPC subsystem is active, you can use the APPCCONTROL SESSIONS command to change session limits and session characteristics so that they no longer match the configuration parameters. The APPCCONTROL STATUS command is used to get the current status of the APPC subsystem.

The description of the APPCCONTROL STATUS command in Chapter 2 “Interactive Control Operator Commands” contains an item-by-item description of the display. This section uses several examples to illustrate the use of the APPCCONTROL STATUS command.

In the following example, the APPCCONTROL STATUS command is issued with no parameters, so information is displayed for all configured session types and all active TPs. The display shows two configured session types: one independent and one dependent. The independent session type, INDSESS1, has no active sessions. The dependent session type, DEPSESS1, has two active sessions.

Each active session is being used by a separate instance of the same TP. The TPIDs are different, indicating two different TP processes, but the Program File Name and TP Name are the same for both processes.

:APPCCONTROL STATUS
 
Internal Trace File : NMTC0020.PUB.SYS
Performance Tracing : ON
 
--------------------------------------------------
Number of Active Sessions for APPC Subsystem :   2
--------------------------------------------------
 
Session Type Information:
 
   --------------------------------------
   Independent LU Session Type : INDSESS1
   --------------------------------------
 
   Number of Active Sessions         :   0
   Number of Queued Session Requests :   0
                                                       Session Limits
   Local LU   SNA Node   Remote LU           Mode     Maximum  Current
   --------   --------   -----------------   ------   -------  -------
   INDLU1     SNANODE    NET1.IBMLUA         MODE1       50       0
 
   Session ID    LFSID    State       LU Type    TP ID 
   ----------    -----    --------    -------    ----- 
   * No active sessions
 
   ------------------------------------
   Dependent LU Session Type : DEPSESS1
   ------------------------------------
 
   Number of Active Sessions         :   2
   Number of Queued Session Requests :   1
 
                                   Maximum
   SNA Node   Remote LU   Mode     Sessions
   --------   ---------   ------   --------
   IBMNODE    DISOSSC     MODE3        8
 
   Session ID   LFSID   Local LU (NAU)  State     LU Type  TP ID 
   ----------   -----   --------------  --------  -------  -----
      15        0101 1  DEPLU8 (  8)    ACTIVE      SEC    2398
      52        0102 1  DEPLU9 (  9)    ACTIVE      SEC    2402
Transaction Program Information:
 
   TP ID    Program File Name       TP NAME      # Conv.    User Name
   -----    --------------------    ---------    -------    ------------
   2398     TP1.PUB.SYS             TP1             1       JOE.USER
   2402     TP1.PUB.SYS             TP1             1       FRED.USER

In the following example, the APPCCONTROL STATUS command is issued with the parameter STYPE=INDSESS2, so information is displayed for only one session type. Session type INDSESS2 is an independent session type with two active sessions. The identical TPIDs show that both sessions are being used by one instance of the same TP; that is, one instance of the TP is conducting two conversations simultaneously, over two APPC sessions.

:APPCCONTROL STATUS;STYPE=INDSESS2
 
Internal Trace File : NMTC0020.PUB.SYS
Performance Tracing : ON
 
--------------------------------------------------
Number of Active Sessions for APPC Subsystem :   3
--------------------------------------------------
 
Session Type Information:
 
   --------------------------------------
   Independent LU Session Type : INDSESS2
   --------------------------------------
 
   Number of Active Sessions         :   2
   Number of Queued Session Requests :   0
                                                       Session Limits
   Local LU   SNA Node   Remote LU           Mode     Maximum  Current
   --------   --------   -----------------   ------   -------  -------
   INDLU2     SNANODE    NET1.IBMLUA         MODE1        8        2
 
   Session ID    LFSID    State       LU Type    TP ID 
   ----------    -----    --------    -------    ----- 
     12          0103 1   ACTIVE        PRI      1256
     74          0104 1   ACTIVE        PRI      1256

Controlling the Number of Sessions

The APPC subsystem supports up to 256 active APPC sessions. By issuing the APPCCONTROL SESSIONS command, you can vary the number of active sessions and reapportion active sessions among different session types.

The following APPCCONTROL STATUS display shows the status of an example APPC session type at subsystem startup. This session type will be used in the rest of the examples in this section to illustrate the effects of the APPCCONTROL SESSIONS command.

--------------------------------------
   Independent LU Session Type : INDSESS1
   --------------------------------------
 
   Number of Active Sessions         :   0
   Number of Queued Session Requests :   4
                                                       Session Limits
   Local LU   SNA Node   Remote LU           Mode     Maximum  Current
   --------   --------   -----------------   ------   -------  -------
   INDLU2     SNANODE    NET1.IBMLUA         MODE1       8        0
 
   Session ID    LFSID    State       LU Type    TP ID 
   ----------    -----    --------    -------    ----- 
   * No active sessions

In the example above, independent session type INDSESS1 has four queued session requests. That means four TP processes have called the MCAllocate or MCGetAllocate intrinsic, specifying INDSESS1 in the SessionType parameter. The session requests were queued to wait for available active sessions.

No sessions of type INDSESS1 are active, because the configured number of automatically activated sessions is 0, and no one has issued the APPCCONTROL SESSIONS command to activate more sessions. After the APPCCONTROL SESSIONS command is issued to activate more sessions, the Current session limit in the APPCCONTROL STATUS display will be equal to the Number of Active Sessions.

Activating Sessions

To activate sessions of type INDSESS1, you issue the APPCCONTROL SESSIONS command to raise the session limit for that session type:

APPCCONTROL SESSIONS; STYPE=INDSESS1; LIMIT=5

When you issue the APPCCONTROL SESSIONS command to raise the session limit to 5, five sessions of the specified session type are activated. The maximum session limit configured through NMMGR is still 8, so you cannot raise the session limit beyond 8 with the APPCCONTROL SESSIONS command. Under Session Limits in the APPCCONTROL STATUS display, the Maximum value is the configured value. The Current value is the new session limit after you issue the APPCCONTROL SESSIONS command.

NOTE: If you issue the APPCCONTROL SESSIONS command to raise the session limit for an independent LU session type with parallel sessions, the limit you specify in the command might be negotiated with the remote LU. Therefore, after the command has executed, the new session limit might not be the same limit you specified in the command. The Session Limits in the APPCCONTROL STATUS display are the configured value (Maximum) and the negotiated value (Current).

After you raise the session limit, the following messages are logged as sessions are activated:

APPC: Session Started, Session ID=26 (APPCLOG 6)
APPC: Session Started, Session ID=27 (APPCLOG 6)
APPC: Session Started, Session ID=28 (APPCLOG 6)
APPC: Session Started, Session ID=29 (APPCLOG 6)
APPC: Session Started, Session ID=30 (APPCLOG 6)

The LU acting as primary LU activates the session. Sessions can be activated by either the local or the remote LU.

The following APPCCONTROL STATUS display reflects the status of session type INDSESS1 after the APPCCONTROL SESSIONS command has been issued to raise the session limit to 5.

   --------------------------------------
   Independent LU Session Type : INDSESS1
   --------------------------------------
 
   Number of Active Sessions         : 5
   Number of Queued Session Requests : 0
                                                       Session Limits
   Local LU   SNA Node   Remote LU           Mode     Maximum  Current
   --------   --------   -----------------   ------   -------  -------
   INDLU1     AS400PU    NET1.AS400LU1       MODE1        8       5
 
   Session ID    LFSID    State       LU Type    TP ID 
   ----------    -----    --------    -------    ----- 
   26            0101 1   ACTIVE      PRI        4425
   27            0102 1   ACTIVE      PRI        3279
   28            0103 1   ACTIVE      PRI        5413
   29            0104 1   ACTIVE      PRI        6924
   30            0105 1   ACTIVE      PRI

The number of active sessions for INDSESS1 is now 5. This is the current session limit, which differs from the configured session limit. The configured session limit for INDSESS1 will always be 8, unless you modify the configuration file and restart the APPC subsystem.

The four session requests that were queued have been given sessions, so the Number of Queued Session Requests is now 0.

One session is active but idle; it is not being used for a conversation, so its TP ID field is blank.

If two more TP processes request sessions, the first TP process will be given the idle session (the one with no TP ID listed), and the second session request will be queued to wait for an available session.

The following APPCCONTROL STATUS display reflects the status of session type INDSESS1 after two more TP processes call MCAllocate or MCGetAllocate to request sessions. Five sessions are still active, and one session request is now queued. The session that was idle is now being used by the TP process with TP ID 1258.

   --------------------------------------
   Independent LU Session Type : INDSESS1
   --------------------------------------
 
   Number of Active Sessions         :   5
   Number of Queued Session Requests :  <$&shade 10-1> 1
                                                       Session Limits
   Local LU   SNA Node   Remote LU           Mode     Maximum  Current
   --------   --------   -----------------   ------   -------  -------
   INDLU1     AS400PU    NET1.AS400LU1       MODE1        8        5
 
   Session ID    LFSID    State       LU Type    TP ID 
   ----------    -----    --------    -------    ----- 
   26            0101 1   ACTIVE      PRI        4425
   27            0102 1   ACTIVE      PRI        3279
   28            0103 1   ACTIVE      PRI        5413
   29            0104 1   ACTIVE      PRI        6924
   30            0105 1   ACTIVE      PRI 1258

If three conversations are deallocated, three sessions will become available for conversations. One session will be given to the TP with the queued session request, and the other two available sessions will remain active but idle.

The following APPCCONTROL STATUS display reflects the status of session type INDSESS1 after three conversations are deallocated. The TP ID associated with Session ID 28 changes from 5413 to 2215; the session remains active, but a different TP is using it. The TP ID field for each of the idle sessions is blank.

   --------------------------------------
   Independent LU Session Type : INDSESS1
   --------------------------------------
 
   Number of Active Sessions         :   5
   Number of Queued Session Requests :  <$&shade 11-1> 0
                                                       Session Limits
   Local LU   SNA Node   Remote LU           Mode     Maximum  Current
   --------   --------   -----------------   ------   -------  -------
   INDLU1     AS400PU    NET1.AS400LU1       MODE1        8        5
 
   Session ID    LFSID    State       LU Type    TP ID 
   ----------    -----    --------    -------    ----- 
   26            0101 1   ACTIVE      PRI        4425
   27            0102 1   ACTIVE      PRI
   28            0103 1   ACTIVE      PRI       <$&shade 11-2> 2215
   29            0104 1   ACTIVE      PRI       <$&shade 11-3> 6924
   30            0105 1   ACTIVE      PRI

Terminating Sessions

To terminate sessions, you issue the APPCCONTROL SESSIONS command to reduce the session limit for a session type. The following command reduces the number of active sessions of type INDSESS1 from 5 to 2.

APPCCONTROL SESSIONS; STYPE=INDSESS1; LIMIT=2

Idle sessions are terminated first. Since two sessions of type INDSESS1 are idle, these sessions are terminated immediately. Another session will be terminated as soon as the conversation using it is deallocated. The following messages are logged as sessions are terminated:

APPC: Session Stopped, Session ID=27, Reason=APPC_Quiesce
APPC: Session Stopped, Session ID=30, Reason=APPC_Quiesce

The following APPCCONTROL STATUS display reflects the status of session type INDSESS1 after the APPCCONTROL SESSIONS command is issued to reduce the session limit from 5 to 2. The Number of Active Sessions is 3, not 2, because the APPC subsystem is waiting for a conversation to be deallocated before terminating another session.

   --------------------------------------
   Independent LU Session Type : INDSESS1
   --------------------------------------
 
   Number of Active Sessions         :   3
   Number of Queued Session Requests :   0
                                                       Session Limits
   Local LU   SNA Node   Remote LU           Mode     Maximum  Current
   --------   --------   -----------------   ------   -------  -------
   INDLU1     AS400PU    NET1.AS400LU1       MODE1        8       2
 
   Session ID    LFSID    State       LU Type    TP ID 
   ----------    -----    --------    -------    ----- 
   26            0101 1   ACTIVE      PRI        4425
   28            0103 1   ACTIVE      PRI        2215
   29            0104 1   ACTIVE      PRI        6924

To terminate all sessions of type INDSESS1, you issue the APPCCONTROL SESSIONS command to reduce the session limit to 0:

:APPCCONTROL SESSIONS; STYPE=INDSESS1; LIMIT=0

This command terminates all active sessions of type INDSESS1. Sessions are terminated with a shutdown type of QUIESCE, meaning that all conversations on the affected sessions are allowed to end before the sessions are terminated. A message is logged for each session that is terminated.

NOTE: If, for some reason, the APPCCONTROL SESSIONS command fails to bring down all the sessions you wish to terminate, you can use the APPCCONTROL STOPSESSION command. The APPCCONTROL STOPSESSION command is used to kill a session that is still active after you have tried to terminate it with the APPCCONTROL SESSIONS command. The APPCCONTROL STOPSESSION command terminates a session with a StopType of KILL; that is, it terminates the session immediately, without waiting for any conversation using the session to complete.

An APPC session can be terminated from the remote side. When the remote system terminates a session, the APPC subsystem attempts to reestablish it. The following is an example of the logging messages you would see if this occurred:

    APPC: Session stopped, Session ID=26, Reason=Host_Unbind  (APPCLOG 7)
    APPC: Session started, Session ID=26  (APPCLOG 6)
Feedback to webmaster