Академический Документы
Профессиональный Документы
Культура Документы
Contents
1 Introduction .............................................................................................................................3 Applicability,Goals,andRequirements...............................................................................3 BestPracticeProcedure.....................................................................................................5 1.2.1 MotivationforInterfaceMonitoring.............................................................................5 1.2.2 PreliminaryTasks.......................................................................................................5 1.2.3 InterfaceMonitoringconcept ......................................................................................5 1.2.4 Legend......................................................................................................................5 GeneralOverviewofRFCandRFCtypes ...............................................................................6 2.1.1 RemoteFunctionCall.................................................................................................6 2.1.2 GeneralOverviewofRFCTypes ................................................................................7 2.1.3 DependenciesandConvergenceofTechnologies ....................................................29 2.1.4 AutomaticSwitchingfromqRFCtotRFC..................................................................32 Aspect:ErrorMonitoring........................................................................................................33 3.1 ManualErrorMonitoring ...................................................................................................34 3.2 AutomatedErrorMonitoring..............................................................................................40 3.3 Troubleshooting:Errorexamplesandsolutions.................................................................42 3.3.1 ErrorCALL_FUNCTION_REMOTE_ERROR.........................................................42 3.3.2 ExternalProgramnotregisteredonGateway ...........................................................43 3.3.3 ExternalProgramtimeoutonGateway .....................................................................44 3.3.4 Timeoutduringconnectionsetup..............................................................................45 3.3.5 Activeconnectiontableisfull...................................................................................46 3.3.6 SQLerror60whenaccessingtableARFCSSTATE...................................................47 3.3.7 CPICTimeoutsduringconnectiontoExternalprogram.............................................48 3.3.8 Sockettoolarge.......................................................................................................51 Aspect:BacklogMonitoring ...................................................................................................52 4.1 ManualBacklogMonitoring ..............................................................................................52 4.2 AutomatedBacklogMonitoring .........................................................................................53 Aspect:PerformanceMonitoring............................................................................................55 5.1 ManualPerformanceMonitoring.......................................................................................55 5.1.1 OverviewofAvailableToolsforRFCPerformanceAnalysis ......................................57 1.1 1.2
BestPractice:RFCMonitoring 5.1.2 ActivationofPerformanceMonitoringWithTransactionST03N................................65 5.2 AutomatedPerformanceMonitoring.................................................................................78 Aspect:ResourceMonitoring.................................................................................................79 6.1 ManualResourceMonitoring............................................................................................80 6.2 AutomatedResourceMonitoring.......................................................................................84 Aspect:DataManagement ....................................................................................................85 7.1 ClassicqRFC ...................................................................................................................85 7.2 BackgroundRFC..............................................................................................................86 7.3 ManualDataVolumeMonitoring.......................................................................................87 7.4 AutomatedDataVolumeMonitoring..................................................................................87 SetupProcedureforanAutomatedInterfaceMonitoring ........................................................88 8.1 AutomatedqRFCMonitoring ............................................................................................89 8.2 AutomatedtRFCMonitoring .............................................................................................90 8.3 AutomatedbgRFCPerformanceMonitoring......................................................................92 8.4 AutomatedRFCPerformanceMonitoring .........................................................................92 8.5 AutomatedRFCConnectionMonitoring............................................................................96 GenericPart..........................................................................................................................99 9.1 PerformanceMonitoring ...................................................................................................99 9.2 Generalinformation..........................................................................................................99 9.2.1 Procedure ..............................................................................................................100 9.2.2 TransactionST03N ................................................................................................101 9.2.3 TransactionSTAD..................................................................................................102 9.2.4 TransactionST05...................................................................................................106 9.2.5 TransactionSE30..................................................................................................106 9.2.6 TransactionST12...................................................................................................107 9.3 GeneralMonitoringGuidelinesforaSAPSystem ...........................................................108 FurtherInformation.............................................................................................................. 111
10
2008SAPAG
1 Introduction
1.1 Applicability, Goals, and Requirements
ToensurethatthisBestPracticeistheoneyouneed,considerthefollowinggoalsandrequirements.
GoalofUsingthisService
ThisBestPracticehelpsyousetupanInterfaceMonitoringconceptwiththefocusonRFCMonitoring foryourSAPsolution.ThisdocumentoutlinespossibilitiesonhowbesttomonitorRFCbased interfacesmanually,aswellasautomatically,byusingSAPSolutionManager.Bothmonitoring approachesaimtodetectanyirregularitiesordeviationsortodetecterrorsituationsatanearlystage. Theseproceduresintendtoensurethattheinterfaceprocessingmeetstherequirementsforstability, performanceandcompletenessaswellasasmoothandreliableflowofthecorebusinessprocesses sothatyourbusinessrequirementsaremet.
AlternativePractices
YoucanhaveSAPexpertsdeliverthisBestPracticeonsitebyorderingaSolutionManagement Optimization(SMO)serviceforSAPInterfaceManagementorSAPBusinessProcessManagement. TheseservicesareexclusivelyavailablewithinanSAPSupportEngagement,thatis,SAP MaxAttention,SAPSafeguardingorSAPPremiumSupport.
StaffandSkillsRequirements
ToimplementthisBestPractice,yourequirethefollowingteams: ApplicationManagementTeam Thisteamprovidestheinformationonthebusinessbackgroundoftheinterfacesusedandknowsthe necessarybusinessrequirementsfortheinterfaces: Businessdepartment Solutionsupportorganization(forexample,theBasisSupportortheApplicationSupport) Implementationprojectteam
BusinessProcessOperationsTeam TheBusinessProcessOperationsteamwillberesponsibleforapplyingtheresultingprocedures, derivedfromimplementingthisbestpractice.Theyincludethefollowinggroups: Personsdesignatedtoperformbusinessprocessorientedmonitoringandensurethatthe processrunssmoothly(forexample,theBusinessProcessChampionforeachbusiness process) AllpartiesinyourSolutionSupportOrganizationandITdepartmentinvolvedinmonitoring focusedontheapplicationaspects(ApplicationSupport,DevelopmentSupport,Job SchedulingManagement) SAPTechnologyOperationsTeam AllpartiesinyourSolutionSupportOrganizationandITdepartment,whoareinvolvedin monitoringfocusedonthesystemadministrationside(ProgramSchedulingManagement, SoftwareMonitoringTeam,SystemAdministrationTeamincludingtheSystemAdministrator) BusinessProcessChampion TheBusinessProcessChampionisthepersoninthebusinessdepartmentwhois responsibleforthesuccessfulexecutionofthebusinessprocess.He/shecoordinatesall activitiesnecessaryforthebusinessprocess.Therefore,he/sheisusuallyresponsibleforthe escalationpathsincaseofproblems.TheBusinessProcessChampionisoftenasecond levelintheescalationprocedure,iftheapplicationmonitoringteamneedstoescalatean issue.
BestPractice:RFCMonitoring
NecessaryorUsefulTrainings
q q q q
SystemRequirements
TosetupautomatedRFCmonitoringontheSAPSolutionManager,theaddonsSTPI(ofany release)andSTA/PI(asofrelease01H)havetobeinstalledontheconnectedsatellitesystems.
DurationandTiming
Duration CreatinganInterfaceMonitoringconceptdependsverymuchonthecomplexityofyourinterface landscapeandcouldtakearoundoneweekforabout10interfaces. Timing ThebesttimetoapplythisBestPracticeisduringtheplanningphaseorduringtheimplementation phaseofyourSAPsolution.
HowtousethisBestPractice
Thisdocumentgivesyouanoverviewoninterfacemonitoringtoolsandproceduresforthedifferent RFCtypes.Theaimisnottonameallavailablemonitorsandtoolsbuttofocusonthemore suitablemonitorsandtoolsforeachoftheaspectsdiscussed. Havinggotageneralideaofthemonitoringpossibilities,youshouldevaluatewhicharethecritical errorsituationsinyoursystemlandscapeanddecidewhichmonitoringprocedureissuitableinyour case.Wedonotrecommendsettingupafullblownmonitoring,butconcentratingonselectivealert situationsthatwillinformyouinexceptionalcases. Inthenextstep,youcanfollowthesetupprocedureandimplementthemonitoringonyour systems.Inthecaseofbusinessprocessrelatedmonitoringobjects,youhavethepossibilityto setupamonitoringconcept, focusedonbusinessprocessmonitoringandinvolveyourapplication teamsinmonitoringanderrorresolutionactivities. Forabetterunderstandingofwhatshouldbemonitored,itisessentialtounderstandtheRFC techniquesandtheirdependencies.Thefirstsectionwillgiveyouageneraloverviewofthe differentRFCs.ThesecondonewillguideyouthroughthesetupoftheautomatedRFCmonitoring possibilitieswithinSAPSolutionManager. Sections3to8listmonitoringobjects,bothformanualaswellasautomatedmonitoring procedures,concentratingonthefivemajorareas:ResourceMonitoring,ErrorMonitoring, BacklogMonitoring,PerformanceMonitoringandDataManagement. Themonitoringobjecttableslistthefollowinginformation: o Monitoringobject o Monitoringtransactionortool o Monitoringfrequency o Indicatorforanissueorerror o Monitoringactivityorerrorhandlingprocedure o Responsibility o EscalationProcedure ThelastSection,GenericPartincludesinformationonscenarioindependenttools,forexample, performancemonitoring.
2008SAPAG
BestPractice:RFCMonitoring
1.2.2 PreliminaryTasks
BeforeperformingthisBestPractice,ensurethatyouperformthefollowingpreliminarytasksor checksinthesystem: Completeallinstallationandpostinstallationactionsandproceduresincludingcustomizing Ensurethattheinitialdownloadhasbeensuccessfullyexecuted ApplyallSAPrecommendationsfromSAPServiceSessionsandanySAPrecommendations resultingfromcustomerproblemmessages ImplementallcurrentSAPSupportPackagesuponavailability
1.2.3 InterfaceMonitoringconcept
ForasuccessfulandefficientInterfaceMonitoringconcept,aprocessfortheexecutionofthe monitoringconcepthastobedefined.Thisincludesthedefinitionoftherolesandresponsibilities involved.Youneedtodefinewhoissupposedtocarryoutwhichactivityandhowisthe communicationbetweenthedifferentroleswithinthesupportorganizationsupposedtotakeplace. AnInterfaceMonitoringconceptmustbetightlyintegratedwiththesupportorganization.Thisincludes theintegrationwiththeIncident/ProblemManagementprocessandtheChangeManagementprocess. Theseprocesseshavetobeadjustedsothatcommunicationandescalationprocedurescontained withintheseprocessesareadequatetosupporttheInterfaceMonitoringconcept.Thisincludesthe finalcommunicationofopenalertstoSAP. WherevercommunicationconnectedwithInterfaceMonitoringhappensoutsidethesesupport processes,separatecommunicationandescalationpathsandprocedureshavetobedefined.
1.2.4 Legend
Thissymbolindicatesaparagraphfromwhereyoucannavigatetoanothersectionorother documents formoredetailedinformationonatopic.
Thissymbolindicatesyouaparagraphfromwhereyoucannavigatetoanotherdocument withintheSAPServiceMarketplaceformoredetailedinformationonatopic.
2008SAPAG
BestPractice:RFCMonitoring
BestPractice:RFCMonitoring
2.1.2 GeneralOverviewofRFCTypes
TherearefivebasictypesofRemoteFunctionCalls: o o o o o SynchronousRFC(sRFC) AsynchronousRFC(aRFC) TransactionalRFC(tRFC) QueuedRFC(qRFC) BackgroundRFC(bgRFC)
Inthefollowingsections,wewillexplaintheuniquerolesofeachRFCtypeandhoweachRFCtypeis created.
2.1.2.1SynchronousRFC(sRFC)
SynchronousRFCinvolvesexecutingfunctioncallsbasedonsynchronouscommunication,which meansthatthesystemsinvolved(RFCClientandRFCServer)mustbothbeavailableatthetimethe RFCcallismade.AsRFCismadebycallingafunctionviatheCALLFUNCTIONstatementwith extensionDESTINATION,whichidentifiesthetargetsystem.
Figur e2 Pr ocessflowSynchr onousRFC WhentheRFCclientmakesthecalltotheRFCserver,processingstopsinthecallingprogram.While waitingfortheconnectiontotheRFCserver,noCPUisconsumedandtheworkprocessisnot availableforotherrequests.AfterestablishingtheconnectionandwhiletheRFCisrunningonthe RFCserver,thesenderprogramcontextrollsoutofitsdialogworkprocess.Theworkprocessisthen freeforotherrequests.WhentheRFCserverprogramreturnsresultstothesenderprogramonthe RFCclient,thesenderprogramcontextisrolledinagainandtheRFCclientcallingprogramcontinues processing.
2008SAPAG
BestPractice:RFCMonitoring Synchronousscenarioshavehigherrequirementsforsystemavailabilityandperformanceandthey alsorequirecomplexerrorhandling,thatis,iftheRFCclientisusingsynchronousinterfacesto manipulatedataintheRFCserversystem,youareforcedtoimplementyourowntransactionalID handlingtoguaranteethatthedataisnotsentandprocessedtwice.Therefore,thereceiving applicationhastocheckifthesamedatahasalreadybeenreceived(andprocessed).Therefore,the programmingonthesenderandthereceiverisquitecomplexandrequiresthoroughprogramming withregardtoerrorproofprocessing. Forthesereasons,SynchronousRFCcallsarepreferablyusedforreadonlyaccessestoremote systems,forexampleforanavailabilitycheck formaterial.
2.1.2.2AsynchronousRFC(aRFC)
AsynchronousRFCisanasynchronouscommunicationmethodthatexecutesthecalledfunction moduleintheRFCserver.Youcanuseasynchronousremotefunctioncallswheneveryouneedto establishcommunicationwitharemotesystem,butdonotwanttowaitforthefunctionsresultbefore continuingprocessingthecallingprogram. TheABAPcodetoenableasynchronouscommunicationdiffersfromsynchronousonlyintheaddition ofthekeywordsSTARTINGNEWTASK<taskName>whereby<taskName>canbeanyunique characterstring.
Figur e3 Pr ocessflowAsynchr onousRFC InanasynchronousRFC,thecalledremotefunctionisstartedimmediatelyinthecallingprogramand then continues processing on its own, independent of the calling program.With aRFC you have the optiontomaketheaRFCnothandle(aRFCwithoutresponse)ortohandle(aRFCwithresponse)the remotefunctionoutput.
2.1.2.2.1AsynchronousRFCwithoutResponse
InthecaseofRFCwithoutresponse,theRFCconnectionclosesimmediatelyafterthesuccessful checkforavailabilityoftheRFMmeaning,ifanyerrorsoccuraftertheconnectioncloses,forexample iftheRFCauthoritycheckwhichverifiesiftheRFCuserisabletoexecutetheRFMfailstheRFC clientcallingprogramisnotnotified.Fromaperformancepointofview,closingtheconnectionso quicklyisnotoptimal,especiallyifitisrequiredtomakemultipleRFCcallstothesamedestination.It isimportanttoconsiderthiswhenimplementingaRFC.
2008SAPAG
BestPractice:RFCMonitoring
2.1.2.2.2AsynchronousRFCwithresponse
WithaRFCwithresponse,youcanreceiveresultsfromtheremotefunctionmodule.Inorderto implementaRFCwithresponse,theABAPstatementPERFORMING<subroutine>ONENDOF TASKisused,wherethespecifiedsubroutinemustexistinthecallingprogram(RFCclient).The ABAPcodetospecifyasubroutinetakestheformat:
FORM<subroutineName>USING<taskName>. RECEIVERESULTSFROMFUNCTION<remoteFunctionName>
Whentheremotefunctionmodulefinishesprocessingthespecifiedsubroutineiscalledautomatically andtheremotefunctionmoduleoutputisretrievedusingtheRECEIVERESULTSFROMFUNCTION statement.ThekeywordUSING<taskname> isimportantwhenthesubroutineiscalled<taskname> receivesthetasknameofthecallingprogram(specifiedbySTARTINGNEWTASKinthecalling program).ThisparameterletsyouseewhichaRFCcalljustended. Whenthesubroutinehasbeen executed,RFCconnectionsareclosedandcontrolissentbacktotheWAITUNTILstatementinthe callingprogram.Thischeck/waitprocedurerepeatsuntiltheWAITconditionsarefulfilled,oruntilthere arenomoreopenRFCconnections.
2008SAPAG
BestPractice:RFCMonitoring
2.1.2.2.3AsynchronousRFCLoadDistribution
AsynchronousRFCisdesignedforparallelprocessing,thatis,theRFCclientmakescallstotheRFC serverstartstheremotefunctionmodule,controlispassedbacktotheRFCclientwhichcanthen makeadditionalaRFCs.AsynchronousRFCdoesnotassesstheloadontheRFCserver.When makingalargenumberofaRFCcalls,theSAPservercangetoverloaded,afterallaRFCinvolves askingthesystemtoinitiateandmanageRFCcallswhilecontinuingtomanagethemainprogramand 2008SAPAG 10
BestPractice:RFCMonitoring perhapsqueuingupothersessionstoexecuteatthesametime.ItispossiblethattheRFCServer runsoutofresources,thatis,memory,CPU,workprocesses.IftheaRFCcallsaremadewithinthe samelogicalSAPsystem,thereisawaytoavertthisoverloadingoftheRFCserver.Whencallinga functionmodule,youcanspecifyapredefinedRFCgroup(insteadofasingleserver)usingthe additionDESTINATIONINGROUP<RFCgroup>(maintainedintransactionRZ12orSAPRFC).This additionselectsthenextfreeserverinthegrouptoexecutethefunctionmodule.Thisisachievedby specifyingtheadditionDESTINATIONINGROUPafterSTARTINGNEWTASK.Youcanonlyusethis additionwithinthesamelogicalsystem.YoucannotspecifyaremoteDESTINATION.Insteadof specifyingaspecificRFCgroup,youcanalsoenterthewordDEFAULT.Theserverisselectedfrom alltheapplicationserversoftheR/3System.Ifalltheserversofthespecifiedgroupareoverloaded, theexceptionRESOURCE_FAILUREistriggeredandthiscanbehandledbytheRFCclientcalling program. RefertosectionMaintenanceofRFCservergroupsformoreinformation.
2.1.2.3TransactionalRFC(tRFC)
TransactionalRFCisanasynchronouscommunicationmethodthatexecutesthecalledfunction moduleintheRFCserveronlyonce(exactlyonceexecution(EO)).Thereceivingsystemneednotbe availableatthetimewhentheRFCclientprogramisexecutingatRFC.Incasethereceivingsystem isnotavailableorincaseofcommunicationerrors,systemerrorsorapplicationerrors,thetRFC componentstoresthecalledRFCfunction,togetherwiththecorrespondingdata,intheSAPdatabase underauniquetransactionID(TID).Then,abackgroundjob,RSARFCEX,canbescheduledto restartthetRFC.Inaddition,incaseofanerrortheinvolvedsystemscancheckforduplicatedelivery usingtheTID.ThisisincontrasttosRFCandaRFCwhereyouhavetohandleerrorsexplicitlyand youhavetobuildyourownmechanismforreissuingcallsatalatertime. YoucanusetRFCifyouinserttheadditionINBACKGROUNDTASKbeforetheDESTINATION statement.IfyouspecifyaCOMMITWORKstatement,allRFCsinthecallingprogramarebundled intoaLUWandareexecutedontheRFCserverifthespecifiedfunctionshavethesamedestination theyformoneLUW,ifthespecifieddestinationsdiffereachisexecutedinaseparateLUW.
2008SAPAG
11
BestPractice:RFCMonitoring Onatechnicalleveltheprocessworksasillustratedbelow:
Figur e8 tRFCmechanism ThetRFCqueueconsistsoftablesARFCSSTATEandARFCSDATAonthesendersideand ARFCRSTATEonthereceiverside.TheSTATEtablescontainstatusinformationaboutthetRFCcall ontherespectivesideswhiletheDATAtablescontainthelistoffunctionmodulestobecalledtogether withtheirparametervalues. l Step1:TheRFCfunctiontobecalledtogetherwithitsparametervaluesiscopiedintothe tRFCqueue(ARFCtables).ThisistriggeredbytheCOMMITstatementinthesenderLUW. l Step2:Thedata(functionmoduleanditsparameters)istransferredbyasynchronousRFCof theinternalfunctionARFC_DEST_SHIP.OnthereceiversidethedataisstoredinthetRFC queuefirst.ThisstepisnottriggereduntiltheV1updateassociatedwiththeCOMMIT statementonthesendersidehassuccessfullycompleted. l Step3:Thefunctionmoduleisexecutedinadialogworkprocessonthereceiverside. l Step4:ARFC_DEST_SHIPreturnsthestatus(success,systemfailure,communication failure)oftheexecutionofthefunctionmoduletothesender. l Step5:IfthestatusreturnedbyARFC_DEST_SHIPis'successor'systemfailure',thesender callsinternalfunctionARFC_DEST_CONFIRMviasRFC.Ifthestatusreturnedby ARFC_DEST_SHIPis'communicationfailure',thesenderdoesnotknowtheprocessing statusonthereceiverside.Inthiscase,thesendercanrepeatthetRFCcallatalatertime. l Step6:TheexecutionofARFC_DEST_CONFIRMdeletesthecorrespondingentriesfromthe tRFCqueueonthereceiverside. l Step7:OnreturnofARFC_DEST_CONFIRM,thesenderdeletesthetRFCentriesfromthe sendertRFCqueue.
BestPractice:RFCMonitoring
Target system
Error Message
TID
2.1.2.4QueuedRFC(qRFC)
WithtRFC,generatedLUWsareprocessedindependentlyofeachother.Therefore,theorderinwhich theyareprocessedisnotalwaystheorderinwhichtheyaregenerated.Toguaranteethatmultiple LUWsareprocessedintheorderspecifiedbytheapplication,tRFCcanbeserializedusingqueues (inboundandoutboundqueues).ThistypeofRFCiscalledqueuedRFC(qRFC).qRFCistherefore anextensionoftRFC.IttransfersaLUW(transaction)onlyifithasnopredecessors(inreferenceto thesequencedefinedindifferentapplicationprograms)intheparticipatingqueues.Implementationof qRFCisrecommendedifyouwanttoguaranteethatseveraltransactionsareprocessedina predefinedorder.
Figur e10 qRFCpr ocessing YoucanuseqRFCifyouinserttheadditionalABAPstatements TRFC_SET_QUEUE_NAME(touse outboundqueues)orTRFC_SET_QIN_PROPERTIES (touseinboundqueuesandoutboundqueues) beforetheregulartRFCstyleCALLFUNCTIONstatement.Thecalltofunction TRFC_SET_QUEUE_NAME/TRFC_SET_QIN_PROPERTIEStellsthesystemintowhichqueuesto insertthenextRFCcall 2008SAPAG 13
BestPractice:RFCMonitoring
2.1.2.4.1QueueMonitoring/Administration
IntheSAPenvironment, inboundandoutboundqueuesaremonitored/administeredusingthequeue administrationtransactionsSMQ1(outboundqueues)andSMQ2(inbound).Thefollowingfunctions areavailable. Listqueues DisplayqueueswithalistofaccompanyingLUWsandfunctionmodulesincludinginputdata Start/stoptransmittingthequeues Deletequeuesorqueueentries
2008SAPAG
14
BestPractice:RFCMonitoring
2008SAPAG
15
BestPractice:RFCMonitoring
2.1.2.4.2OutboundandInboundSchedulers
qRFCmakesuseoftwoschedulersanOutboundSchedulerandanInboundScheduler.The schedulersareintendedtodistributetheloadovertheavailablesystemresourcesbothschedulers comeasSAPstandard.
2.1.2.4.3OutboundScheduler
Ontheoutboundside,theloadimposedonthereceivingsystemislimitedbythenumberofqueues.If alargenumberofqueuescanbefilledsimultaneously,queuesdonotsufficientlycontrolresourceson thereceivingsystem.TheOutboundScheduler(transactionSMQS)providesmoreexactcontrolover resourcesonthereceivingsystem.Youcanconfiguretheoutboundschedulertolimitthenumberof requestssentatthesametimetoanRFCdestinationeitherviaqRFCorviatRFC.
Figur e15 Tr ansactionSMQS Outboundscheduler configur ation Normally,theOutboundSchedulerdoesnotworkcontinuously,therefore,itsstatusonqueuelevelis usuallyshownasINACTIVE.Itonlystartsworkingifnewentriesarestoredinanoutboundqueueor ifatRFCissenttoadestination.TheOutboundSchedulerismonitoredandconfiguredusing transactionSMQS.Youcanmonitortheschedulerstatusandregisternewdestinations.Inorderto registeradestination,choosethebuttonRegistration. Someimportantparameterswhichcanbesetusingtheoutboundschedulerarelistedbelow: MAXCONN: Max.connectionsforadestination(max.DIALOGworkprocessesinsending andreceivingsystem).Defaultis1fordestinationoftypeT(nonSAP)and10fordestination oftype3(SAPsystem). MAXTIME: Max.runtimeforadestination.Defaultis60seconds(shouldnotbeset lower).Definesthetimehowlongtheprocessingofthisspecificqueueisdoneuntilentriesof thenextqueuesareprocessed.
MaintenanceofRFCServerGroups: AgroupofapplicationserverscanbedefinedviaRZ12andassignedwithinSMQStoadestination. ToassignanRFCservergroupfortheoutboundschedulerthatwillprocesstherequeststobesent, chooseEditChangeASgroup.Thisallowsallrequeststothedestinationtobeprocessedinthis servergrouponly.ThemaximumnumberofdialogworkprocessesusedbytheOutboundScheduler canalsobedefinedviaRZ12.(SeeSAPNote74141:ResourcesManagementforaRFC/tRFC/qRFC) Inaddition,adestinationcanalsobeexcludedfrombeinghandledthroughtheOutboundScheduler, thiscanbedonebyregisteringthedestinationinSMQSandthenselectingthedestinationand choosingEditExclude.ThedestinationthenappearsastypeN,likedestinationPRDinthe exampleabove.IfadestinationisexcludedfromtheScheduler,thetransmissionisexecutedas before(immediatelyandasynchronouslytotheapplication).Bearinmindthatthismaycause resourcebottleneckproblemsinconnectionwithupdates.SeeSAPNote484753,regardinga descriptionofthedifferenttypesofOutboundSchedulerregistration.TheOutboundSchedulerruns withtheservergroupDEFAULTasapresetting.Thismeansthatallapplicationserversofthelocal SAPsystemareusedtoactivatealltheregisteredqueues.TheservergroupDEFAULTdoesnotneed 2008SAPAG 16
2.1.2.4.4InboundScheduler
Wheninboundqueuesareused,allLUWsaretransferredtotheinboundqueuebeforebeing processed.Normally,noneoftheLUWswrittenintheinboundqueueareautomaticallyexecuted. EachapplicationcanactivatethesequeuesusingAPIs(viacallingFMTRFC_QIN_ACTIVATEor QIWK_REGISTER).ToavoideachapplicationhavingtowriteaspecificinboundschedulerqRFC supportsageneralinboundscheduler(transactionSMQR).TheInboundSchedulerisconfiguredon thebasisofqueuenames.Ifnewqueuenamesareused,theymustberegisteredusingtransaction SMQR>>RegistrationorviaFMQIWK_REGISTERotherwisetheirentrieswillnotbeprocessed. LiketheOutboundScheduler,theInboundSchedulerdoesnotworkcontinuously.Itsstatusisusually shownasINACTIVE.Itonlystartsworkingifnewentriesarestoredinaninboundqueue. The InboundSchedulerdoesnotprocesstheLUWsbuttriggerstheirprocessinginasynchronouslystarted workprocesses.FortheInboundScheduler,itisalsopossibletocreate(transactionRZ12)andto assign(SMQR>>EDIT>>ChangeASGroup)anRFCservergrouptolimittheresourcesavailable forprocessing.TheInboundSchedulerrunswiththeservergroupDEFAULTasapresettingandin highvolumesystemstheDEFAULTservergroupshouldnotbeusedduetopotentialforsystem resourceoverload.
2008SAPAG
17
BestPractice:RFCMonitoring
Figur e18 Tr ansactionSMQR InboundScheduler configur ation SomeimportantparameterswhichcanbesetwhileusingtheInboundSchedulerarelistedbelow EXEMODE:Dfordialog,Bforbackground,dependingonthetypeoftheworkprocessthat shouldbeusedforprocessingqueueentries. MAXTIME:Timespentbytheinboundschedulerforworkingonthequeue.Ifthistimelimitis exceeded,butaLUWofaqueueisstillrunningtheschedulercompletedthisLUWandthen afterwards,theLUWsofotherregisteredqueuesaredistributedtoworkprocessesbythe inboundscheduler. USERDEST:Logicaldestination(definedintransactionSM59)forprocessingLUWsinthis queue.Thisenablesyoutochangetheclient,user,andlanguageforallqRFCLUWs. NRETRY:Numberofretries TDELAY:Delaybetweenretries
SeealsoSAPNote369007forconfigurationoftheinboundscheduler
2.1.2.5BackgroundRFC(bgRFC)
2.1.2.5.1IntroductiontothebgRFC
ThebackgroundRFC(bgRFC)isofferedasareplacementfortheclassictRFCandqRFC.Itis availablewithSAPNetWeaver2004s(SAPBasis7.00).WithSAPNetWeaver7.1(SAPBasis7.10) therearesomechangesregardingtheconfigurationandmonitoring.Thisdocumentisbasedonthe 7.10version. bgRFCisasuperordinatetermforthenewversionoftRFCandqRFC.Aparallelrunofclassic tRFC/qRFCandbgRFCispossible. ThebackgroundRFCworksonthebasisofunitsandperformsbettercomparedtotheclassictRFC andqRFCversions.ItcomeswithanewAPIanddatamodel.
2008SAPAG
18
BestPractice:RFCMonitoring Terminology: Theterm"unit"forthebgRFCcanbecomparedwiththeterm"LUW" forclassictRFC/qRFC. o Soaunitisarecordedsequenceofcollectedfunctioncallstobeperformedremotely. o TherecordedunitdataispersistedinthedatabaseatCOMMITWORK. Theterm"destination"forabgRFCunitdefineseitheraremotesystemforoutbound scenarios,oradistinctnameforanapplicationinaninboundscenario. o OutbounddestinationsaremaintainedviathestandardtransactionSM59 o InbounddestinationsaremaintainedviathespecifictransactionSBGRFCCONF ThebgRFCisbasedonaschedulerdrivenqueuingframework.Thismeansthatremotefunctioncalls arerecorded,andexecutiontakesplaceatalaterpointintime,whichiscontrolledautomaticallybya schedulerprocess.SeveralschedulerscanbestartedtoprocessbgRFCunits. Itsupportsthefollowingscenarios: Processingonaremotesystem(outboundscenario) o Usecase:Asynchronoustransactionalprocessingoffunctioncallsinaremote systemprocessingiscontrolledbythecallersystem(intersystemcommunicationfor SAPtoSAPandSAPtononSAP) Processingremotelybytheinboundscheduler(outboundinboundscenario) o Usecase:Asynchronoustransactionalprocessingoffunctioncallsinaremote systemprocessingiscontrolledbythereceiversystem(intersystemcommunication forSAPtoSAP) Processingonthesamesystem(inboundscenario) o Usecase:Asynchronoustransactionalprocessingoffunctioncallsinthesame system(intrasystemcommunication=samesystemandsameclient)
OutboundScenario
OutboundInbound Scenario
Figur e19 Over viewonthebgRFCscenar ios Inaddition,thereisasuccessortotheqRFC's"NoSend"scenario,whereoutboundcallsare recorded,butnotsentbytheoutboundscheduler(pullprinciple).Instead,thereceivingsystemis supposedtofetchitsRFCrecordsitself.InthebgRFCcontextthisiscalledLocalDataQueue(LDQ). ThebgRFCprovidestwoqualitiesofservice(QoS)forremotefunctioncalls(asynchronous transactionalsystemtosystemcommunication):
exactlyonce(EO)=>transactionalunits(liketheclassictRFC)
o Eachunitisanindependentthread
exactlyonceinorder(EOIO)=>queueunits(liketheclassicqRFC)
o Unitswithsequencedependencies
2008SAPAG
19
BestPractice:RFCMonitoring ValidCombinationsofQoSandScenario: QoS tRFC(EO) qRFC(EOIO) Inbound X X Outbound X X Outboundto Inbound X (NoSend) X
2.1.2.5.2AdvantagesofthebgRFC
TheprimarygoalofthebgRFCprojectistoimprovetheruntimebehaviorofqRFCwhileremaining compatiblewiththeqRFCsexistingprotocolandavoidingdowntimeinaffectedsystemswhen customersupgradetothenewversion.Theimproveddesignprocesseslargeamountsofhighly sequentialdata,suchasthedatafoundinSCMscenarios,muchmoreefficiently.ThenewbgRFCis availablealongsideqRFC.Itisnotpossibletomixthenewprocedurewiththeclassicfunctions.Itis possible,however,tousebothproceduresinparallel.Sincethereisnooverlapbetweenthetwo procedures,andinanefforttopreventerrors,youspecifywhichprocedureistobeusedforoutbound processingatthedestination.Thatmeansthatalltransactionsthatdefinedependenciesbetweentheir qRFCcallshavetoeitherswitchtothenewbgRFCprocedure,orhavetosticktotheexisting procedure.SynchronousandasynchronousRFCarenotaffected. TheclassicqRFCmodeldetectsthedependenciesamongtheindividualunitsonlywhenthedatais processedbytheRFCscheduler.Foreachdestination,theoutboundschedulerstartsadestination schedulerthatprocessesthedataforaspecificdestination.Thedestinationschedulersrunoneach destinationonlyforalimitedperiodoftime,tobalancetheloadbetweenalldestinations.Beforeeach destinationisprocessed,theorderofthedestinationsmustbedeterminedagainbythedestination scheduler. ThenewbgRFCdesigntakescareofthisproblembydetectingthedependenciesatthetimethedata isstored.Indoingso,theRFCschedulercanfindallunitsthatcanbeexecutedinstantlywith minimumeffortandalldependenciesaredetectedonlyonce.Theadditionaleffortwhenstoringthe dataiscompensatedtoalargeextentbyefficientalgorithmsandoptimizationsinthedatabasedesign. Foreachclient,anumberofoutboundschedulersarestartedthatsharetheworkload.ThenewRFC schedulersreactmoresensitivelytotheloadinthetargetsystems.Inthepreviousmodel,theload balancingwasbasedontheconceptofthelogongroups.Thismeansthattheinformationaboutthe loadinthedestinationsystemsavailableatruntimecouldbeuptofiveminutesold.Thisinformationis updatedatmuchshorterintervalsintheimprovedbgRFCdesign. Thegateways,anotherpotentialsourceofbottlenecks,havealsobeenoptimized.Thenewconcept regulatesthemaximumnumberofoutboundschedulersthatareallowedtorunatthesametimeon anapplicationserver,andthemaximumnumberofconnectionsthatallRFCschedulersareallowedto use.Thislimitationpreventsthelocalgatewayfrombecomingoverloaded.Thegatewaysofthe destinationsarealsoprotectedfromoverloadbymakingthenumberofparalleloutboundschedulers foreachsendingsystemandtheirmaximumnumberofconnectionsconfigurable. Importantdifference: ForthebgRFCthereisnoregistrationofqueuenames.IncontrasttoqRFCinboundyoucannot registerorderegisterqueues,inordertocontrolwhetherrequestshouldbeprocessedautomatically bytheschedulerornot.ThepropertywhetherabgRFCunitshallbeprocessedautomaticallyor manuallyviathemonitors,mustbesetforeachparticularunitatthetimeofcreation.
2.1.2.5.3BasicsyntaxforthebgRFC
Thenewsyntaxforcallingafunctionmoduleforbackgroundprocessing(previouslydoneusingper syntaxINBACKGROUNDTASK)isasfollows: CALL FUNCTION 'function_name' IN BACKGROUND UNIT unit EXPORTING TABLES Theobjectreferenceunit pointstoanobjectofthetypeIF_BGRFC_UNIT.Thisobjectcontainsall informationthatisneededtorunthefunctionmoduleinthebackground.Thisinformationiscomprised of,forexample,theexecutiondestination,thedistinctionbetweenqRFCortRFC,andprobablythe 2008SAPAG 20
BestPractice:RFCMonitoring numberofqueuesacrosswhichtheunitisspread.Ifthesameunitobjectisusedwithmultiple functionmodulecalls,thenallthesefunctionmodulesareexecutedinoneunit.Itispossibletouse multipleunitobjects,inparallel,withinasingleapplicationLUW.Consequently,multiplebackground unitscanbecreatedinparallelwithinanapplicationLUW.Inthepreviousversion,thiswaspossible usingtheASSEPARATEUNITsyntaxaddition.Theadvantageofthenewsolutionisthatmultiple backgroundunitscanacceptmultiplefunctionmodules.Intheeventofaninvalidunitobject,the exceptionCX_BGRFC_INVALID_UNITisraised. Adestinationobjectisrequiredtosendaunit.Thedestinationobjectrepresentsoneexecution destinationorasetofexecutiondestinations.Destinationobjectscanberequestedusingtheclass methodsfromtheclassCL_BGRFC_DESTINATION_OUTBOUNDfortheoutboundqueueandthe classCL_BGRFC_DESTINATION_INBOUNDfortheinboundqueue.Thedestinationfortheoutbound queuemustbemaintainedinthetransactionSM59andrepresentsanexecutiondestinationforthe outboundbgRFCtypetandtypeq.Thedestinationfortheinboundqueuemustbemaintainedinthe transactionSBGRFCCONF.Ifthedestinationisnotvalid,theexception CX_BGRFC_INVALID_DESTINATIONisproduced. Pleasenotethatintheactualremotefunctioncall(CALLFUNCTIONINBACKGROUNDUNIT) thereisnoDESTINATIONkeywordanymore. ProgrammingexampleofatransactionaloutboundbgRFC: DATA: my_dest TYPE REF TO if_bgrfc_destination_outbound, my_unit TYPE REF TO if_trfc_unit_outbound. my_dest = cl_bgrfc_destination_outbound=>create( 'MY_DEST' ). my_unit = my_dest->create_trfc_unit( ). CALL FUNCTION 'MY_RFC_FUNCTION' IN BACKGROUND UNIT my_unit. COMMIT WORK. ThiswouldcreateatransactionalbgRFCcalloffunctionmoduleMY_RFC_FUNCTIONtowardsthe outbounddestinationMY_DEST.
2.1.2.5.4ConfigurationofthebgRFC
BasicsettingsintransactionSBGRFCCONF: CreationofasupervisordestinationintransactionSM59,todefinetheuserunderwhichthe schedulerisrunning.Withoutthissupervisordestination,theschedulerscannotbestarted. ThecreatedsupervisordestinationisenteredintotransactionSBGRFCCONFandis afterwardslockedinSM59.
2008SAPAG
21
BestPractice:RFCMonitoring
Transaction SM59
Transaction SBGRFCCONF
Figur e21 Tr ansactionSBGRFCCONF:Loaddistr ibution CustomizingofthebgRFCschedulerintransactionSBGRFCCONF: TooptimizethebgRFCfunctionintermsofsystemperformanceyoucanmakevarioussettingsforthe bgRFCschedulers.Thiscanbedoneonthreelevels: System Applicationservers Destinations
2008SAPAG
22
BestPractice:RFCMonitoring deletion).
2008SAPAG
23
2.1.2.5.5bgRFCMonitoring
FeaturesofthemonitoringtransactionSBGRFCMON: Theselectionscreenallowsfilteringoninboundand/oroutboundunitsoftypetransactional and/orqueued,aswellasadditionalcriterialikestatus,destinationname,queuename, usernameorprogram/transactionname. Hierarchicalrepresentationofdestinations,queuesandunits o Detailsforeachunit,e.g.administrativedata,queuenameorlistoffunction modulenames Setorremovelocksondestinations,queuesorunits Deletingqueuesorunits Directaccesstocustomizing,destinationmaintenanceandsupportabilitytools AccesstoSupportabilitytools: o DebuggingofabgRFCunit o Runtimeanalysisforaunit o Tracingaunit o Showingunithistory=>callingtransactionSBGRFCHIST o bgRFCPerformanceMonitor=>transactionSBGRFCPERFMON
2008SAPAG
24
BestPractice:RFCMonitoring MonitoringtransactionalunitsintransactionSBGRFCMON:
MonitoringqueuedunitsintransactionSBGRFCMON:
Contextmenufordestination/queue:
2008SAPAG
25
BestPractice:RFCMonitoring Contextmenufordestination/queue:
2.1.2.5.6TroubleshootingforbgRFC
ShowingunithistoryintransactionSBGRFCHIST: Theunithistoryshowsthechronologicalorderofstatuschangesduringtheprocessinglifetimeofa bgRFCunit.
2008SAPAG
26
BestPractice:RFCMonitoring
2008SAPAG
27
BestPractice:RFCMonitoring ExampleapplicationlogforcustomizingchangesintransactionSBGRFCCONF:
ExampleapplicationlogformanualactionsinmonitoringtransactionSBGRFCMON:
bgRFCperformancemonitor(transactionSBGRFCPERFMON):
2.1.2.5.7LDQMonitoring
ThemonitorfortheLDQ(LocalDataQueue)iscalledwithtransactionSLDQMON.Itprovidesa selectionscreenforfilteringonLDQapplicationand/orqueuename.Thelefthandsidetreecontrol showsallLDQapplicationswiththeircorrespondingqueuenames.Ontherighthandsideofthe screen,foreachqueuethereisalistofLDQunitswithinaqueue.ClickthebuttonContents toshowa popupwiththeunit'scharacterorbinaryformatcontent.
2008SAPAG
28
BestPractice:RFCMonitoring
2.1.3 DependenciesandConvergenceofTechnologies
2.1.3.1QueueDependenciesforqRFC
WhenqRFCisusedforserialization,dependenciesareestablishedbetweenfunctionmodules.Itis possibleformultiplefunctionmodulesofthesameLUWtobeprocessedinmultiplequeues.Thisis achievedusingthefollowingsyntax:
Figur e24 Pr ogr ammingLUWwithentr iesinmultiplequeues Intheexampleabove,thetwofunctionmodulesABCandXYZmakeuponeLUW.Eachfunction moduleisplacedinadifferentqueue,thatis,MyDependingQ1andMyDependingQ2.Allfunction modulesofthedifferentqueuesthatarepartofthesameLUWareprocessedatonceandareended withonedatabasecommit.Inordertoensurethatthesefunctionmodulesareprocessedinthecorrect orderonthereceivingsystem,theqRFCmanagersetsacounter(counteriscreatedautomaticallyon commitworkbytheqRFCManagertoserializetheprocessingofthoseLUWsthatextendover multiplequeues.Forthechangestobecommittedtogether,thefunctionmodulesofthedifferent queueswhicharepartofthisLUWmustbeatthefrontofallthesequeues.Inthefigurebelow,queue 2iscurrentlynotprocessedfurther,asitsfirstLUWextendsacrossqueue1,andthisLUWinqueue1 isprecededbyanotherunrelatedLUW.
2008SAPAG
29
BestPractice:RFCMonitoring
Figur e25 LUWsspanningacr ossmultiplequeues IntheSAPsystem,thesedependenciescanbemonitoredusingtheqRFCmonitor.Thefigurebelow shows3queuescontainingthefunctionmoduleentriesof2LUWs.ThefirstLUWextendsoverthe queuesMyDependingQ1andMyDependingQ2andthesecondLUWextendsoverMyDepending Q2andMyDependingQ3.Afterselectingallqueuesanddisplayingthem,youcanseefurtherdetails. Inthefollowingexample,theInboundqRFCMonitorshowsQ3waitingforQ2.Itiswaitingbecause thefirstLUWisnotyetprocessed.
Figur e26 Monitor ingdependenciesacr ossdiffer entqueuesI ItisalsopossibletodisplayallqueuesthatareinvolvedintheLUWsofonequeue.Thiscanbedone bydoubleclickingonthatqueueintheQueueMonitor(seefigurebelow).Doubleclickingonthe queueMyDependingQ2showsthatoneLUWhasfunctionmodulesinMyDependingQ1anda secondLUWhasfunctionmodulesinMyDependingQ3. 2008SAPAG 30
BestPractice:RFCMonitoring
2.1.3.2QueueDependenciesforbgRFC
AlsoforthebgRFCaqueuedunit(LUW)canbestoredacrossseveralqueues.Thisisreachedby handingoveralistofqueuenames(insteadofonequeuenameonly)totheunitobject.
2.1.3.3MixedModeRFC
ThereisaspecialfeaturecalledmixedmodethatallowsqRFCcallswithsendqueueandnormal tRFCcallswiththesamedestinationtobeprocessedtogetherwithinoneLUW.If,withinanLUWin mixedmode,thefirstcallisanormaltRFCcall,thefunctionmoduleTRFC_QUEUE_INITIALIZEis calledfirst(seefigurebelow).ThisensuresthatthecurrentLUWisprocessedviaqRFCwithsend queue.If,withinanLUWinmixedmode,thefirstcallisaqRFCcall,thisinitializationisdoneby functionmoduleTRFC_SET_QUEUE_NAME.
2008SAPAG
31
BestPractice:RFCMonitoring
Figur e28 Syntaxforimplementingmixedmode Whenmixedmodeisimplemented,anytRFCsareprocessedasqRFCs.Monitoringcanbeperformed inSMQ1andalsointransactionSM58.TransactionSM58(tRFCmonitorfordisplayingandeditingthe tRFCtransactions),nowalsoallowsprocessingqRFCtransactions.IfyoudeleteatRFCentrywith thistransaction,thesystemautomaticallydeletesthecorrespondingentriesinthesendqueuetable,if theyexist.IfyoustartanLUW,thesystemdoesnotimmediatelytransferthisLUW,butchecks first whetherthisLUWneedsserializationorwhetheritmustwaitduetopredecessorsinthequeue.
2.1.4 AutomaticSwitchingfromqRFCtotRFC
IftheexecutionofaqRFCLUWisterminatedbytheerrorSYSTEM_FAILURE,thequeueisblocked thiscanresultinbacklogsinthequeues.IfyouwanttouseqRFCinsteadoftRFCforbettersystem performance,andnotforserialization,itispossibletosettheoptionalparameterTRFC_IF_SYSFAIL toXwhileyoucallthefunctionmoduleTRFC_SET_QUEUE_NAME.ThisresultsinallLUWswiththe errormessageSYSTEM_FAILUREbeingconvertedtotRFCLUWs,enablingtheqRFCManagerto executethenextLUWinthisqueue.TheLUWswhichareconvertedtotRFCcanthenbe administered/monitoredusingtransactionSM58.
2008SAPAG
32
BestPractice:RFCMonitoring
2008SAPAG
33
BestPractice:RFCMonitoring
BestPractice:RFCMonitoring
systemusingtransaction SARFC.
Communicatio n/connection problem (sender system). SM59 Incaseof connection/ communicat ion problems. Commu nication error CPIC errors. RuntransactionSM59> chooseRFCdestination> [MENU]Test> Connection(totestifthe connectiontotarget systemisworking). Itisalsopossibletomake anauthorizationchecki.e. SM59>chooseRFC destination>[MENU]Test >Authorization(tocheck iftheuserisauthorizedin thetargetsystem). Ifanerroroccursdouble clickontheerrormessage togetfurtherdetails. InadditionRFCTracecan bedisplayedi.e.SM59 SAP Technology Operations Team. SAP Technology Operations Team.
[Menu]RFCDisplay Trace.Thiswillprovidea
Communicatio n/connection problem (sender system). greaterdetailofanyerror. RuntransactionSM21> Lookforoccurrenceof communicationCPIC errors.Doubleclickon errormessagetoget details.UseSAPNote 63347totranslatetheSAP andCPICreturncodes. ST11 Incaseof Commu RuntransactionST11to and communicat nication displayerrorlogfiles. AL11 ion/connecti error Communicationerrorsare >> on CPIC loggedforthefollowing work problems. errors. components:RFClayer (dev_rfc<n>),Gateway directo (dev_rd)andwork ry. processesdev_w<n> SM21 Daily/As requiredby business. Commu nication errors i.e.CPI C errors. SAP Technology Operations Team. SAP Technology Operations Team.
SM59[Menu]RFC DisplayTrace.
GatewayTracecanalso bedisplayedusing 2008SAPAG 35
BestPractice:RFCMonitoring
2008SAPAG
36
BestPractice:RFCMonitoring wasstarted.Forfurther informationreviewSAP Note47682. Incaseof Commu ActivateRFCtraceby connection/ nication includingtheparameter communicat errors. RFC_TRACE=<tracelevel> ion inthesideinfofileorby problems. SettingtheRFC_TRACE environmentvariableinthe externalclientsystem.For furtherinformation includinglocationof generatedtracefiles reviewSAPNote532918. Daily/As Runtime RuntransactionST22and requiredby errors. selecttimeperiod.Look business. outforerrorsoftypeRFC*, CALL_FUNCTION*. Doubleclickondumpto obtaingreaterdetails. Daily/As Messag RuntransactionSM58to requiredby es checkstateofRFC business. Hangin communicationlayer. gorin Chooseatimeframein status ordertodisplayalistof Error. tRFCswhicharehanging orwhichareinstatus error.Togetmoredetails foreachtRFCdoubleclick. Daily/As requiredby business. Messag es buildup in queues and queue instatus error. RuntransactionSMQ1and choosevariousselection criteria.Lookoutfor queueswithmanyentries andorqueueswhichare static(entriesnotgetting processed).Selectqueue bydoubleclickingtoget queuestatus(seeSAP NoteNo.378903for descriptionofstatus codes),doubleclickagain togetstatusofindividual LUWwhichisresponsible forerrorstatusofqueue. Messag RuntransactionSMQ2and es choosevariousselection buildup criteria.Lookoutfor in queueswithmanyentries queue andorqueueswhichare and static(entriesnotgetting queue processed).Selectqueue instatus bydoubleclickingtoget error. queuestatus(seeSAP NoteNo.378903for descriptionofstatus codes),doubleclickagain togetstatusofindividual LUWwhichisresponsible forerrorstatusofqueue. Outbou RuntransactionSMQS
N/A
SM58
SMQ1
SMQ2
tRFC/qRFC 2008SAPAG
SMQS Asrequired
SAP
SAP 37
BestPractice:RFCMonitoring notprocessed (sender system). andcheckstatusof OutboundScheduler. Doubleclickonthestatus fordetailederror information.(Maybe necessarytocombinethis analysiswithanalysisof systemlog(SM21)andthe errorlogsi.e.dev_rfc*, dev_rd,dev_w*). SMQR Asrequired Inbound RuntransactionSMQR by Schedul andcheckstatusof business. erin InboundScheduler. status Doubleclickonthestatus CPICE fordetailederror ROR information.(Maybe SYSFAI necessarytocombinethis L. analysiswithanalysisof systemlog(SM21)andthe errorlogsi.e.dev_rfc*, dev_rd,dev_w*). SMQE Incaseof Errorin ActivateqRFClogandor communicat logfile. qRFCtracebyrunning ion transactionSMQE>> problems. [Menu]QRFC>>Trace>> Forerror ActivateTraceand analysis transactionSMQE>> only. [Menu]QRFC>>Log>> ActivateLog(thisshould onlybeperformedwhen analyzingerrorsbecause activatingthishasan overhead).Forfurther detailssee by business. nd Schedul erin status CPICE ROR SYSFAI L. Technology Operations Team Technology Operations Team
RFCnot processed
SM04 >>
http://help.sap.com/saphel p_sm32/helpdata/en/4f/e0 5f3ca2de8974e10000000a 114084/frameset.htm Incase Errorin RuntransactionSM04and communicat logfiles. selectuser>>[MENU] ionerrors USER>>Technical fora Information.Thisprovides specific detaileduserinformation. user. TakenoteofConversation ID. Nextstepistorun transactionSMGWto displayalistofactive connectionsonthe gateway.Lookfor corresponding conversationID,double clickontheconversation IDtogetdetailsabout connection.Run transactionST11and
2008SAPAG
38
BestPractice:RFCMonitoring searchinthedev_rdand dev_rfc<n>tracefilesfor conversationID examinereasonforerror. Increasetheindividual tracelevelsifnotenough detailisavailable.See SAPNote532918for furtherdetails. RFCnot processed (sender/receiv ersystem). SM04 >> Trace Incaseof error situations fora specific user Errorin logfile ActivatetheRFCtrace generationforaloggedon R/3userbyselectingthe userinquestionin TransactionSM04and choosingEdit>>Trace >>Traceon(inolder releases)or User>>Trace>>Activate. YoucanspecifytheR/3 componentsthat shouldwritetrace informationviathedisplay componentsinEdit>> Trace>>'Displaytrace' (olderreleases)orin User>Trace>>Display. FortheRFCtrace,atleast thetaskhandlerandthe ABAPprocessorshould alwaysbemarkedhere. Thisactivationhasthe effectthatalltheRFClinks oftheuserinquestionare documentedinthe correspondingtracefilesof theapplicationserver wheretheactivationvia SM04tookplace.Ifsucha userspecifictrace generationoccurs,the userishighlightedin yellowinSM04. Commu Usetransaction nication SBGRFCCONFtocheck errors, configurationofinbound queue schedulersandoutbound backlog destinations. Runtime Usemonitoringtransaction errors, SBGRFCMON.Check queue statusofdestinationsand backlog queues.Checkunithistory (transaction SBGRFCHIST)andtraces (transactionST11forfiles "dev_bgRFC*").Check applicationlog(transaction SLG1)forlogobject BGRFC. SAP Technology Operations Team SAP Technology Operations Team
bgRFCnot processed
SBGR FCCO NF
Ondemand
2008SAPAG
39
BestPractice:RFCMonitoring
Escalation Procedure
40
BestPractice:RFCMonitoring qRFC Numberof specified queuesin status blocked monitoredin SAPCCMS orSAP Solution Manager (referto section Automated qRFC Monitoring) Errorsin tRFC processing monitoredin SAPCCMS orSAP Solution Manager (referto section Automated tRFC Monitoring) Hourly Queuesin status blocked Analyzethe reasonin transactions /nSMQ1or /nSMQ2 Business Process Operations Team/ SAP Technology Operations Team Application Management Team/ Business Process Champion
tRFC
Hourly
2008SAPAG
41
BestPractice:RFCMonitoring
2008SAPAG
42
BestPractice:RFCMonitoring
3.3.2 ExternalProgramnotregisteredonGateway
Problem: AftertheupgradetoR/3Enterprise4.70,theconnectiontothearchivingsystemwasoften lost.Analysisshowedthefollowing: Problem during initiationof connection
Figur e32 Exter nalpr ogr amnotregisteredingateway(SM59,SM21anddevelopertr aces) Cause: Solution: Registertheprogramonthegateway. SeeNote63930and353597. Theexternalprogramisnotregisteredonthegateway.
2008SAPAG
43
BestPractice:RFCMonitoring
3.3.3 ExternalProgramtimeoutonGateway
Problem: IDocscouldnotbesentoutfromR/3tothe3rdpartyproductthoughtheincomingprocessto R/3hasnoproblem.Analysisshowedthefollowing:
Figur e33 Exter nalpr ogr amtimeoutingateway(SM59anddeveloper tr aces) Cause: Theprogramisregisteredonthegatewayandiscurrentlybeingusedbyaprocess.Another processattemptstoaccesstheregisteredprogrambutcannotbecauseitisalreadyinuse. Thesystemwaitsacertainperiodoftime(gw/reg_timeout)andafterthisspecifiedtimeperiod ifitstillcannotaccesstheregisteredgatewayprogramitterminateswiththetimeoutduring allocateerror.
2008SAPAG
44
BestPractice:RFCMonitoring
3.3.4 Timeoutduringconnectionsetup
Problem:
Afterthemigrationtoanotheroperatingsystem,theRFCconnectionsfailed.
2008SAPAG
45
BestPractice:RFCMonitoring
3.3.5 Activeconnectiontableisfull
Problem: Thecentralinstancecommunicationtableis full,anddeallocatedconnectionscannotbe clearedout.
SM51SelectaserverGotoServerinformationCommunicationtable
Deletetheoldconnections: Loggedonclient: SMGWGotoLoggedonClientsDeleteClient. Normalgatewayconnection: SMGWGotoActiveConnectionsDelete
connection
Adjustthegatewayparameters,referringtothehelpdocument.
SMGWGotoParametersDisplay(tomakethemactive,maintaintheinstance profile)
gw/cpic_timeout gw/keepalive gw/cpic_timeout gw/gw_disconnect
2008SAPAG
46
BestPractice:RFCMonitoring
3.3.6 SQLerror60whenaccessingtableARFCSSTATE
Problem: ManyshortdumpsweregeneratedrelatingtoTableARFCSSTATEandARFCSDATAinthe productivesystem.
2008SAPAG
47
BestPractice:RFCMonitoring
3.3.7 CPICTimeoutsduringconnectiontoExternalprogram
Problem:
Reportscouldnotbegeneratedsuccessfully,duetocommunicationfailurestothe3rdparty product.
ConversationID
2008SAPAG
48
BestPractice:RFCMonitoring
Conversation
2008SAPAG
49
BestPractice:RFCMonitoring
2008SAPAG
50
BestPractice:RFCMonitoring
3.3.8 Sockettoolarge
Problem: ThestandalonegatewaywhichhandlestheRFCcallstothe3rdpartyproductstopped.
Analysis:UsingtransactionSMGWandtypingintheokcodefield"newg(togotoanothergateway formonitoring,thatis,standalonegatewayinstance).Itwasobservedthatthenumberofactive connectionsforthestandalonegatewaywasatitsmaximum,thatis, 2048. Cause: Uptorelease6.20,thegatewayisonlyabletodo2048connectionssimultaneously.Above, thesystemhasreachedthislimit. TheRFCconnectionisnotclosedinthecustomerprogramaftertheexternalprogram completesitstaskandthereisnoRFCtimeout.Therefore,moreandmoreRFCconnections areestablisheduntiltheyreachthelimitof2048connections.
Solution: RedesigntheexternalprogramsothatitwillclosetheRFCconnections.
2008SAPAG
51
BestPractice:RFCMonitoring
SMQ1
2008SAPAG
52
BestPractice:RFCMonitoring clickingtogetqueue status(seeSAPNote No.378903for descriptionofstatus codes),doubleclick againtogetstatusof individualLUWwhichis responsibleforqueue backlog. RuntransactionSMQ2 andchoosevarious selectioncriteria.Look outforqueueswith manyentriesandor queueswhicharestatic (entriesnotgetting processed).Select queuebydouble clickingtogetqueue status(seeSAPNote No.378903for descriptionofstatus codes),doubleclick againtogetstatusof individualLUWwhichis responsibleforqueue backlog. Runtransaction SBGRFCMON.Look fordestinationsand queueswithhigh numberofunprocessed units. Runtransaction SBGRFCCONFto checkthestatusof inboundschedulers andoutbound destinations.
SMQ2
2008SAPAG
53
BestPractice:RFCMonitoring
AutomatedMonitoringObjectswithSAPSolutionManager Monitoring Monitor Monit Indicatoror Monitoring Object TA/Tool Freq. Error Activityor Error Handling Procedure qRFC SAPCCMS/ Hourly Toomany Analyzethe backlog SAPSolution entriesinthe reasonin monitoring Manager specified transactions bythe queuegroup /nSMQ1or numberof mightindicate /nSMQ2 entries abacklog situation qRFC backlog monitoring bytheageof entries SAPCCMS/ SAPSolution Manager Hourly Oldentriesin thequeue groupcan indicatea backlog situation
Respon sibility
Escalation Procedure
Business Process Operations Team/ SAP Technology Operations Team Analyzethe Business reasonin Process transactions Operations /nSMQ1or Team/ /nSMQ2 SAP Technology Operations Team
FordetailsonhowtosetuptheautomatedqRFCbacklogmonitoring,refertosection AutomatedqRFCmonitoring.
2008SAPAG
54
BestPractice:RFCMonitoring
Forinformation onusingthe Workload Overviewsee sectionST03n Workload Overviewbelow fordetails. Reviewsection: Performance Monitoringof thisdocument onhowto further investigateany observed bottlenecks.
2008SAPAG
55
BestPractice:RFCMonitoring Slow processingof RFCs(sender system). ST03N> RFC Client Profile Asreq uired bybus iness. HighRFC processing times. Business Process Operations Team/ SAP Technology Operations Team SAP Technology Operations Team
HighRFC processing times ForInformation onusingRFC ServerProfile seesection. ST03nRFC ServerProfile below. HighRFC processing times Forinformation onusingthe RFCClient Destinationtool toanalyze performance seesection RFCClientand Server Destinations below. HighRFC processing times Forinformation onusingthe RFCServer Destinationtool toanalyze performance seesection RFCClientand Server Destinationsin thisdocument. HighRFC processing times Forinformation onusingSingle Statistical Records (STAD)see sectionSingle Statistical Records(STAD) inthis document.
2008SAPAG
56
BestPractice:RFCMonitoring Slow processingof bgRFCunits (inboundor outbound) SBGRFC MON/ SBGRFC CONF/ SBGRFC PERFMO N Asreq uired bybus iness Backlogof unitsin queueand queue. Runtransaction SBGRFCMON. Lookfor destinationsand queueswith highnumberof unprocessed units. Runtransaction SBGRFCCONF tocheckthe statusof inbound schedulersand outbound destinations. Runtransaction SBGRFCPERF MONtocheck keyfiguresfor inboundand outbound scenario. SAP Technology Operations Team SAP Technology Operations Team
((avg.CPU+avg.DB+avg.Load+Gen+avg.Rollin&Rollouttime)/1000)*NumberofSteps/ secondsoftheviewedperiod=numberofCPUsusedbyRFC
Ifmultipleinstancesareinuseandiftheresultofabovecalculationishighforthecentralinstancebut lowforotherapplicationservers,someimprovementmightbegainedbydistributingtheRFCload moreevenlyacrosstheservers.
2008SAPAG
57
BestPractice:RFCMonitoring
5.1.1.2ST03NRFCClientProfile
UsingtheRFCClientprofile(choose:Analysisviews>RFCprofiles>ChooseRFCprofile:RFC ClientProfile.)asillustratedabove,allowsanalysisofRFCcommunicationwhenthisparticularserver actsastheRFCclient.ChoosingthetabFunctionModuledisplaysalistofthecalledfunctionmodules fortheselectedserver/serversovertheselectedtimeperiod.AsthisistheRFCclient,weshouldbe lookingoutforlongconnectiontimesthiscanbeachievedbysortingbyCallTime(averageortotal, inSAPreleasesNW2004andNW2004sthesecolumnsiscalledTTimeandTime/RFC)toget thosefunctionmoduleswiththelongestprocessingtimesatthetopofthelist.Detailedanalysis(RFC trace)shouldbeperformedonthefunctionmoduleswhere,asaruleofthumb,thefollowingistrue: 2008SAPAG 58
BestPractice:RFCMonitoring
calltimeexecutiontime>20%(thatis,>20%processingtimeisspentonestablishingaconnection).
Possiblereasonsforlongconnectiontimesinclude: Establishmentoftheconnectiontakesalongtime,forexample,RFCserverisoverloadedor insufficientnumberofregistrationsbytheRFCServerprograms Datatransfertakestoolong,forexamplenetworkbandwidthoramountofdatatobe transferredtohigh
2008SAPAG
59
BestPractice:RFCMonitoring
ChoosingtabUserallowsyoutoviewalistofallRFCspawningtransactions.Similartoabovedouble clickingonthetransactionprovidesfurtherinformation.
2008SAPAG
60
BestPractice:RFCMonitoring
5.1.1.3ST03NRFCServerProfile
UsingtheRFCServerprofile(Analysisviews>RFCprofiles>ChooseRFCprofile:RFCServer Profile.)asillustratedbelow,allowsanalysisofRFCcommunicationwhenthisparticularserveracts astheRFCserver.ChoosingthetabFunctionModuledisplaysalistofthecalledfunctionmodulesfor theselectedserver/serversovertheselectedtimeperiod.AsthisistheRFCserver,youshouldbe lookingoutforhighloadfunctionmodules,thatis,executedfrequentlyandlongrunningfunction modules.ThiscanbeachievedbysortingbyNumberofcallsandTotalexecutiontimetogetthose functionmoduleswhichimposemostloadontheRFCserver. SortbyNumberofRFCCalls: If, forexample,thenumberofcallsforafunctionmodulewithinacertaintimeframe,for example,24hoursindicatesthatitiscalledeverysecondorwithanevenhigherfrequency, itshouldbeanalyzedwhyitiscalledsooften. SortbyTotalexecutiontime: TogetthosefunctionmodulesthatcausethehighestRFCloadonthesystemthese shouldbeanalyzedindetailusinganRFCtrace.
2008SAPAG
61
BestPractice:RFCMonitoring
Inadditiontotheabove,theRFCServerProfilealsoprovidestabswhichdisplayRFCspawning transactionsandalsotheRFCusersforthespecifiedperiod.
2008SAPAG
62
BestPractice:RFCMonitoring
5.1.1.4ST03NRFCClientDestinationsandServerDestinations
TheRFCProfilesalsoprovidetwootherusefulanalysistoolsRFCClientdestinationprofileandthe RFCServerdestinationprofile: TheRFCClientdestinationprofileliststhosetargets/SM59destinations,whichwerecalledbythe localsystem(RFCClient).AsthisistheRFCclient,weshouldbelookingoutforlongconnection timesthiscanbeachievedbysortingbyCallTime(averageortotal,inSAPreleasesNW2004and NW2004sthesecolumnsiscalledTTimeandTime/RFC)togetthosedestinationswiththe longestprocessingtimesatthetopofthelist. Detailedanalysisshouldbeperformedonthedestinationswhere,asaruleofthumb,thefollowingis true:calltimeexecutiontime>20%(i.e.>20%processingtimeisspentonestablishinga connection).Possiblereasonsforlongconnectiontimesinclude: Establishmentoftheconnectiontakestoolong,forexampleRFCserverisoverloadedor insufficientnumberofregistrationsbytheRFCServerprograms Datatransfertakestoolong,forexample,networkbandwidthoramountofdatatobe transferredtohigh
**Targetstab=SM59destinations
2008SAPAG
63
BestPractice:RFCMonitoring
Figur e48 RFCClientdestination,additionalinfor mationbydoubleclickingonfunctionmodule RFCServerdestinationliststhosetargets/SM59destinations,whichcalledthelocalsystem(RFC Server).AsthisistheRFCserver,youshouldbelookingoutforhighloadparticulardestinationsplace onthisRFCserver,thatis,executedfrequentlyandhighexecutiontime.Thiscanbeachievedby sortingbyNumberofcallsandTotalexecutiontimetogetthosedestinationswhichimposemostload ontheRFCserver. **Targetstab=SM59destinations
2008SAPAG
64
BestPractice:RFCMonitoring
FortransactionstepswithRFC,thekernelwritessubrecordswithadditionalinformationaboutthe processingtime,thedestination,andthefunctionmoduleused.Theparameterstat/rfcrec(default: stat/rfcrec=5)specifiesthemaximumnumberofsubrecordsofeachtype(RFCclient,RFCserver, RFCclientdestination,andRFCserverdestination)thatthekernelwrites.IfmoreRFCsare performedduringatransactionstep,onlythefivecallswiththelongestexecutiontimearetherefore logged,whichissufficientforperformanceanalyses.Therestrictiontoamaximumoffiverecords representsacompromisebetweentherequiredaccuracyononesideandtheworkloadcreatedbythe performancecollectorontheotherside.Alargervalueforstat/rfcreccanleadtoperformance problemsinthecollector.TheRFCclientandRFCserverrecordscontaindatasuchasexecutiontime andcalledfunctionforindividualRFCs.TheRFCdestinationrecordscontainthetotalofallRFCcalls perdestinationandthereforenoadditionalinformationaboutthecalledfunctionmodules.
5.1.2.1ActivatingtheStatisticalCollectors
ItispossiblethatnoRFCstatisticsarestored,asitispossibletoturnthemoffinthesystem.The stepstoreactivatethemonitoringaredifferentfor4.x,NW2004,NW2004sversionsofSAP.Herewe willdescribethedifferentmethodsofactivation.Foreachsystemversionyouneedtoenter transactionST03N>>ExpertMode.
2008SAPAG
65
BestPractice:RFCMonitoring
a) ForSAP4.x:
InST03N,youneedtogointothecollectorbranch>workloadcollector>Collectorandreorg.
2008SAPAG
66
BestPractice:RFCMonitoring
b) ForSAPNW2004:
CalltransactionST03N>>thenCollectorandPerformanceDB
2008SAPAG
67
BestPractice:RFCMonitoring
2008SAPAG
68
BestPractice:RFCMonitoring
c) ForSAPNetWeaver2004s:
CalltransactionST03N>>thenCollectorandPerformanceDB
2008SAPAG
69
BestPractice:RFCMonitoring
2008SAPAG
70
BestPractice:RFCMonitoring
Figur e61 ST03Nmaintenanceofcollector par ameter s(Totalstatisticsaggr egation) Theparameterstat/rfcrec,whichcontrolsthenumberofRFCsubrecordstobegenerated,is configuredusingST03n(Expertmode)>>CollectorandPerformanceDB>>StatisticsRecordsand File>>OnlineParameters>>DialogStepStatistics.(Thisisthesameprocedureforallversionsof SAP)
5.1.2.2SingleStatisticalRecords(STAD)
FordetailsongeneralusageofSTADrefertosection8.2.3ofthisdocument.Fromtheinitial STADselectionscreen,limittheselectiontoretrieverelevantrecordsandpressentertodisplay therelevantstatisticalrecords.Identifyrecordswiththelongestresponsetimeanddoubleclick ontherecordtodisplayfurtherdetails(seefigurebelow):
2008SAPAG
71
BestPractice:RFCMonitoring
Figur e63 SingleStatisticalRecor dsDetails ThefigurebelowshowsastatisticalrecordwithRFC. RFC+CPICtimeisthetimespentonRFC/CPIC handlinganditincludescommunicationtime,processingtimeontargetsystemandtherefore,Roll WaitTime.IfRFC+CPICtimeissignificantlygreaterthanRollwaittime(asitisabovei.e.approx1.5 seconds),thisindicatesaproblemduringthecommunicationbetweenthesystems.Inthiscase,check whetherthereasonisdueto: Aslownetworkconnection Noworkprocessavailableinthereceiversystem IfRFC+CPICtimeisequaltoRollwaittime,thisindicatesthatthecommunicationbetweenthe systemsisfast.IfthisisthecaseandyouhaveidentifiedanRFCcalltobeslow,youmayneedto performfurtherperformanceanalysisoftheRFCfunctionmoduleinthereceiversystem. InorderanalyzeRFCperformancefurther,youcanusetheRFCsubrecordsasshownbelow.Usethe RFCbuttonorscrolldowntogettothisparticularanalysistool.
2008SAPAG
72
BestPractice:RFCMonitoring
Figur e64 STAD RFCsubr ecor ds TheRFCsubrecordsshowthe5mostexpensiveRFCcallstotheparticulardestinationyoushould usethisinformationtocarryoutanindepthanalysisofRFCperformanceandidentifywheretimeis beingspent.SAPNoteNo.552845explainseachofthestatisticsavailableintheRFCsubrecords. DependingonfindingsyoumayneedtoexecuteanRFC,SQLorABAPtracefordetailedanalysisof problem.
2008SAPAG
73
BestPractice:RFCMonitoring
5.1.2.3PerformanceTrace(ST05)
YoucanalsogetInformationonRFCusinganST05trace.TheinformationissimilartoClientand Serversubrecords.FordetailsongeneralusageoftheperformancetraceST05,refertosection8.2.4 ofthisdocument.OntheinitialselectionscreenofST05,choosetheRFCtraceandactivatethetrace accordingly.Afteryouhavecapturedyouranalysisperiod,deactivatethetraceanddisplayit.Itshould looksomethinglikethefigurebelow(thefigurerepresentsanRFCtraceforRFCClient). Whenyougo tothedetailedstatement(doubleclickonRFCentry)ofanRFCentry,theIPaddressesofclientand serverarevisible.Inthiscase,thenamesoftheservercontaintheSAPsystemname:Clientand serverbelowisbothU68.ThenameoftheRFCdestinationisnotshown,therefore,thecorrect destinationwhichisdisplayedinSM59hastobedeterminedbytrialanderrormethod,usingthe informationofservernamesandIPaddresses.Thetransferreddatavolumesforsendingand receivingaregivenbelow.ThedurationisthetotalprocessingtimeoftheRFCforsendinguntil receivingthedata.TheRFCtimeinthedetailedstatementdocumentstheprocessingtimein microsecondsontheclientmachine(normallythecontributionofthisvalueissmall).Thenameofthe functionmoduleisalsodocumented(here:RFC_PING).
BestPractice:RFCMonitoring
2008SAPAG
75
BestPractice:RFCMonitoring
Figur e69 ST05tr acewithactiveSQLandRFCtr aceoptions TheaboveST05traceisshownwithactiveSQLandRFCtraceoptions.TheSQLtraceonserverside showsafulltablescanontableEINA(RED).TheincomingRFC(typeServer)showshowlongthe executionoftheRFCtook.ThetimestampoftheRFCdefinesthestarttimewheretheexecution starts.ThefirstSQLstatementsoccurshortlyafterthistimestamp.Fromthetimestampofthefirst SQLstatementuntilthelaststatementhasfinishedittook1.597msec.Thisisnearlythecomplete processingtimeoftheRFContheserverside.Hence, theperformanceproblemonserversideisan expensivestatementontableEINAduetowrongindex.
ST12canalsobeusedtoperformtheaboveperformancetracespleaseseesection8.2.6regarding usageofST12.
5.1.2.4UsingSM59totestconnectionperformance
InSM59,theRFCconnectioncanbetested.Thistoolisusefultotestiftheconnectionexistsand worksproperly.Forperformancetestsitcanonlybequalitative,asdescribedbelow. Thetestisperformedinseveralsteps:First,onlyaconnectiontotheserversystemisestablished. Thetimeforthelogonprocessisdisplayed.Inthenextsteps,datapackagesofdifferentsizesare sentandreceived.ThesizesofthepackagesareNOT10,20,30Kbytesasstatedintheconnection test.Thedataiscompressedanddatatypeconversioncantakeplace,whichdependsonthe operatingsystemsusedonsenderandreceiverside.Thelogontimedependsonthenumberof authorizationstheRFCuserhasgot.Auserwithlessauthorizationrightscanlogonfasterthanauser withmanyrights.Theprocessingtimeofthelogonprocessdependsontheactualsystemloadon serverside. Sinceseveraltableentriesofuserauthorizationswillbebufferedintablebuffers,theresponsecanbe significantlyslowerthefirsttimethanthefollowingtime.Ifthereisaconnectionproblem,anerror messageisdisplayed.
2008SAPAG
76
BestPractice:RFCMonitoring
2008SAPAG
77
BestPractice:RFCMonitoring
Respon sibility
Escalation Procedure
2008SAPAG
78
BestPractice:RFCMonitoring
2008SAPAG
79
BestPractice:RFCMonitoring
Hourly WPstatus,WP during utilization peak hoursand incaseof performan ce problems orerror messages
Monitorcurrentstateof individualwork processes.Ensurethat enoughworkprocess capacityisavailableat peaktimes. Ifmultiplework processesonsender systemareinStatus Stopped,Reason CPICand Action/Reason CMINIT.This represents communication initializationandshould lastonlyafew milliseconds.Ifahigh numberofthesetypes ofentriesarevisibleit indicatesthatthe receiversystemis overloadedinwhich casetargetsystem resourcesshouldbe checked. Thereferencederror canalsooccurifmultiple userswanttouse functionalityofan externalRFCprogram whichisonlystartedand registeredoncein gateway,thegateway queuesalluserrequest tobeprocessesfirstin firstout.Ifthewaiting timeexceedsthevalue ofgw/reg_timeout parameter(default:60 seconds),thecaller receivesa communicationerror (timeouterrorappearsin errorlogs).Possible overloadshouldbe addressedwithexternal softwareprovider.If possible,external programshouldbe registeredmultipletimes
2008SAPAG
80
BestPractice:RFCMonitoring
Monitoring Monitor Monitor Object TA/Tool Freq. Indicatoror Error MonitoringActivityor ErrorHandling Procedure Responsibility Escalation Procedure
Hourly WPstatus,long SimilartoSM50butfor during runningjobs systemwidestatistics. peak hoursand incaseof performan ce problems orerror messages Numberof aRFCresources currently availablefor asynchronous RFCcalls RuntransactionSARFC andmonitorcurrent stateofindividualwork processes.Ensurethat enoughworkprocess capacityisavailablefor aRFCcommunicationat peaktimes. Ifanapplicationusesa lotoftransactionalor asynchronousRFC,itis possiblethatthiscan overloadthe participatingapplication servers.Itisimportant thatenoughwork processesareavailable forbothDialogusers andforRFC communication. ResourceusagebyRFC canbecontrolledusing variousprofile parameters.SeeSAP Note74141fortuning hintsregardingresource configurationforRFC
SARFC Hourly Slow processing during peak sender/ hoursand receiver incaseof systems performan ce problems orerror messages
RuntransactionSM58 lookoutforstatustext Transactionrecorded. ThisIndicateslackof resourcesinthetarget systemCheckresources inthetargetsystem. RuntransactionSMQS andcheckforstatus Waiting.Ifstatus waitingisfoundit indicatesthatsender systemisexperiencinga workprocessshortage. CheckfurtherinSMQS >>Goto>>QRFC
qRFCnot SMQS HourlyIn Statusshows processed caseof Waiting onsender performan system ce problems orerror messages
2008SAPAG
81
BestPractice:RFCMonitoring
Monitoring Monitor Monitor Object TA/Tool Freq. Indicatoror Error MonitoringActivityor ErrorHandling Procedure Responsibility Escalation Procedure
resources.(seeSAP Note527481). SMQS HourlyIn Slow processing caseof insender performan system ce problems orerror messages Statusofthe destination shows WAITCONN indicateslackof rfcresourcesin sendingsystem assignedtothis rfcdestination Checkthenumberof workprocesses configuredforthis particulardestination usingtransactionSMQS >checkthevalue specifiedincolumn Max.Connforthe destination. Checktheconfigured numberofresources dedicatedtoRFC againstthenumberof availablework processesonsender systembyusing transactionsSARFC. andSM50. Decideifenoughwork processesare configuredfor destination qRFCnot SMQR processed onreceiver system Status WAITINGin SMQR RuntransactionSMQR andcheckforstatus WAITING.Ifstatus WAITINGisfoundit indicatesthatreceiving systemisexperiencinga workprocessshortage. CheckfurtherinSMQR >>Goto>>QRFC resources.(seeSAP Notes527481and 369007forfurther details) Runtransaction SMQ1/SMQ2.Ifentries inaqueuearenot processedandqueue remainsinacertain statusformorethan 30mins.RefertoSAP Note378903 IncasebgRFCunitsdo notgetprocessed, checkstatusofthe bgRFCschedulers SAP Technology Operations Team SAP Technology Operations Team SAP Technology Operations Team SAP Technology Operations Team
qRFCsnot SMQ1/ HourlyIn processed SMQ2 caseof sender/rec performan eiver ce system problems orerror messages
Statusof queues,if entriesina queuearenot processedand queueremains inacertain statusformore than30mins StatusofbgRFC queuesand bgRFC schedulers
bgRFCs SBGR On not FCCO demand processed NF& SBGR FCMO N System SMGW During
Errormessages Review
SAP
SAP 82
2008SAPAG
BestPractice:RFCMonitoring
Monitoring Monitor Monitor Object TA/Tool Freq. Indicatoror Error MonitoringActivityor ErrorHandling Procedure Responsibility Escalation Procedure
parameter &ST11 periodsof sforahigh veryhigh interface ALE/RFC load loadand or performan ce problems
in recommendationsas perSAPNote384971 thegateway traceorother developertraces regarding terminationsi.e. SAPRC=672, R3_LOGIN_FAI LED,Nowp_ca blockreceived, Nofreeblock foundintheWP Communication Area, MAX_CPIC_CLI ENTS, CONN_EXCEE DED,
ST06
Hourly Highpagingrate RuntransactionST06 (dependin andCPU andmonitortheCPU gonthe utilization andmemory business consumption.A process) hardwarebottleneckcan andin haveanegativeimpact caseof ontheoverallresponse performan timeaswellasthe ce responsetimeofan problems individualbusiness transaction. Especiallymonitor hardwareloadduring highRFCtransmission times. HourlyIn Occurrenceof caseof swaps performan ce problems orerror messages Monitormemory resourceusagefor specificR/3application servers Toensureoptimal performancecheckthat theR/3parametersare setcorrectlywith transactionST02. IncorrectlysizedR/3 buffersormemory allocationcanresultin poorperformance.One suchexamplewouldbe whenaworkprocess enterPRIVmode. Ensurethatthedata qualityissufficient,that therearenomissing indexes,andthatthere issufficientspace available.
83
BestPractice:RFCMonitoring
Monitoring Monitor Monitor Object TA/Tool Freq. Indicatoror Error MonitoringActivityor ErrorHandling Procedure Responsibility Escalation Procedure
system
Ingeneraliftablesizes arelargerthan500MB, reorganizethetableand decreaseitssize. SeeSAPNote375566. Monitorthegrowingof tablesandindices, especiallyontRFCand qRFCtables (ARFCSSTATE ARFCSDATA ARFCRSTATE)Since thetRFCandqRFC tablesshrinkand expandconstantly,the storagequalityofthe indexesforthesetables mightbeinadequate. Thishasanegative impactonthe performance.
SAPSystem resources numberoffree workprocesses, dialogsteps perminute CPUutilization Memoryusage DBkeyfigures etc.)
2008SAPAG
84
BestPractice:RFCMonitoring
ForRFCtables,suchas,ARFCSSTATE,ARFCRSTATE,ARFCSDATA,TRFCQOUT,TRFCQDATA, TRFCQSTATEandTRFCQIN,performanceproblemsoftenoccurasaresultofalargenumberof blocksallocatedforthesetables,outdatedstatisticsandpoorstoragequality. Recommendation: Ifyoufindthetablestobelarge/havepoorstoragequalityyoucanimproveperformanceby reorganizingthesetables.Oncethatiscomplete,followtheregularmaintenancestepsbelow: ThefollowingreportsareusedfordeletingentriesfromtheRFCtables: RSARFCDL:DeletestRFCEntriesfromLogFile.Thisreportdeletestheerrorlogof theARFCinthebackground. RSARFC01:tRFCReorganization. RSTRFCES:DeletesARFCSSTATE,ARFCSDATA,TRFCQOUTentries. RSARFCER:DeletestRFCinreferencetothestatus
2008SAPAG
85
BestPractice:RFCMonitoring
x x x o x x x x o x x o x x o x x o x x o
x x X x X
BestPractice:RFCMonitoring
TableGrowth
DB02, DB15
Daily
2008SAPAG
87
BestPractice:RFCMonitoring
2008SAPAG
88
BestPractice:RFCMonitoring
qRFCqueue
2008SAPAG
89
BestPractice:RFCMonitoring
ThefollowingkeyfiguresareavailablewiththeaddonSTA/PI01K: Type* Description Backlog Numberofindividualqueuesingroup Backlog Totalnumberofentriesinallqueuesingroup Backlog Averagenumberofentriesperqueueingroup Backlog Maximumnumberofentriesperqueueingroup Backlog Age(inminutes)ofoldestentryingroup Backlog CombinationofTotalentriesandOldestage Status Numberofentrieswithcriticalstateingroup Status Age(inminutes)ofoldestcriticalstateentryingroup Status CombinationofEntriesandAgeincriticalstate Status Numberofentrieswithinterimstateingroup Status Age(minutes)ofoldestinterimstateentryingroup Status CombinationofEntriesandAgeininterimstate Age AgeofqRFCdatacollection FinddetailedinformationontheabovekeyfiguresandthesetupintheInterface MonitoringSetupGuideon http://service.sap.com/bpm>MediaLibrary >Technical Information >SetupGuideInterfaceMonitoring.
Figur e73 tRFCMonitor ingTreeElementsinSAPCCMS InordertointegratethetRFCMonitorsavailableintheSAPCCMSofthesatellitesystemintotheSAP SolutionManager,youhavetonavigatetotransaction/nDSWPandthentoOperationsSetup> SolutionMonitoring>BusinessProcessMonitoring>SetupBusinessProcessMonitoring. IncaseaninterfaceisselectedformonitoringintheSAPSolutionManagerwiththeinterface techniquetRFC,asubnodeappearsInterface<NameoftheInterface>(tRFC).Underthissubnode anothernodeAlertMonitorsappears.There,clickthebutton:ReloadCCMS:tRFCAlerts.Allthree defaulttRFCmonitoringobjectsonthesatellitesystems(OutboundobjectsonSendersideand InboundobjectsonReceiverside)areloadedintothesession.Totransferalltheautomaticallyloaded thresholdvaluesatonce,selectCopyAll.Itisalsopossibletochangethethresholdvaluesforthe alertsmanually.
2008SAPAG
90
BestPractice:RFCMonitoring
FordetailsonBPMonrefertohttp://service.sap.com/bpmornavigatedirectlytothesetupguide http://service.sap.com/~sapidb/011000358700006137532006E.
2008SAPAG
91
BestPractice:RFCMonitoring
2008SAPAG
92
2008SAPAG
93
BestPractice:RFCMonitoring
SetupprocedureintheSAPSolutionManager
Ifyoualreadyknowthenameoftheprogramand/orfunctionmodulethatneedstobemonitored,you canlogondirectlytoyourSAPSolutionManagerandperformthecustomizingthere.Navigateto transaction/nDSWP>OperationsSetup>SolutionMonitoring>BusinessProcessMonitoringand clickonSetupBusinessProcessMonitoring.Selectthebusinessprocessstepthatyouwanttomap themonitoringkeyfigureto.InordertosetuptheDialogPerformanceMonitoryouneedtoselectthe ApplicationMonitor.
Figur e78 RFCPer for manceMonitor ing HowtoincludeitintoBusinessPr ocessMonitor ing1 Asubnodeisnowcreatedwiththepossibilitytoloadavailableapplicationmonitoringobjectsfromthe involvedsatellitesystemviathebutton<SID>:ReloadAppMonObjects.Afterwards,allavailable monitoringobjectsaredisplayedintableApplicationMonitoringObject.
Figur e79 RFCPer for manceMonitor ing HowtoincludeitintoBusinessPr ocessMonitor ing2 2008SAPAG 94
BestPractice:RFCMonitoring
Figur e80 RFCPer for manceMonitor ing HowtoincludeitintoBusinessPr ocessMonitor ing3 ForDialogPerformanceMonitoringofRFCsonlytheTotalResponseTimecanbeevaluated.
Figur e81 RFCPer for manceMonitor ing HowtoincludeitintoBusinessPr ocessMonitor ing4 InthesecondtabstripDetailInformation,youspecifythedatacollectorperiodincolumnDCPeriod, thatis,howoftenthedatacollectorissupposedtorun.Thisisthetimewindowinwhichthe correspondingstatisticalrecordsaresummarizedandforwhichanaveragevalueiscalculated.The smallestpossiblevalueis5minutes,whichisusuallymostappropriatefortheDialogPerformance Monitor.Thedefaultvalueis60minutes. Ifyouwantthedatacollectortorunonlyonceaday,ataspecifictimeyoucanmaintainthecolumn DCStartTime. Ifthedatacollectorshouldonlyrunandevaluatecertaindaysduringtheweek,youcanflagthe correspondingweekday.Therefore,intheexampleabovenoalertswouldberaisedonSaturdayand Sunday. Onceyousaveyourentries,youcancustomizethedifferentalerttypesindividually. TheprogramnamecanbemaintainedincolumnValue1 andthefunctionmoduleincolumnValue2. Itispossibletomaintaineithercombinationsofprogramnameandfunctionmodule,orjustaprogram nameorfunctionmodule. Inourexample,itistheprogramSAPLIPC_V01withthefunctionmoduleEXTRACT_DATAand thecalltypeRforRFC.
2008SAPAG
95
BestPractice:RFCMonitoring
ForRemoteFunctionCalls,onlythetotalresponsetimecanbemonitoredandonlyserver RFCsareconsidered. Foreachofthealerttypes,youcanspecifythefollowingcombinations: IftheprogramnameismaintainedincolumnValue1andawildcard*ismaintainedforthe functionmodulenameincolumnValue2,thenthedialogperformancefortheselected programwillbemonitoredforallfunctionmoduleswiththespecifiedcollectorperiod. IftheprogramnameismaintainedincolumnValue1andthecolumnValue2isleftblank,all statisticswillbeevaluatedwheretheprogramnamedoesmatchthecustomizedvalueandthe fieldforthefunctionmodulenameisblank.Allfunctionmoduleswhicharenotblankarenot evaluated. TheentriesmadeincolumnValue1andValue2shouldbewrittenincapitalletters.Otherwise,it mighthappenthatthecorrespondingMonitoringObjectcannotbefound. Afterdefiningthemonitoringcustomizing,youhavetogenerateandactivatethemonitoring.Assoon astheprogramsand/orfunctionsthataremeasuredhavebeenexecutedandthedatacollectorhas run,youshouldseealertsifthethresholdvalueshavebeenmet. FordetailsonBPMon,referto http://service.sap.com/bpmornavigatedirectlytothesetupguide http://service.sap.com/~sapidb/011000358700006137522006E.
BestPractice:RFCMonitoring
Figur e84 AutomatedRFCConnectionMonitor ingwithinBusinessPr ocessMonitor ing2 c. ClickonLoadApp.MonitorsfromSIDtoretrievealistofmonitoringobjectsavailableonthe connectedsatellitesystemthatarepartoftheinstalledSTA/PIversion. d. ChoosetheF4HelpincolumnApplicationMonitorandtheentryBORFCCONfromthenextpop upscreen.
Figur e86 AutomatedRFCConnectionMonitor ingwithinBusinessPr ocessMonitor ing4 f. Onthenextlevel,youhavetoselecttheRFCdestinationthatneedstobemonitoredusingtheF4 helpofthecolumnRFCDestination.ChooseaMax.waittime[s],whichisthetimeforwhichthe connectiontestshouldbeperformeduntilanalert(definedincolumnYELLOWorRED?)would beraised.
2008SAPAG
97
BestPractice:RFCMonitoring
Figur e87 AutomatedRFCConnectionMonitor ingwithinBusinessPr ocessMonitor ing5 Aftergeneratingandactivatingthemonitoringcustomizing,theRFCconnectionmonitoringis scheduled.FordetailsonBPMon,referto http://service.sap.com/bpmornavigatedirectlytothe setupguidehttp://service.sap.com/~sapidb/011000358700006137532006E.
2008SAPAG
98
BestPractice:RFCMonitoring
9 Generic Part
IntheGenericPartofthisRFCMonitoringBestPractice,youwillfindinformationaboutcommon monitoringactivitiesthatarenotspecifictospecialbusinessprocesssteps.Thefollowingtopicsare covered: PerformanceMonitoring GeneralMonitoringGuidelinesforaSAPSystem Thesesectionsarereferencedinthecorrespondingbusinessprocessstepsofthescenariospecific partsabove.
BestPractice:RFCMonitoring workswith100HzsothattheCPUtimeisreportedasamultipleof10ms).Duetothisrough resolutionoftheCPUtime,itispossiblethataslightlylongerCPUtimeisdisplayedforadialogstep thanfortheresponsetime. TheRollOuttimeisnotpartoftheresponsetime,asitonlyoccursafterthedataistransferredtothe presentationserver. TheRollwaittimeisatimeinwhichaworkprocessiswaitingfortheresponseofanRFC.TheRoll waittimeisprocessedonaclient,whereastheusercontextisintherollarea.Therefore,neither resourceisusedupnordoesthebottleneckoccurhereforhighRollwaittime.HighRollwaittimes occurfrequently.ThismaybecausedbycallsofWindowsorotherexternalapplicationsfromwithin theR/3System.TheapplicationoftheRFCisstartedhere.Theusercontextenterstherollareasand rollwaittimeisprocesseduntiltheapplicationisexited,thatis,theRFCconnectioniscancelled. The transactionstepisonlyexitedatthispoint.TheyalsooccurwhentheR/3Systemcommunicateswith thefrontendcontrols.Whilethedataonthefrontendarebeingprocessed,theR/3contextisrolledout, thusreleasingtheworkprocess.Thiscanoccurseveraltimesduringatransactionstep.Iffrontend OfficeapplicationssuchasMicrosoftWordarestartedandclosedonlyafteralongtime(several minutes),averylongRollwaittimeoccursherealso.Rollwaitisnotpartoftheresponsetimefor transactionstepsoftasktypeRFC.Thereasonforthisisthatnoresourceuseoccursforthe applicationserver.
9.2.1 Procedure
Thefollowingtablegivesyouanoverviewofwhichtransactionyoucanuseforwhatpurposefor performancemonitoringandafirstanalysisofperformanceproblems. Transaction Workload monitor Workload/ statistical records Trans.Code ST03N Usefor Generalperformanceoverviewfor thedifferenttasktypesand analysisofsystemworkload Detailedperformancemonitoringof ashorttimeframe,asingleuseror aspecifictransactionorprogram SQLtraceofaspecificstep,short sequenceofstepsorpartofalong runningjob Gettinganoverviewoftheduration andperformanceofthesource code,fromindividualstatements uptocompletetransactions Getanoverviewonthetime distribution(DB,CPU,which FunctionModuleorSQLstatement etc.) Usewhen? Daily(e.g.3times)andupon performanceproblems Uponperformanceproblems
STAD
SE30
ST12
Uponperformanceproblems withhighDBorCPUtimes
Keyperformanceindicators
Performancemonitoringismostusefulifyouhavepreviouslydefinedkeyperformanceindicators. Generallyspeaking,KeyPerformanceIndicatorsarequantifiablemeasurements,agreedto beforehand,thatreflectthecriticalsuccessfactorsofanorganization.Inthiscase,werefertothe systemresponsetimeforsingledialogstepsofyourcorebusinessprocess(es),fortransactionsor backgroundjobs.Thekeyperformanceindicatorsshouldbeagreedonbythebusinessdepartments andthesystemsadministrators(happymediumbetweenisneededforbusinessreasonsandwhatis achievablefromsystemside).ItisalsoimportanttousetherightgranularityforKPIs.Thereisno needtodefineaKPIfortheresponsetimeofeachandeverystepintheprocess,butitimportantthat theyarenotdefinedtoogenerally(forexample,lessthan2secforeachdialogstep)asthismightbe tootightortoowideforspecificneeds.Furthermore,performancemonitoringshouldnotonlyrefer generallytoatasktype,butshouldrathergooneortwostepsfurthertosingletransactionsoreven steps. Forexample:CompanyABCisusingthecallcenterscenarioforinboundcallingandalsousingthe marketingscenariotocreatetargetgroupsviainfosetorBWqueries.Asthecallcenteragentsneed verygoodresponsetimesforbusinesspartnersearches,inordertoansweracallandthequeriesfor largetargetgroupsmaytakeseveralseconds,itisnotrecommendedthatcompanyABCjustmonitors theaverageresponsetimefordialogtransactions.Theyshouldinsteaddothemonitoringon transactionorevenondialogsteplevel. 2008SAPAG 100
BestPractice:RFCMonitoring
Dailymonitoringofsystemperformanceandthecomplianceoftheresponsetimestotheestablished KPIsshouldbedoneusingtheworkloadmonitor(transactionST03N).Thismonitorprovidesan overviewoftheresponsetimesandtheircomponents(CPUtime,DBtime,Waittime,andsoon).In caseofperformanceproblems,youshouldusethisandothertransactionsforadeeperanalysis: Ifasingleuserreportsproblems,usetransactionSTADtofindwhatpartoftheresponsetime isparticularlyhighinhiscase.Compareitwithotheruserstoseeifitisanisolatedproblem. Continuetheanalysisdependingontheresult. Ifasingledialogstep(onestepwithinatransaction)hasabadperformance,usetransaction STADtofindwhatpartoftheresponsetimeisparticularlyhighinthiscase.Continuethe analysisdependingontheresult. Ifyouhaveageneralperformanceproblem,usethesystemmonitorstocheckresource consumption.AlsousethetimeprofileoftransactionST03Ntocheckifperformancehasbeen decreasingovertimeoriftherearepeaks.Usetheuserprofileforacomparisonamong differentusersandusergroups,ifyoufollowausefulnamingconvention. Getaperformancetrace(transactionST05)ifyoufindthattheperformanceproblemsare relatedtohighDBtimes.GetanABAPruntimeanalysis(transactionSE30)ifyoufindthatthe performanceisrelatedtohighCPUorhighprocessingtimes. Ifyoucannotfindthecauseoftheperformanceproblemorneedfurtherassistanceforthe analysis,contactthenextsupportleveloropenanOSSmessageoncomponentXXSER TCC.
9.2.2 TransactionST03N
TransactionST03Nisaverypowerfultransactionwithseveralfuntions.Therefore,wecanonly mentionafewhere,concentratingonwhatcanbeimportantforperformancemonitoring.The workloadmonitorisusedtoanalyzestatisticaldatafromtheSAPkernel.Whenanalyzingthe performanceofasystem,youshouldnormallystartbyanalyzingtheworkloadoverview.Forexample, youcandisplaythetotalsforallinstancesandthencomparetheperformancesofindividualinstances overspecificperiodsoftime.Youcanquicklydeterminethesourceofpossibleperformanceproblems usingthelargenumberofanalysisviewsandthedetermineddata. Youcanusetheworkloadmonitortodisplaythe: NumberofconfiguredinstancesforeachSAPR/3System Numberofusersworkingonthedifferentinstances Distributionofresponsetimes Distributionofworkloadbytransactionsteps,transactions,packages,subapplications,and applications Transactionswiththehighestresponsetimeanddatabasetime Memoryusageforeachtransactionoreachuserperdialogstep WorkloadthroughRFC,listedbytransactions,functionmodulesanddestinations Numberandvolumeofspoolrequests Statisticsaboutresponsetimedistribution,withorwithouttheGUItime Workloadandtransactionsusedlistedbyusers,payrollnumber,andclient Workloadgeneratedbyrequestsfromexternalsystems Forallofthisdatayoucandisplaythedataforaparticularinstance(notonlytheonetowhichyouare loggedon)oroptionallytotaledforallinstances.Dependingonyourusermode,youcanchoosethe timeperiodforwhichyouwanttodisplaythedatabetweenday,weekandmonth(ordeterminethe lengthoftimeyourselfusingtheLastMinutesLoadfunction).Formostanalysisviews,youcan displayalloronlycertaintasktypes. Theworkloadmonitorhasaninterfacethatisdividedintotwoparts.Usethetreestructuresontheleft ofthescreentomakethefollowingsettings: Selecttheusermode Selectthetimeperiodforwhichyouwanttodisplaytheworkload Selectvariousfunctionsandanalysisviews(whichdatayouwanttodisplay). ThesystemthendisplaystheresultontherightofthescreeninastandardizedALVGridControl. Forgeneralperformancemonitoring,youcanusethefollowingoptions: Usermodechooseexpertmode 2008SAPAG 101
Figure88TransactionST03N
9.2.3 TransactionSTAD
IntheSTADrecordseverysteponSAPApplicationServerisrecorded.Therecordsforallinstancesof aSAPsystemaredisplayed.TheBusinessTransactionsAnalysis(transactionSTAD)calculatesthe systemresourceusageofindividualtransactionsforSAPR/3Systemsandprovidesadetailed analysisofatransactionandthedialogsteps.Theselectioncriteriaincludeuser,transaction,program, tasktype,startdate,andstarttime. TheanalyzedtimeperiodcanbelargerthantheintervaldefinedbyReadTime,asthesystem analyzescompletetransactionsasfaraspossible.However,itisnotalwayspossibletoperforma completeanalysisforlongrunningtransactions.Asthebusinesstransactionanalysisistime consuming,youshoulduseasshortanintervalaspossible(around10minutes). Theaimofthismonitoristoanalyzeindetailhowlongtheresponsetimesforparticular stepsina process(ortransaction)andaretheseresponsetimesdistributedamongtheircomponents(DBtime, CPUtime,Waittime,GUItime,etc)havebeen.
2008SAPAG
102
BestPractice:RFCMonitoring Ifyouwanttousethistransactiontoanalyzetheperformanceofthestepsdonebyaparticularuser proceedasfollows: Tellhimtoexecutetherelevantstepsonce,slowlyoneaftertheotherandwritedownthe exacttimeatwhichheexecutedthem. GotoSTADanddisplaythestatisticalrecordsrelatedtothissingleexecution(usetheuser nameandtheappropriatetimeframetodisplaythecorrectrecords). Formattheoutputlist(buttonSel.Fields),includingthefieldsGUItime,CUAreference programandCUAinternalcommand.Thetwolatterfieldscanhelpyoutoidentifythesingle stepsexecuted. Usethetimestampsofthestatisticalrecordsandtheexecutiontimesyouwrotedownto assignSTADrecordstothedialogstepsthatwereperformed. Checkwhichstepsareactuallyhavingabadresponsetimeandwhatpartiscontributingmost toit(DB,CPU,GUI,). Dependingontheresult,proceedwithadeeperanalysisoftheworststepsusing,for example,transactionST05(forlongDBtimes),transactionSE30(forlongCPUtimes)ora networkanalysis(notdescribedinthisdocument)incaseofhighGUItimes. Dependingonwhatyouareanalyzing,itmightbewisetolettheuserexecuteallstepstwice andusethesecondexecutionfortheanalysis.Thiswayyoumakesurethatallbuffers(for, example,programbuffers)arefilled.
Youcanalsousethistransactiontoseeindetailwhatwasgoingoninthesystemduringspecific hourswithbadperformance.Withthisanalysis,youcanseeiftherewhereafewusershaving particularlyhighresponsetimesoriftherewasageneralperformanceproblem. Procedure: GototransactionST03Nandsearchforthehourwiththeworstperformanceorthehighestworkload usingthetimeprofile CalltransactionSTADwiththefollowingselectioncriteria: Showallstatisticrecords,sortedbystarttimeChecked StartdateTodaysdate Readtime1hour Starttimestarttimeofhighworkload(fromST03N) User* Resp.time>=5000ms
2008SAPAG
103
BestPractice:RFCMonitoring
2008SAPAG
104
BestPractice:RFCMonitoring
Tomakethefollowingstepseasier,youmaywanttodownloadthelistwithspreadsheetformat.Make sureyouhavedisplayedallcolumnsyouneedbeforedownloading.Youalsoneedtobeawarethat theSTADrecordsareonlykeptinthesystemforalimitedperiod(normally24or48hours). Gothroughthelistoflonglastingdialogstepsandsearchforthosedialogstepsthatarelastinglong onaverage(thoseappearingseveraltimes).Youmayidentifywhichstepsbelongtogetherby comparingthetransaction,theprogram,theCUAreferenceprogramandtheCUAinternalcommand. Thecommandscanbedifferentinyoursystemdependingoncustomizingsettings,userexits, particularsystemusage,andsoon. Executethetypicalstepsofyourcorebusinessprocessesonce.Executethestepsslowly, oneaftertheotherandwritedowntheexacttimeatwhichyouexecutedthem.Thesteps shouldbeperformedbyakeyuser. GotoSTADanddisplaythestatisticalrecordsrelatedtothissingleexecution(usetheuser nameandtheappropriatetimeframetodisplaythecorrectrecords). Formattheoutputlist(buttonSel.Fields),includingthefieldsGUItime,CUAreference programandCUAinternalcommand. Usethetimestampsofthestatisticalrecordsandtheexecutiontimesyouwrotedownto assigntheCUAinternalcommandsortheCUAreferenceprogramtothedialogstepsthat wereperformed.
Usethisinformationtoidentifywhichdialogstepshaveextremelyhighresponsetimesduring yourpeakloadtime. Usethisinformationtoanalyseindetailwhatisharmingtheperformanceofthecorresponding transactionordialogstep. Alsousetheinformationonthedistributionoftheresponsetime(DBtime, CPUtime,GUItime)giveninthelist,toidentifythecauseoftheproblem.Dependingontheresult, proceedwithadeeperanalysisoftheworststepsusing,forexample,transactionST05(forlongDB times),transactionSE30(forlongCPUtimes)oranetworkanalysis(notdescribedinthisdocument) incaseofhighGUItimes. Additionally,searchforthosetakingparticularlylong(forexample,morethan10seconds).Contactthe responsibleusertofindoutwhathewasdoingatthattime,ifthedidsomeunusualstepsorifhe noticedabadresponsetime.Ifyoucannotidentifythecause,youmayusetheproceduredescribed fortransactionST05foradeeperanalysis.
2008SAPAG
105
BestPractice:RFCMonitoring
9.2.4 TransactionST05
Theperformancetracetoolcontainsarangeoftracefunctionsthatyoucanusetomonitorand analyzetheperformanceofthesystemindatabaseaccesses,locking,andremotecallsofreportsand transactions.Itallowsyoutorecorddatabaseaccess,lockingactivities,andremotecallsofreports andtransactionsinatracefileandtodisplaytheperformancelogasalist.Italsoprovidesextensive supportforanalyzingindividualtracerecords. Tousetheperformancetrace,youneedtheauthorizationtostarttransactionST05andthesystem authorizationsChangetraceswitches(authorizationSTOMforauthorizationobjectS_ADMI_FCD) andAnalyzetraces(authorizationSTOR,alsoforauthorizationobjectS_ADMI_FCD). Theperformancetracecontainsthefollowingtracingoptions: SQLTrace:Thisallowsyoutomonitorthedatabaseaccessofreportsandtransactions. EnqueueTrace:Thisallowsyoutomonitorthelockingsystem. RFCTrace:ThisprovidesinformationaboutRemoteFunctionCalls(RFCs)between instances. TheaimoftheproceduredescribedbelowistofindtheSQLstatementsthatarecausinghigh responsetimesintheSAPsystem.Ifyouidentifiedatransactionoraprocessstepthatistakingto long,youmayusetransactionST05,tofindoutifoneormoreSQLstatementsarecausingthe performanceproblem. Procedure: CalltransactionST05andmakesureyouareonthesameinstanceastheuseryouwanttotrace: ChecktheoptionSQLtrace(alsoEnqueueandRFCtraceifneeded) Activatethetracewithfilter Entertheusernameoftheuserthatwillperformthesteps Confirm Asktheusertoperformtherelevantsteps(andnothingelse) Deactivatethetrace Displaythetrace.Makesuretheusernameiscorrect.Writedownthedisplayedtimestamps (traceperiod)tobeabletofindthesametraceinthesystemlateron.Usetheextendedtrace listtodisplaythetimestampsforeachSQLstatement. Dependingonwhatyouareanalyzing,itmightbewisetolettheuserexecuteallstepstwice andusethesecondexecutionfortheanalysis.Thiswayyoumakesurethatallbuffers(e.g. programbuffers)arefilled.
9.2.5 TransactionSE30
Theruntimeanalysistoolallowsyoutoexaminetheperformanceofany ABAPprograms,suchas reports,subroutines,functionmodulesorclasses.Itsavesitsresultsinperformancedatafiles,which youcandisplayaslists.Youcanusetheseresultstoidentifyruntimeintensivestatements,tocombine tableaccesses,andshowthehierarchyofprogramcalls.Fromtheresultsoftheruntimeanalysis,you canidentify: Excessiveorunnecessaryuseofmodularizationunits CPUintensiveprogramfunctions UserspecificfunctionsthatcouldbereplacedwithABAPstatements Inefficientorredundantdatabaseaccess.
2008SAPAG
106
BestPractice:RFCMonitoring Dependingonthesizeoftheprogram,considerablevolumesofdatacanbegeneratedduringthe runtimeanalysis.Forthisreason,thistoolisdefaultedtoFullaggregation.Thismeansthatonlythe standardhitlistisgeneratedwithallcalls.ThestandardhitlistdoesnotincludeGrouphitlist,Hitlistof databasetables,Classhitlist,Instancehitlist,Methodhitlist,Eventhitlist,Hitlistofinternaltables, CallhierarchyandStatistics.Tocancelthisrestriction,switchoffaggregationbyreplacingthe standardvariantintheinitialscreenwithatemporaryvariant,forexample.Inthisvariant,youcanthen configurethemeasurementrestrictionsaccordingtotheselectedobjectstobemeasured. Theruntimeanalysisconsistsoftwoparts: Recordingperformancedata Analyzingtheperformancedata
Inthefirstpart,thesystemmeasuresthetransaction,program,orprocedure,andwritestheresulttoa performancedatafile.Youcanrestrictthemeasurementtocertainobjects.Youcanalsomeasureup totenexternalprocesses.Inthesecondpart,theperformancedataisanalyzed,andthesystem displaystheresultsinlistform.Formoreinformationonthistransactionanditsuse,seethe applicationhelp. TheruntimeanalysistoolmeasurestheCPUtimerequiredbythemeasurablecomponentsofa transaction,aprogram,oraprocedure.Theinformationisstoredinaperformancedatafile,whichyou cananalyzeeitherimmediatelyoratalaterdate.TheCPUtimerequiredtomeasuretheruntimeis subtractedfromthetotalCPUusage.Ifyoumeasuretheruntimeofaprogrammorethanonce,you areunlikelytogetthesameresultoneachoccasion.Therearevariousreasonswhyitisdifficultto obtainidenticalruntimes.Forexample,inthefirstmeasurement,thesystemmightreaddatarecords fromthetablebufferontheapplicationserver,butinasecondrun,itmayhavetoreadthemdirectly fromthedatabase.Runtimesalsodependontheoverallsystemornetworkload(forexample,the numberofjobsorsystemscurrentlyactiveinyourSAPSystem). Incaseyoucannotfindthecauseoftheperformanceproblemorneedfurtherassistanceforthe analysis,contactthenextsupportleveloropenanSAPmessageoncomponentSVBO.Attachthe runtimeanalyses,adetaileddescriptionoftheperformedstepsandtherelatedSTADrecordstothe message. FormoreinformationonautomatedperformancemonitoringviaCCMSandSAPSolution Manager,alsoreadthechapter2.1ofthedocumentApplicationMonitoringwithSAPSolution Manager.
9.2.6 TransactionST12
TheSingleTransactionAnalysistoolallowsyoutoexaminetheperformanceoftransactionor ABAP programs,suchasreports,subroutines,functionmodulesorclassesaswellonthecodingsidetracing the ABAP codeasonthedatabaseside(SQLtrace/performancetrace).Itsavesitsresultsin performancedatafiles,whichyoucandisplayaslists. Youcanusetheseresultstoidentifyruntimeintensivestatements,tocombinetableaccesses,and showthehierarchyofprogramcalls.Fromtheresultsoftheruntimeanalysis,youcanidentify: Excessiveorunnecessaryuseofmodularizationunits CPUintensiveprogramfunctions UserspecificfunctionsthatcouldbereplacedwithABAPstatements Inefficientorredundantdatabaseaccess.
2008SAPAG
107
BestPractice:RFCMonitoring NotethattheST12ABAPtracetransactionisnotofficiallydocumentedandisonlyreleasedforuseby SAPorcertifiedServiceconsultantsduringSAPServiceSessions(forexampleSAPGoingLiveCheck orSolutionManagementOptimizationServices).ST12isonlyavailableintwolanguages(EN/DE). STA/PIissmallanddoesnotinterferewithproductivecoding.Itcanbeimplementedanytimeand thereisnonecessitytologoffusers. FordetailsabouttheuseoftransactionST12seenote755977. Dependingonthesizeoftheprogram,considerablevolumesofdatacanbegeneratedduringthe runtimeanalysis.Forthisreason,thistoolisdefaultedtoaggregationpercallingposition.This reducesthevolumeofrecordsforalooptothenumberoccurrencesinthecodingofaloopinstead ofseparaterecordsforeachloopcycle.Note755977givesyoumoredetails. Theruntimeanalysisconsistsoftwoparts: Recordingperformancedata Analyzingtheperformancedata
Inthefirstpart,thesystemmeasuresthetransaction,program,orprocedure,andwritestheresulttoa performancedatafile.Youcanrestrictthemeasurementtocertainobjects.Youcanalsomeasureup totenexternalprocesses. Inthesecondpart,theperformancedataisanalyzed,andthesystem displaystheresultsinlistform.Formoreinformationonthistransactionanditsuse,seethe applicationhelp. TheruntimeanalysistoolmeasurestheCPUtimerequiredbythemeasurablecomponentsofa transaction,aprogram,oraprocedure.Theinformationisstoredinaperformancedatafile,whichyou cananalyzeeitherimmediatelyoratalaterdate.TheCPUtimerequiredtomeasuretheruntimeis subtractedfromthetotalCPUusage.Ifyoumeasuretheruntimeofaprogrammorethanonce,you areunlikelytogetthesameresultoneachoccasion.Therearevariousreasonswhyitisdifficultto obtainidenticalruntimes.Forexample,inthefirstmeasurement,thesystemmightreaddatarecords fromthetablebufferontheapplicationserver,butinasecondrun,itmayhavetoreadthemdirectly fromthedatabase.Runtimesalsodependontheoverallsystemornetworkload(forexample,the numberofjobsorsystemscurrentlyactiveinyourSAPSystem). Ifyoucannotfindthecauseoftheperformanceproblemorneedfurtherassistancefortheanalysis, contactthenextsupportleveloropenanSAPmessageoncomponentSVBO.Attachtheruntime analyses,adetaileddescriptionoftheperformedstepsandtherelatedSTADrecordstothemessage. FormoreinformationonautomatedperformancemonitoringviaCCMSandSAPSolution Manager,alsoreadthechapter2.1ofthedocumentApplicationMonitoringwithSAPSolution Manager.
2008SAPAG
108
BestPractice:RFCMonitoring
Monitoring Monitor Monitor Monitor Indicatoror MonitoringActivityor Object TA/Tool Freq. Time Error ErrorHandlingProcedure R/3System ST03N workload analysis daily tbd Average dialog response time <1000ms
Responsibility
Reviewresponsetimesin Software comparisontosystemloadand monitoringteam performanceinfluencingchanges withinthesystemoftheanalyzed period. Identifyandimproveperfor manceofanytransactionwhose responsetimeexceedsthetimes definedintheServiceLevel Agreement(SLA),ifexisting. MonitorRFCresponsetime statisticsandDialogresponse timesforonlinetransactions.
ST04
Weekly tbd andin caseof perform ance problem s Hourly tbd (depend ingon the busines s process )andin caseof perform ance problem s Weekly tbd andin caseof perform ance problem s
Increased database response time/ Expensive SQL statements Highpaging rateand CPU utilization
Monitordatabasestatistics. Software Monitorthebuffercachehitratio monitoringteam Checkformissingindices ensurethatthedataqualityis sufficient,andthatthereis sufficientspaceavailable. MonitortheCPUandmemory Software consumption. monitoringteam Ahardwarebottleneckcanhave anegativeimpactontheoverall responsetimeaswellasthe responsetimeofanindividual businesstransaction. Especiallymonitorhardwareload duringhighRFCtransmission times.
ST06
Swaps
Monitormemoryresourceusage Software monitoringteam forspecificR/3application servers Toensureoptimalperformance checkthattheR/3parameters aresetcorrectlywithtransaction ST02. IncorrectlysizedR/3buffersor memoryallocationcanresultin poorperformance.Onesuch examplewouldbewhenawork processenterPRIVmode.
SM50
hourly tbd during peak hours andin caseof perform ance problem sor error messag es hourly during tbd
WPstatus, WP utilization
System widework
SM66
Software monitoringteam
2008SAPAG
109
BestPractice:RFCMonitoring
Monitoring Monitor Monitor Monitor Indicatoror MonitoringActivityor Object TA/Tool Freq. Time Error ErrorHandlingProcedure jobs process peak overview hours Database perform ance monitor DB02 Daily tbd andin caseof perform ance problem s Tablespace sizes,table indicesfor tRFCand aRFC Responsibility
Ensurethatthedataqualityis Software monitoringteam sufficient,thatthereareno missingindexes,andthatthereis sufficientspaceavailable. Ingeneraliftablesizesarelarger than500MB,reorganizethetable anddecreaseitssize. SeeSAPNote375566. Monitorthegrowingoftablesand indices,especiallyontRFCand qRFCtables(ARFCSSTATE ARFCSDATA ARFCRSTATE) Checkshortdumps,analyze Software abortedprograms. monitoringteam Selectaperiodandclickonthe Listbutton.Selectanerror,and thenchooseDisplaytoseethe shortdump. ForSAPdevelopedprograms thatexperiencefrequent terminations,investigateSAPNet forapossibleresolutionandif necessaryopenacustomer message.Forcustomer developedprogramscontactthe appropriatememberofthe developmentteam. Checkforgeneralsystem programerrorsandtablespace errorsortransactionsthat encountererrors. Maintaindate/timeandselect Rereadsystemlog.Position cursoronatime,andthen chooseDisplay. Software monitoringteam
tbd
Dumps
Systemlog
SM21
tbd
Entries
Update tasks
SM13
tbd
Status
Checkforentriesthathave Software statusERR. monitoringteam Updaterecordsshouldbe monitoredregularlyandthe appropriateusershouldbe contactedimmediatelytoresolve anyoutstandingupdates. Togetherwiththeuser, determinewhethertheupdate requestcanberestartedorhas tobedeleted. Determinetheperformanceof singlestatisticalrecords Software monitoringteam
Status
2008SAPAG
110
10 Further Information
Troubleshooting
IfexecutingthisBestPracticedidnotproducethedesiredresults, SearchforrelatednotesinSAPNet. OpenanSAPCustomerMessagedescribingyourproblem(pleaseseetherespectivecomponent insectionErrorHandling,RestartabilityandEscalationofeverystep).
Literature
FordetailedinformationonhowtoadministeranSAPR/3system,seethebook: LianeWill,SAPR/3SystemAdministration,2003 Forinformationonhowtomonitorandtunethegeneralsystemperformance,seethebook: ThomasSchneider,SAPPerformanceOptimizationGuide,2006.
BestPractice:RFCMonitoring Copyright2007SAPAG.Allrightsreserved.
Nopartofthispublicationmaybereproducedortransmittedinanyformorforanypurposewithouttheexpress permissionofSAPAG.Theinformationcontainedhereinmaybechangedwithoutpriornotice. SomesoftwareproductsmarketedbySAPAGanditsdistributorscontainproprietarysoftwarecomponentsof othersoftwarevendors. Microsoft,Windows,Excel,Outlook,andPowerPointareregisteredtrademarksofMicrosoftCorporation. IBM,DB2,DB2UniversalDatabase,OS/2,ParallelSysplex,MVS/ESA,AIX,S/390,AS/400,OS/390,OS/400, iSeries,pSeries,xSeries,zSeries,Systemi,Systemi5,Systemp,Systemp5,Systemx,Systemz,Systemz9, z/OS,AFP,IntelligentMiner,WebSphere,Netfinity,Tivoli,Informix,i5/OS,POWER,POWER5,POWER5+, OpenPowerandPowerPCaretrademarksorregisteredtrademarksofIBMCorporation. Adobe,theAdobelogo,Acrobat,PostScript,andReaderareeithertrademarksorregisteredtrademarksofAdobe SystemsIncorporatedintheUnitedStatesand/orothercountries. OracleisaregisteredtrademarkofOracleCorporation. UNIX,X/Open,OSF/1,andMotifareregisteredtrademarksoftheOpenGroup. Citrix,ICA,ProgramNeighborhood,MetaFrame,WinFrame,VideoFrame,andMultiWinaretrademarksor registeredtrademarksofCitrixSystems,Inc. HTML,XML,XHTMLandW3CaretrademarksorregisteredtrademarksofW3C,WorldWideWebConsortium, MassachusettsInstituteofTechnology. JavaisaregisteredtrademarkofSunMicrosystems,Inc. JavaScriptisaregisteredtrademarkofSunMicrosystems,Inc.,usedunderlicensefortechnologyinventedand implementedbyNetscape. MaxDBisatrademarkofMySQLAB,Sweden. SAP,R/3,mySAP,mySAP.com,xApps,xApp,SAPNetWeaver,andotherSAPproductsandservicesmentioned hereinaswellastheirrespectivelogosaretrademarksorregisteredtrademarksofSAPAGinGermanyandin severalothercountriesallovertheworld.Allotherproductandservicenamesmentionedarethetrademarksof theirrespectivecompanies.Datacontainedinthisdocumentservesinformationalpurposesonly.Nationalproduct specificationsmayvary.
TheinformationinthisdocumentisproprietarytoSAP.Nopartofthisdocumentmaybereproduced,copied,or transmittedinanyformorforanypurposewithouttheexpresspriorwrittenpermissionofSAPAG. Thisdocumentisapreliminaryversionandnotsubjecttoyourlicenseagreementoranyotheragreementwith SAP.Thisdocumentcontainsonlyintendedstrategies,developments,andfunctionalitiesoftheSAPproduct andisnotintendedtobebindinguponSAPtoanyparticularcourseofbusiness,productstrategy,and/or development.PleasenotethatthisdocumentissubjecttochangeandmaybechangedbySAPatanytime withoutnotice. SAPassumesnoresponsibilityforerrorsoromissionsinthisdocument.SAPdoesnotwarranttheaccuracyor completenessoftheinformation,text,graphics,links,orotheritemscontainedwithinthismaterial.Thisdocument isprovidedwithoutawarrantyofanykind,eitherexpressorimplied,includingbutnotlimitedtotheimplied warrantiesofmerchantability,fitnessforaparticularpurpose,ornoninfringement. SAPshallhavenoliabilityfordamagesofanykindincludingwithoutlimitationdirect,special,indirect,or consequentialdamagesthatmayresultfromtheuseofthesematerials.Thislimitationshallnotapplyincasesof intentorgrossnegligence. Thestatutoryliabilityforpersonalinjuryanddefectiveproductsisnotaffected.SAPhasnocontroloverthe informationthatyoumayaccessthroughtheuseofhotlinkscontainedinthesematerialsanddoesnotendorse youruseofthirdpartyWebpagesnorprovideanywarrantywhatsoeverrelatingtothirdpartyWebpages.
2008SAPAG
112