Setting Up Gateway Logging


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 logging of the profile parameters gw/logging or you can use the gateway monitor (transaction SMGW). We recommend the following configuration for the gateway monitor.


...

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

2. Choose Goto ® Expert Functions ® Logging.

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 setting and their changes (file reload), see Security Settings for the SAP 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

Starts external programs (see Assigning Start Authorizations for External Programs)

E

Registered programs

Registration and deregistration of servers (see Access Controls for Registered Programs

R

Dynamic parameter changes

Changes profile parameters in productive operation

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 Size of the File (kByte): You can set the maximum size of the file (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 Again: 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 This graphic is explained in the accompanying text 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.


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 This graphic is explained in the accompanying textDisplay 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-06-19with the following content:

P Wed Jun 20 2007 14:12:37:170 change gw/logging from ACTION=T LOGFILE => ACTION=SPX LOGFILE=

P Wed Jun 20 2007 14:12:37:170 change gw/logging from ACTION=T LOGFILE => ACTION=SPX LOGFILE=

P Wed Jun 20 2007 14:13:23:400 change gw/logging from ACTION=SPX LOGFILE= => ACTION=SPX LOGFILE=gw_log-%y&m%d%h

P Wed Jun 20 2007 14:13:23:400 change gw/logging from ACTION=SPX LOGFILE= => ACTION=SPX LOGFILE=gw_log-%y&m%d%h

S Wed Jun 20 2007 14:13:37:788 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

P Wed Jun 20 2007 14:13:50:130 change gw/export_trace_level from 0 => 1

S Wed Jun 20 2007 14:14:42:795 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:15:30:064 secinfo accepted server: TP=ur3ldtest_B7T_server2, HOST=host1

S Wed Jun 20 2007 14:15:47:798 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:16:28:982 secinfo accepted server: TP=ur3ldtest_U7A_server2, HOST=host1

S Wed Jun 20 2007 14:16:52:802 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

P Wed Jun 20 2007 14:16:59:509 change gw/logging from ACTION=SPX LOGFILE=gw_log-%y&m%d%h => ACTION=SPX LOGFILE=gw_log-%y&m%d%h SWITCHTF=hour

P Wed Jun 20 2007 14:16:59:509 change gw/logging from ACTION=SPX LOGFILE=gw_log-%y&m%d%h => ACTION=SPX LOGFILE=gw_log-%y&m%d%h SWITCHTF=hour

S Wed Jun 20 2007 14:17:57:806 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:19:02:810 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:20:07:815 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:21:12:816 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:22:17:818 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:23:20:159 secinfo accepted server: TP=ur3ldtest_AB5_server2, HOST=host1

S Wed Jun 20 2007 14:23:22:821 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

S Wed Jun 20 2007 14:23:24:444 secinfo accepted server: TP=ur3ldtest_AB5_server2, HOST=host1

S Wed Jun 20 2007 14:23:24:458 secinfo accepted server: TP=ur3ldtest_AB5_server2, HOST=host1

S Wed Jun 20 2007 14:23:24:473 secinfo accepted server: TP=ur3ldtest_AB5_server2, HOST=host1

S Wed Jun 20 2007 14:23:24:488 secinfo accepted server: TP=ur3ldtest_AB5_server2, HOST=host1

S Wed Jun 20 2007 14:23:24:503 secinfo accepted server: TP=ur3ldtest_AB5_server2, HOST=host1

S Wed Jun 20 2007 14:23:53:103 secinfo accepted server: TP=ur3ldtest_U6D_server2, HOST=host1

S Wed Jun 20 2007 14:23:55:672 secinfo accepted server: TP=ur3ldtest_U6D_server2, HOST=host1

S Wed Jun 20 2007 14:23:55:686 secinfo accepted server: TP=ur3ldtest_U6D_server2, HOST=host1

S Wed Jun 20 2007 14:23:55:700 secinfo accepted server: TP=ur3ldtest_U6D_server2, HOST=host1

S Wed Jun 20 2007 14:23:55:715 secinfo accepted server: TP=ur3ldtest_U6D_server2, HOST=host1

S Wed Jun 20 2007 14:23:55:731 secinfo accepted server: TP=ur3ldtest_U6D_server2, HOST=host1

S Wed Jun 20 2007 14:24:27:823 secinfo accepted server: TP=IGS.SERVER1, HOST=SERVER1

Recommendation

You can set the profile parameter as follows:

gw/logging=ACTION=SPX LOGFILE=gw_log-%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.

No comments:

topics