Entering content frame

Function documentation Test Program lgtst Locate the document in its SAP Library structure


With this program you can check the active instances of your SAP System and check existing logon groups directly at operating system level.


In SAP Systems you can do this using transactions SM51 (Overview of SAP Application Servers), SMMS (Message Server Monitor) or SMLG.


The prerequisite is a unique message server address consisting of the message server host name and the message server port. With the message server port you have to be particularly careful that the port number (e.g. 3600/tcp, see e.g. /etc/services) assigned to the port name (sapms<SID>, SID=SAP-System-ID) has exactly the same value on all participating hosts.

For this reason these details should be defined in the global profile DEFAULT.PFL:

        rdisp/mshost = <host name of message server>

        rdisp/msserv = sapms<SID>  (optional details, naming convention)


When you call program lgtst without any parameters, you get a list of call parameters (mandatory and optional):

To test the message server connection you should set the SAP profile parameters specified in the prerequisites. If you then enter:

            lgtst -H <host name message server> -S sapms<SID>,

you get a list divided into two parts:

        List of active SAP server instances (with services)

        List of available logon groups (with default instances)

The following table contains the options you have when calling lgtst. Below are various examples:

Call Options lgtst


Default Value:



You must specify either the profile, the SID, or the mshost and msserv.

Path to profile file


System ID

-H mshost

Host on which the message server is running.

-S msserv

Port (service) on which the message server can be reached.

-T trace file     


Name of trace file

-W wait time

10000 millisecs

Wait time on network does not usually have to be changed.

-D [1|2|3]


1: Display of application server and logon groups

2: Display of application server

3: Display of logon groups

-N [1|2|3]


Display of SNC names of the application servers and/or the logon groups (values same as –D)

-E [0|1]


With/without info on J2EE Engine

-G group         


Displays details of logon group.

-X group [-L 1]


Displays details of logon group; the addition –L 1 causes the output with SNC name to follow.

-A name


Determines the SNC name of the server using the name.

-P ip,port


Determines the SNC name of the server using the IP address and port (ip, port).

-C n


lgtst will be executed n times one after the other

-Y n


lgtst waits n milliseconds before each execution.

RFC Load Balancing Procedure

The options -G <name>, -C nand -Y n are used to test the RFC load balancing. For more information on RFC load balancing procedure see note 593058.


Standard Call

If you simply call lgtst -H <Hostname message server> -S <MS port>, you will get the following displayed:

using trcfile: dev_lg


list of reachable application servers


[ls3022_BIN_12] [ls3022] [] [sapdp12] [3212] [DIA ICM ]

[binmain_BIN_53] [ls0347] [] [sapdp53] [3253] [DIA UPD BTC SPO UP2 ENQ ICM ]

[is0206_BIN_53] [is0206] [] [sapdp53] [3253] [DIA BTC ]

[us0301_BIN_53] [us0301] [] [sapdp53] [3253] [DIA BTC ]


list of selectable login-classes with favorites


[HTTP] [] [3253] [620]

[PUBLIC] [] [3253] [620]

[SPACE] [] [3253] [620]

From the list you can understand the following:

        binmain_BIN_53 is the central instance of the system BIN (usually the message server is also running here, therefore, rdisp/mshost=binmain, rdisp/msserv=sapmsBIN)

        An instance is a dialog instance with ICM, two instances offer dialog and batch work processes.

        For the LOGON group PUBLIC the instance is0206_BIN_53 is currently recommended, the same for HTTP binmain_BIN_53 and for SPACE ls3022_BIN_12.

The instance list (sub-list 1) generates the message server using the logons of the individual dispatchers. The data for the LOGON groups (sub-list 2, if existing) is used by the SAP System to calculate the load balancing (provided this has been configured; transaction SMLG).

Checking the Load Balancing Within the Logon Group RFC for 10 Calls

The prerequisite is that in transaction SMLG you have defined the attribute External RFC Permitted for one logon group. The following example has a logon group RFC with this attribute.


lgtst -H <host> -S <serv> -G RFC -C 6

You will see

Group RFC : [] [3211] [640] [TRUE] [ls3022_BIN_11]

Group RFC : [] [3253] [640] [TRUE] [binmain_BIN_53]

Group RFC : [] [3211] [640] [TRUE] [ls3022_BIN_11]

Group RFC : [] [3253] [640] [TRUE] [binmain_BIN_53]

Group RFC : [] [3211] [640] [TRUE] [ls3022_BIN_11]

Group RFC : [] [3253] [640] [TRUE] [binmain_BIN_53]

Here you can see that both servers are used alternatively for the RFC calls. The field [TRUE] specifies that the RFC load balancing is activated for this group and specifies the server the next request will be assigned to.


lgtst -H <host> -S <serv> -G PUBLIC -C 3 -Y 1000

( -Y 1000 means one second wait time between the calls). You will see, for example:

Logon data for logon classes:


Group PUBLIC : [] [3253] [620] [FALSE]

Group PUBLIC : [] [3253] [620] [FALSE]

Group PUBLIC : [] [3253] [620] [FALSE]

You can see that no RFC load balancing is activated (FALSE). The request is assigned to the “Favorite logon server”.  Option -X supplies all the available details of an RFC logon group. The definitions in table RZLLICLASS are displayed as well. You can also see which application servers are defined in this group. Option -X can be linked, of course, to the other options, such as -C and –Y to test the load balancing.


lgtst name=BIN -X RFC

you will see, for example:

Logon data for logon classes:


Group RFC : [] [3253] [620] [TRUE] [binmain_BIN_53]

  group-id = 1

  time to reread = 180 (seconds)

  logon reread = 120 (119) (number of calls before the next read)

  fav type = ROUND_ROBIN (defined load balancing procedure)

  first read = 1060854803 (Thu Aug 14 11:53:23 2003)

  last read = 1060854803 (Thu Aug 14 11:53:23 2003)

  next read = 1060854983 (Thu Aug 14 11:56:23 2003)

  appl server (name [quality,deltaquality] ( s erver in group )

    binmain_BIN_53 [999,-1]

For more information about working with RFC load balancing see SAP note 593058.







Leaving content frame