Transactions STAD, SM19, SM20
Transactions STAD, SM19, SM20
Page: 1 of 14
File: 130455493.doc
number of statistic files. Each hour a new file is created and the oldest file is deleted automatically. Make sure you have enough disk space available for all the statistic files. Otherwise the syslog (transaction SM21) shows the following message: > File: /usr/sap/BCE/D26/data/stat Failed to write to file, error 0028
Just specify date, time, and length of the interesting interval and hit the enter key. If necessary you can narrow your search by specifying values for the filter parameters:
Page: 2 of 14
File: 130455493.doc
Each line represents one dialog step. You can see the starting time of that dialog step, the application server name, and the program or transaction name, respectively. For each dialog step the several metrics are shown, e. g. response time, CPU time, and DB time (scroll to the right to see these columns).
Please note: you need the authorization profile S_TOOLS_EX to see all user names. Without this profile you will see only your own user name. All other user names will be deleted and STAD only displays -?- instead. There is one thing I would like to point out here. We have specified an interval starting from 10:04:00, but the list shows a statistical record from 09:59:47. Is this an error? No, because 09:59:47 is the start time of the dialog step. The response time of this dialog step is 621 seconds, so the step ended at 10:10:08. At that time the statistical record was created and written to the shared buffer. And 10:10:08 is definitely inside the
Page: 3 of 14 File: 130455493.doc
The section is titled Analysis of time in work process. The executed program was SAPWL_ST03N. The dialog step was started at 15:24:24 and ended at 15:24:30. The response time was 6087 ms, while CPU time was 210 ms. This information helps if you want to analyze the performance of a single dialog step. You can see why the response time is larger than 6 seconds. CPU consumption is not an issue here in this example, but DB time is very high. So this could be the point where an optimization could start.
Summary
You can see that STAD shows many technical details. All metrics are measured during the execution of the dialog step, and they describe what really happened. This makes the statistical record a valuable source of information about the performance of an application server. The statistical records are used to calculate aggregations (shown in ST03N), and they are used for SAP services like Going Live and Earlywatch Alert. Andreas Vogel works as a developer and project lead in SAP Netweaver.
All these subrecords are optional, and the SAP kernel will generate these on demand. This saves a lot of disk space in the file system and speeds up writing and reading the statistics file. Here is the complete list of subrecords: batch subrecords database subrecords db table subrecords db procedure subrecords spool print subrecords spool activity subrecords ADM message subrecords client information subrecords RFC client subrecords RFC server subrecords RFC client destination subrecords RFC server destionation subrecords http client subrecords http server subrecords http client destination subrecords http server destionation subrecords smtp client subrecords smtp server subrecords smtp client destination subrecords smtp server destionation subrecords VMC subrecords ESI subrecords (SAP_BASIS 710) ESI destination subrecords (SAP_BASIS 710) Don't get confused, we'll not discuss all of them in detail now. Instead let's have a closer look at the RFC subrecords.
Page: 5 of 14
File: 130455493.doc
RFC Client
Let's start with the RFC client records. The following picture is a screenshot from STAD for an overview of RFC client process.
We can see that 30 RFC calls have been performed over (at least) 5 connections to 5 destinations for this dialog step. The calling time for the client was 7.212 ms in total, while the remote execution time (for all servers) was 6.688 ms. The calling time includes codepage conversions and network transport. The remote execution time is measured by the RFC server and includes authority check and function execution only. 11.330 bytes have been sent to the servers, and 14.225 bytes have been received. The idle time is the time between two subsequent RFC calls for an open connection. There are two highlighted fields on this screen: Connections and Calls. You may click on these fields to display more details. Let's continue with the calls, which will display the RFC client records. An RFC client record describes exactly one single RFC call. The most important information is the function name, the execution time of this function, and the amount of data transported in both directions. The following screenshot of STAD shows an RFC client record.
This screen shows an RFC call of a function called START_TCOLL_REPORT. The Call number is 6, indicating that this call is the 6th call over this particular RFC connection. The Connection ID of this
Page: 6 of 14 File: 130455493.doc
This screen shows the details for a particular RFC connection. We can see the connection ID, the type of RFC (synchronous), the types of the local and the partner engines (R/3 System in both cases), and the combination of user name and client number used for logon. Destination is the name of the RFC destination (see Tx SM59). Instance is the name of the local application server from where this call was issued, and IP address is the local IP address. From the remote application server we see Partner instance, Partner IP address, and Partner Release (not all RFC server will provide this information, but a SAP application server will do so). In total six calls have been performed for this particular connection during this dialog step, and the total calling time was 2624 ms.
Page: 7 of 14
File: 130455493.doc
This screen shows the overview for an RFC server process during a dilaog step. One incoming RFC call from one connection has been received. The RFC server has received 12.415.680 bytes, and the server execution time (authority check and function module execution) was 711 ms, while the calling time (including code page conversions and network transfer) was 6.656 ms. Let's go to the details of that particular RFC call (click on the hotspot behind the field Calls). The following screen is very similar to the one of an RFC client. We can see the name of the executed function module, the connection ID, and the destination name NONE (an RFC call within the same application server) as well as the performance metrics.
The next screenshot shows the RFC server destination record. It shows the details of the RFC connection and the summary of all RFC calls for this connection. We can see that this connection has been used for an asynchronous call without a response. The details of this screen are similar to the RFC client destination record (see above).
Page: 8 of 14
File: 130455493.doc
Please note that the lifetime of an RFC connection is independent of a dialog step. Depending of the scenario and the implementation an RFC connection may be used during several subsequent dialog steps of an application or program. The RFC client/server destination records are created in the context of a dialog step and will always show the activity for a connection during this dialog step. There are some details of an RFC server process which are important to know. Let's assume an RFC client performs several calls to an RFC server. If the connection is not closed explicitly then it will be used for all these calls. But when will the RFC server process write a statistical record? After each RFC call? No, that's not the case. The SAP kernel will write a statistical record after the roll-out of the RFC server process from the work process, and the roll-out will occur if no subsequent RFC call is received within a timeframe of 500 ms. At that point the data for the statistical record is collected, and this includes the RFC subrecords, of course. If subsequent RFC calls follow within 500 ms then the context of the RFC server will not be rolled out from the work process. This is a performance optimization, because it avoids frequent roll-out and roll-in which would increase the RFC execution time. Please note that the overall response time of an RFC server process may be 500 ms larger than the calling time. The overall response time is shown by STAD on the main list, while the calling time is shown with the RFC details (see the RFC server destination record). The design principle of client/server single records and client/server destination records has also been used in a similar way for the http and smtp subrecords. Check it out, STAD will display all of them. To learn more about RFC please read the interesting article by Masoud Aghadavoodi Jolfaei and Eduard Neuwirt [3]: Master the five remote function call (RFC) types in ABAP. If you want to learn more about SAP performance optimization the following book might be interesting for you: T. Schneider, SAP Performance Optimization Guide, 4th ed., SAP PRESS, ISBN 978-1-59229-069-7
Page: 9 of 14
File: 130455493.doc
Security Monitor
Use You can use this monitor to monitor messages in the Security Audit Log, broken down into various areas, and to monitor security-relevant messages in the system log (see also Comparing the Security Audit Log and the System Log). Prerequisites You must have activated the Security Audit Log (transaction SM19).
Features The monitor contains the following monitoring tree elements (MTEs): MTE Name (MTE Class) Logon (SecurityLogon) Meaning System logon events reported by the Security Audit Log: Successful logons, unsuccessful logon attempts, and log offs by a user Locking of a user due to unsuccessful logon attempts, and the removal of the lock RFC/CPIC logon events reported by the Security Audit Log: Successful RFC/CPIC logon Unsuccessful RFC/CPIC logon attempt Transaction events reported by the Security Audit Log: Transaction started and failed transaction start Transaction locked or unlocked
Page: 10 of 14
File: 130455493.doc
RFCCall (SecurityRFCCall)
UserMasterRecords (SecurityUserMasterRecords)
System (SecuritySystem)
Miscellaneous (SecurityMiscellaneous)
The system records security-relevant actions in the Security Audit Log. You decide which actions are recorded there and which should trigger an alert in the Alert Monitor on the Security Audit Log configuration screen (transaction SM19). See also Defining Filters
Activities To start the monitor, follow the procedure below: 1. Start the Alert Monitor using transaction RZ20 or choose CCMS Control/Monitoring Alert Monitor. 2. On the CCMS Monitor Sets screen, expand the SAP CCMS Monitor Templates set. 3. Start the Security monitor from the list by double-clicking it.
Page: 11 of 14
File: 130455493.doc
Activating a User Audit Profile 1. Log on to any client in the appropriate SAP system. 2. Go to transaction SM19. 3. On the Security Audit: Administer Audit Profile screen, select the audit profile to be activated from the Profile dropdown. Click the lit match picture-icon to activate it. You will receive an Audit profile activated for next system start in the status bar at the bottom of the screen. The audit will not begin until after the SAP instance has been recycled. 4. You may now leave the SM19 transaction. Viewing the Audit Analysis Report 1. Log on to any client in the appropriate SAP system. 2. Go to transaction SM20. 3. In the Selection, Audit classes, and Events to select sections of the Security Audit Log: Local Analysis screen, provide your information to filter the audit information. If you need to trace the activities of a specific user, be sure to include that user's ID. Click the Re-read audit log button. 4. The resulting list is displayed. This list can be printed using the usual methods. 5. You may now leave the SM20 transaction.
Page: 12 of 14
File: 130455493.doc
Transactions SM18, SM19, SM20 deals with security Audit Log. SM18 To archieve or delete old audit log files SM19 you can configure the Static/Dynamic fileters here. The system administrator or security administrator defines the events you want to audit in filters. Filters consist of the following information: . Client . User . Auditclass . Weight of events to audit The audit class returns information about the following: . Dialog logon . RFC/CPIClogon . Remotefunctioncall(RFC) . Transaction start . Reportstart . User master change You can specify the weight of events to audit: . Audit only critical
Page: 13 of 14 File: 130455493.doc
http://www.easy-share.com/1903563419/SAP_Security_Configuration_Deployment.rar
Elena: Buna Gabi. Am si eu o intrebare: stii cumva o tranzactie din care pot scoate, pentru un interval de
timp dat, de cate ori a fost folosita o anumita tranzactie . Practic ne trebuie sa scoatem o statistica cu asa ceva si am gasit noi ceva (ST03N) dar nu pare a fi ce ne trebuie. Merci mult. Gabi Grecu: SCU3 dacav e activata. -> modificari pe tabele Gabi Grecu: ST03N e bun, dar e super incalcit. Gabi Grecu: STAD pe durate scurte (cel mult o zi in urma). Gabi Grecu: Poti sa ma suni? Activat sist.de audit de BASIS: SM19, SM20 These transactions are for Security administration. SM20 - Security Administrator run this report periodically to get the details of 'Failed logons' of the users in the Production system and investigate the causes. Apart from that other details e.g.Failed transations,users running the critical reports etc can also be obtained. SM18 - to delete old Security logs. SM19 - Audit Profile can be maintained.Go to 'Detailed Display',you can see the various Events correspond to their criticality.
Page: 14 of 14
File: 130455493.doc