sap sourcing/clm webcast series -...
TRANSCRIPT
SAP Sourcing/CLM Center of Excellence
Jan 30, 2014
SAP Sourcing/CLM Webcast Series
Debug Logging
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 2
SAP Sourcing / CLM 2014 Webcast Series
Goal
• Spread the knowledge about SAP Sourcing
• Build and leverage the SAP Sourcing community
Audience
• SAP Consulting and Field Services
• Partner Consulting
• SAP Sourcing Customers
Upcoming Webcasts
• Optimizer and Award Scenarios in SAP Sourcing
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 3
SAP Sourcing/CLM Upcoming Trainings
Functional Training
• When: Feb, 17 – 21 2014
• Where: Cambridge, MA
• Who: Armin Fakouhi
How to sign up ?
• www.training.sap.com
• Search for TSO100/150/180
• Contact: [email protected]
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 4
Background
• There are many log files available to view or send to
support to help diagnose system issues.
• There are several common mistakes made when trying to
provide the logs needed
• This discussion will try to clear up some of the confusion.
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 5
Agenda
8 Questions about SAP Sourcing/Netweaver logs
Which logs and where are they?
How many logs should we send to support?
To Debug or not to Debug?
What if we suspect the problem is NOT with Sourcing/CLM?
SQL Trace when & why?
I ran into a problem during installation, configuration, deployment. What logs are available for this?
What’s the difference between .log and .trc?
What if I want to debug this myself?
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 6
Question 1:
Which logs and where are they?
>> REF: NOTE 1706617 - eSourcing logs in Netweaver
• Sourcing/CLM:
\usr\sap\<SID>\J<NN>\j2ee\cluster\server<N>\log\applicati
ons\e-sourcing (eso*.trc and eso*.log files)
• Debug information when enabled ends up in the *.trc files.
• Note the sequential numbering scheme in the log files can
be misleading since they are reused and wrap around
based on the settings. Hint: USE THE DATE/TIMESTAMP
• Netweaver:
\usr\sap\<SID>\J<NN>\j2ee\cluster\server0\log\defaultTrac
e_*.trc and applications_nn.n
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 7
Question 2:
What’s the difference between
.log and .trc?
• .trc:
Debug information when enabled ends up in the *.trc
files. Does not contain memory / user stats.
• .log:
Contains the stats_monitor statistics this shows users
per node and memory consumption in the node.
• Errors/exceptions etc show up in both files.
• Example content from stats_monitor entries:
stats_monitor runtime status: free/total = 156227/553024 kb, max = 932096 kb,
hitrate = 0.0 pgs/sec, active = 0 pgs, users = 0, ct = 0
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 8
Question 3:
Debug or not to Debug?
• Normal operation: Debug off
• Minimal logging info but most efficient for activity
• OK for performance monitoring / users memory etc.
• When Support requests Debug logging: Enable Debug as
described in the following slide.
• Make sure SQL not set to DEBUG unless
specified/requested.
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 9
Debug Logging setup in Netweaver NWA
Setting up debug logging
In the log configuration area of NWA, select Tracing Locations in the Show field.
Select Debug on the area or areas you want to set Debug logging on. Typically we select The E-
Sourcing or eso folder, Set Debug then use the Copy to Subtree button. Set the sql severity back
to error. At this point you would see the selections shown above.
Click save configuration.
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 10
Question 4:
SQL Trace when & why?
• SQL Trace is typically used to debug suspected query or
database issues. Due to the nature of the application,
there are continuous SQL requests to the database. When
Debug is enabled for SQL, the logs get very big very fast.
The application can be become noticeably slower and the
resulting log files become cumbersome to read.
• This is a case of “less is more”.
• Only enable SQL debug trace if advised to.
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 11
Question 5:
How many logs should we send
to support?
• This is another case of “less is more”. We typically don’t
need 10 or 20 logs from each application instance.
• Best case is to send the 1-3 logs that span the timeframe
the error/problem occurs.
• Keep in mind we will need logs from each application
instance (in systems that are configured with more than 1
instance).
• Each .log / .trc can be up 10MB. We suggest using rar or
zip to package the logs. For example 3 10MB .log files
compress to about 1.28MB when “zipped”
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 12
Example Netweaver configuration
\usr\sap\G73\J00\j2ee\cluster\server0\log\applications\e-sourcing\eso*
\usr\sap\G73\J00\j2ee\cluster\server1\log\applications\e-sourcing\eso*
\usr\sap\G73\J00\j2ee\cluster\server2\log\applications\e-sourcing\eso*
In this system we have one java server with three server processes(nodes). As such there are
three application instances on three server nodes. There are three sets of log and trace files
generated. [this is just one configuration there are other possibilities to consider]
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 13
Question 6:
What if we suspect the problem
is NOT with Sourcing/CLM?
Overall lack of access: Netweaver Logs
\usr\sap\<SID>\J<NN>\j2ee\cluster\server<N>\log\default
Trace_*.trc and applications_nn.n
Database errors/ lack of DB connectivity: Database Logs
Per DBMS / DBA
Load Balancer / Webdispatcher Logs:
Network team
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 14
Question 7:
I ran into a problem during
installation, configuration,
deployment. What logs are
available for this?
• Installation / Configuration: (<homedir>/logs)
Setup.log – initial software installation
Configure.log – during configure.exe/sh
Install_XXXXXXXX_000NN.log – Initial database population
(install_root) execution and upgrade scripts (upgrade_schema/data)
GenEarFile.log – creation of .ear/SDA/.SCA files
• Deployment: (JSPM) :
(usr/sap/<INS>/<JXX>/j2ee/JSPM/log/log_YYYY_MM_dd_hh_mm_ss)
JSPM.log – mostly for debugging tool related issues.
JSPM_MAIN_X_XX.log -- end to end log of the deployment
Deploy_api.log /.trc – The overall process step by step including
error/success
deployment_results_XX.log – summary results
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 15
Question 8:
What if I want to debug this
myself
• See the latest blogs on using the Netweaver logviewer.
• Allows for powerful filtering of content by date and other keywords
• Combines results across multiple nodes / instances
• Aids in narrowing down issues before sending raw logs to SAP
• Blog 1 –
• http://scn.sap.com/community/sourcing/blog/2013/11/26/debug-logs-and-
logviewer-concepts-part-1
• Blog 2 –
• http://scn.sap.com/community/sourcing/blog/2013/11/27/debug-logs-and-
logviewer-concepts-part-2
• Blog 3 –
• http://scn.sap.com/community/sourcing/blog/2013/12/03/debug-logs-and-
logviewer-concepts-part-3
© 2013 SAP AG or an SAP affiliate company. All rights reserved. 16
New Developments
• Enhanced logging for scripts: available in W7 SP9, W9 SP14 ,Version 10
• Added new debug scope which provides more information about
executed scripts WITHOUT being in debug logging mode.
• Added elapsed time of script execution to ease in detecting
performance issues 10:59:14.00 - INFO - ScriptManager.markLog(SessionContextIfc, String -
sessionid=1b8rhq;username=ghrob;tenantid=#test#;debug_scope=scripting;thread=RequestHandler.
RqThread: fullsave - begin: executeFieldScript for PROJECTXREF on PROCAT-001-BGNXM-
2013 10:59:14.00 - DEBUG - ScriptEnvironment.execute -
sessionid=1b8rhq;username=ghrob;tenantid=#test#;thread=RequestHandler.RqThread: fullsave - executing script:
import com.sap.odp.api.common.log.*;
LogMessageIfc lm = Logger.createLogMessage(session);
lm.setLogMessage("*** Project Field Validation Script ***");
Logger.debug(lm);
10:59:14.02 - DEBUG -
sessionid=1b8rhq;username=ghrob;tenantid=#test#;debug_scope=Logger;thread=RequestHandler.RqThread: fullsave - ***
Project Field Validation Script ***
10:59:14.02 - INFO - ScriptManager.markLog(SessionContextIfc, String -
sessionid=1b8rhq;username=ghrob;tenantid=#test#;debug_scope=scripting;thread=RequestHandler.
RqThread: fullsave - end: executeFieldScript for PROJECTXREF on PROCAT-001-BGNXM-2013
[ELAPSED TIME: 16 ms]
• For more information see Rob Graglia’s blog:
http://scn.sap.com/community/sourcing/blog/2013/12/06/enha
nced-script-logging
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Questions ?
© 2013 SAP AG or an SAP affiliate company. All rights reserved.
Thank you
Contact information:
Gary Boutin CISSP
SAP Sourcing/CLM Center of Excellence
© 2014 SAP AG. All rights reserved. 43
No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP AG. The information contained herein may be
changed without prior notice.
Some software products marketed by SAP AG and its distributors contain proprietary
software components of other software vendors.
Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft
Corporation.
IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x,
System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer,
z/VM, z/OS, i5/OS, S/390, OS/390, OS/400, AS/400, S/390 Parallel Enterprise Server,
PowerVM, Power Architecture, POWER6+, POWER6, POWER5+, POWER5, POWER,
OpenPower, PowerPC, BatchPipes, BladeCenter, System Storage, GPFS, HACMP,
RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX,
Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered
trademarks of IBM Corporation.
Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or
registered trademarks of Adobe Systems Incorporated in the United States and/or other
countries.
Oracle and Java are registered trademarks of Oracle and/or its affiliates.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.
Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are
trademarks or registered trademarks of Citrix Systems, Inc.
© 2014 SAP AG. All rights reserved.
HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C®, World
Wide Web Consortium, Massachusetts Institute of Technology.
SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer,
StreamWork, and other SAP products and services mentioned herein as well as their
respective logos are trademarks or registered trademarks of SAP AG in Germany and other
countries.
Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports,
Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and
services mentioned herein as well as their respective logos are trademarks or registered
trademarks of Business Objects Software Ltd. Business Objects is an
SAP company.
Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase
products and services mentioned herein as well as their respective logos are trademarks or
registered trademarks of Sybase, Inc. Sybase is an SAP company.
All other product and service names mentioned are the trademarks of their respective
companies. Data contained in this document serves informational purposes only. National
product specifications may vary.
The information in this document is proprietary to SAP. No part of this document may be
reproduced, copied, or transmitted in any form or for any purpose without the express prior
written permission of SAP AG.