Show TOC

Setting Up Gateway LoggingLocate this document in the navigation structure

Use

Gateway logging is used to monitor the activities of the gateway. You can configure which gateway actions are logged. They are then written to a log file. The log file is named after its creation time stamp, but you can configure its exact format.

Procedure

You can set up the logging in profile parameter gw/logging or in the gateway monitor (transaction SMGW ). We recommend the following configuration for the gateway monitor.

Note

The gateway monitor is not available, if you are using a standalone gateway or a Java-only installation. You then have to configure the gateway monitor in parameter gw/logging .

For more information, see: Configuration Parameters

  1. Call the gateway monitor (from the menu or in transaction SMGW )

  2. Choose Start of the navigation path Goto Next navigation step Expert Functions Next navigation step Logging End of the navigation path.

  3. Define a name for the log. To do this enter a name in the File Name field where you can set the specified time stamp variables. The default setting is gw_log-%y-%m-%d . The file will then be called gw_log-2007-06-19 .

  4. Choose the gateway actions that you wan to log in the log file. You can select the following types of gateway actions:

    Gateway Action

    Description (actions logged)

    Indicator in the Log File

    Network

    Network actions, opening and closing network connections

    T

    Start/stop/signals

    Receipt of start and stop commands or other (operating system) signals

    X

    Security

    Security setttings and their changes (reloading files).

    For more information: Security Settings in the Gateway

    S

    Monitor commands

    Administration command that the gateway receives from the gateway monitor ( SMGW or externally gwmon)

    M

    Create/delete Conversation IDs

    Creates new conversation IDs, deletes conversation IDs

    V

    Open RFC connection

    Creates new RFC connections

    O

    RFC actions (open/close/send/receive)

    RFC actions: Opens and closes connections, sends and receives data

    C

    External Programs

    Launching of external programs.

    For more information: Making Security Settings for External Programs

    E

    Registered programs

    Registration and deregistration of servers.

    For more information: Making Security Settings for External Programs

    R

    Dynamic parameter changes

    Changes profile parameters in productive operation

    For more information: Parameterization of the Gateway

    P

  5. Choose the Toggle Criteria (in the lower section of the screen). You can configure the following:

    • Time-Controlled Toggle : You can specify a time period after which a new file is opened. Possible values are no toggle, and toggle after one hour, one day, or one year.

    • Maximum File Size (kByte) : You can set the maximum size of the file (specified in kilobytes). If the log file exceeds this size, the file is closed and a new one opened. A new file name is assigned provided you use the timestamp variables when you name the file (see above).

    • Specify Old File : You select this checkbox to prevent a new file being created. The old file is then overwritten when the time-controlled toggle condition is applied or when the maximum file size is exceeded.

  6. Select Activate to accept your settings.

Caution

The settings you make here are saved in the shared memory of the instance. They are retained when the gateway is restarted. However, if the whole instance is closed down, the settings are lost. If you want to make general logging settings, you have to set parameter gw/logging in the profile file.

For more information, see: Configuration Parameters

Recommendation

You can set the profile parameter as follows:

gw/logging=ACTION=SPXLOGFILE=gw_log_$(SAPSYSTEMNAME)_$(SAPLOCALHOST)-%y&m%d SWITCHTF=day

Then signals, profile parameter changes, and security actions will always be logged, and if required, you can also extend the logging as described above.

Result

The log file is created, and further files are written depending on the settings. The files can be found in the work directory of the instance.

You can see existing log files at the top next to the name of the log file. To look at the file, choose Display File.

Example

If you select gateway actions Start/Stop/Signals , Security and Dynamic Parameter Changes for logging, and you use the standard setting for the file name, you will get, for example, file gw_log-2007-10-10 with the following content:

P Wed Oct 10 2007 11:07:19:891 trace file opened

P Wed Oct 10 2007 11:07:19:891 change gw/logging from ACTION= LOGFILE=gw_log-%y-%m-%d SWITCHTF=day MAXSIZEKB=100 => ACTION=SPX LOGFILE=gw_log-%y-%m-%d SWITCHTF=day MAXSIZEKB=100

P Wed Oct 10 2007 11:07:19:891 change gw/logging from ACTION= LOGFILE=gw_log-%y-%m-%d SWITCHTF=day MAXSIZEKB=100 => ACTION=SPX LOGFILE=gw_log-%y-%m-%d SWITCHTF=day MAXSIZEKB=100

S Wed Oct 10 2007 11:07:38:196 reginfo accepted server: TP=cpict2, HOST=ld8060.wdf.sap.corp (10.66.66.90)

S Wed Oct 10 2007 11:08:14:974 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=wdfd00146227a.dhcp.wdf.sap.corp (10.18.94.4)

S Wed Oct 10 2007 11:08:20:103 secinfo accepted: USER=rehm, USER-HOST=ld8060.wdf.sap.corp (10.66.66.90), HOST=ld8061.wdf.sap.corp (10.66.66.91), TP=/usr/sap/BIN/SYS/exe/run/tp

S Wed Oct 10 2007 11:09:00:497 secinfo accepted: USER=rehm, USER-HOST=ld8060.wdf.sap.corp (10.66.66.90), HOST=ld8061.wdf.sap.corp (10.66.66.91), TP=/usr/sap/BIN/SYS/exe/run/tp

S Wed Oct 10 2007 11:09:19:974 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=wdfd00146227a.dhcp.wdf.sap.corp (10.18.94.4)

S Wed Oct 10 2007 11:10:24:975 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=wdfd00146227a.dhcp.wdf.sap.corp (10.18.94.4)

S Wed Oct 10 2007 11:11:04:780 secinfo accepted: USER=REHM, USER-HOST=ld8061.wdf.sap.corp (10.66.66.91), HOST=ld8061.wdf.sap.corp (ld8061) (10.66.66.91), TP=/usr/sap/BIN/SYS/exe/run/tp

S Wed Oct 10 2007 11:11:29:976 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=wdfd00146227a.dhcp.wdf.sap.corp (10.18.94.4)

S Wed Oct 10 2007 11:11:34:347 secinfo accepted: USER=REHM, USER-HOST=ld8061.wdf.sap.corp (10.66.66.91), HOST=ld8061.wdf.sap.corp (%%SAPGUI%%) (10.66.66.91), TP=gnetx.exe

S Wed Oct 10 2007 11:11:55:536 secinfo accepted: USER=REHM, USER-HOST=ld8061.wdf.sap.corp (10.66.66.91), HOST=ld8061.wdf.sap.corp (ld8061) (10.66.66.91), TP=sapxpg

S Wed Oct 10 2007 11:12:06:166 secinfo accepted: USER=REHM, USER-HOST=ld8061.wdf.sap.corp (10.66.66.91), HOST=ld8061.wdf.sap.corp (ld8061) (10.66.66.91), TP=sapxpg

S Wed Oct 10 2007 11:12:34:977 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=wdfd00146227a.dhcp.wdf.sap.corp (10.18.94.4)

P Wed Oct 10 2007 11:13:21:871 change gw/cpic_timeout from 120 => 121

S Wed Oct 10 2007 11:13:39:977 reginfo accepted server: TP=IGS.WDFD00146227A, HOST=wdfd00146227a.dhcp.wdf.sap.corp (10.18.94.4)

X Wed Oct 10 2007 11:14:15:900 received signal SIGUSR1 (decrement trace, level=0)

X Wed Oct 10 2007 11:14:24:033 received signal SIGUSR2 (increment trace, level=1)

P Wed Oct 10 2007 11:14:34:523 trace file closed