Use
You can use program msprot to monitor the message server at operating system level. The program connects to the message server and records all logons, logoffs, and status changes of the logged-on Web AS instances.
Integration
Program msprot can also be integrated in separate scripts for checking the message server. The program returns the following return values:
Return Values from msprot
Value | Meaning |
0 | The program has run without errors |
1 | Missing or invalid parameters in the command line. |
2 | The host name, on which the message server is running (rdisp/mshost), could not be determined from the profile or an invalid profile has been specified. |
3 | The service name of the message server (sapms |
4 | Message server could not be logged on. Either incorrect connection data has been specified or the message server is currently not running. |
5 | Request (to receive changes in the server list) to the message server has failed: either the message server has been terminated or there is a network problem. |
6 | The list could not be fetched from the message server. The message server has been terminated or there is a network problem. |
7 | Connection to the message server has been broken The message server has been terminated or there is a network problem. |
For more information about possible errors see file dev_msprot.
You can fetch program msprot from the Service Marketplace. Although the program is available only as of 6.20, it can be used with message servers from earlier releases.
Prerequisites
See Monitoring and Testing the SAP Message Server
Features
When you enter parameter msprot, you get a list of possible options:
SAP Message Server Protocol Program, Version 1.2 (built: Aug 12 2003 09:24:00)
msprot - connect to message server, get the server list and display all changes in the server list
refer to CSN note 636938 for further details
usage: msprot [ -a | -t | -l | -k
-a display all (ip/servno)
-t display time
-k
-n
-r
-l list server and exit (ignore -k and -r option)
When you call msprot enter the necessary information to connect to the message server. You have the following options:
· Enter SID details (option name=
· Enter profile file details (option name=
· Directly enter the name of host and service or the port number of the message server (option -mshost host -msserv service).
If you do not specify an additional option, program msprot connects to the message server and records all logons, logoffs, and status changes of the Web AS instances. There is an example further below.
The columns have the following meaning:
· Column INFO means the type of information to follow. LIST is the application servers that are displayed after msprot starts. ADD or SUB means that an application server has been added or taken away, while msprot was running. MOD means a session change of the application server, for example from STARTING to RUNNING.
· The other columns are the same as those in the Overview of the SAP Application Server (SM51): Instance Name, Host Name, Dispatcher Port, Status, and Services Provided.
Meaning of the Optional Parameters
Parameters | Meaning |
-t | Displays the current time |
-l | The program terminates once the server list has been displayed. |
-a | Additional display of the port number |
-n | Maximum period of time for the network calls (default value is blocking) |
-k | After the specified number of seconds has passed a message is sent to the message server. This means you can check whether the message server is still running. The default is that no such messages are sent to the message server. |
-r | The program terminates after the specified number of seconds. The default is for the program to run until an error occurs. This is usually if the message server terminates. |
TRACE=2 | With this option you can increase the trace level (for analyzing problems). You can find more details in file dev_msprot. |
Example
You enter msprot name=
INFO CLIENT-NAME HOST SERVICE (NET) STAT SERVICES (SAP)
----------------------------------------------------------------------
LIST binmain_BIN_53 ls0347 sapdp53 RUNNING DIA UPD SPO BTC
LIST pwdf0195_BIN_53 pwdf0195 sapdp53 RUNNING DIA ICMAN
ADD ls0301_BIN_98 ls0301 sapdp98 STARTING DIA ICMAN
MOD ls0301_BIN_98 ls0301 sapdp98 STARTING DIA ICMAN
MOD ls0301_BIN_98 ls0301 sapdp98 RUNNING DIA ICMAN
SUB ls0301_BIN_98 ls0301 sapdp98 STOP DIA ICMAN
First the current list of application server instances are displayed; here this is two instances. Then the application server with the name ls0301_BIN_98 logs on to the message server and changes its internal status (that is, it sends its IP address to the message server and changes its status from STARTING to RUNNING). Finally, this application server terminates and logs off from the message server.
No comments:
Post a Comment