Professional Documents
Culture Documents
How To Use SUPA Tool For Tomcat Measurements
How To Use SUPA Tool For Tomcat Measurements
Troubleshooting ....................................................................................................................................... 8
Change
Author
06.08.2015
Fabian Schlarmann
You will find an up-to-date version of this document linked on the SUPA Wiki page:
https://go.sap.corp/SUPA (short link)
https://wiki.wdf.sap.corp/wiki/display/NWEngPer/SUPA (direct link)
Introduction
SUPA offers the possibility to measure different SAP technology stacks out of the box, using the built-in configuration
editor. In contrast to that, measuring the performance of an application running on a Tomcat server requires some
manual steps. This document describes in detail, how SUPA can be configured to receive performance counters like
CPU time consumption, Java memory (processing space) and http server response times from a Tomcat server running on a MS Windows host.
Prerequisites
General
The reader shall be familiar with elementary terms and principles of performance measurements. A basic understanding how SUPA works is assumed. Further documentation is available below https://wdf.sap.corp/SUPA.
Only for remote systems: SSH and operating system user for host on which Tomcat runs
Tomcat can either run on the same host as SUPA or on a remote host. If Tomcat and SUPA are operated in the same
host, you can skip this paragraph, as the folloing only applies if Tomcat is operated on a remote host.
During the measurement, SUPA has to grab performance data from the remote host on which Tomcat runs. To do so,
SUPA connects via SSH to the remote system. Hence, the following two preconditions are required:
The remote host must be reachable via SSH, or in other words, an SSH client has to be installed and started
on the remote host
An operating system user on the remote host must be available to enable SUPA establishing an SSH connection to the remote host
Create folder c:\tmp as destination for the garbage collection log file
In order that the Java VM can write garbage collection related information to the gclog.txt file, make sure that the
path c:\tmp (or whatever else is defined in the environment variables) exists. If the folder does not exist, just create
it.
The commands set the JMX port to 54321, you could change that to any other available port on your system. Just
make sure to adjust this setting in the SUPA configuration later. The same is true for the path of the gclog.txt file,
where all garbage collection related activated is logged into.
Start Tomcat from within the opened command prompt, e.g. via startup.bat.
Start SUPA as a javaw process (only required if Tomcat runs on same host like SUPA)
This paragraph describes how to modify the start command of SUPA for a measurement of a Tomcat server running
on the same host like SUPA does. If Tomcat is operated on a different (remote) host, this paragraph can be skipped.
1. Make a copy of the file supa.bat and name it supa_javaw.bat
2. To edit supa_javaw.bat, open it in a text editor
\bin\java
with
\bin\javaw
%HOME%\sapjvm8\bin\java %COMMON_ARGS% -jar supaStarter.jar %*
3. Replace
in
line
com.sap.nw.performance.supa.gui.base.config.landscape.model.components.Gen
ericProcess
branch.0.component.id = tomcat_local
branch.0.component.name = tomcat_local
branch.0.cputime.hostname = localhost
branch.0.cputime.process = java
branch.0.cputime.os = Windows
branch.0.cputime.ssh.user =
branch.0.cputime.ssh.password =
data.provider =
com.sap.nw.performance.supa.core.manager.BranchManager,com.sap.nw.performa
nce.supa.core.dataprovider.ScreenshotDataProvider
scenario.name = tomcat performance
Save the configuration keys into a text file named tomcat_localhost.properties.
Replace the placeholder <remote host name> with the actual remote host name. The other yellow
marked keys can be changed later within SUPA. Save the configuration keys into a text file named
tomcat_windows_remote.properties.
c. Tomcat runs on a Linux host, SUPA on a Windows host
In general works like for Windows, but the environment variables for Tomcat (see Start Tomcat with
JMX support and GC logging enabled) have to be set differently. Additionally, select Linux instead of
Windows in step 6.
2. Start SUPA via supa_javaw.bat (SUPA and Tomcat run on same host) or via supa.bat (SUPA and Tomcat run on
different hosts)
3. Start a manual measurement
4. Load the configuration file created in step 1. into SUPA. For tomcat.localhost.properties, the configuration
could now be finished or adjusted. For the remote cases, the obligatory adjustments are described in the next
steps
5. (Optional)
Adjust
the
scenario
name,
and
if
applicable,
add
scenario
step(s)
6. Navigate to the next screen and open the Tomcat configuration (only applicable for remote cases). Replace
the placeholder for OS user and OS Password by providing an operating system user and password to connect
to
the
remote
system.
Confirm
with
Ok.
9. Confirm with finish and save the configuration below the same name as the original one, e.g.
tomcat_localhost.properties
Perform a measurement
Start and stop measurements with the corresponding buttons as usual. Remember, that the whole Tomcat server is
measured, rather than single user interactions. Therefore, keep measurements intervals as short as possible (i.e. do
not wait 10 seconds after a user interaction was finished).
Performance
quirement
Standard
Re- Description
AS Java processing space is the heap difference between stop and start of measurement plus the amount of freed memory
by GC while the measurement was running.
Process(es) Cpu Time is the sum of differences in CPU Time for all specified processes between stop and start of a meas-
Troubleshooting
If you face the issue that SUPA cannot to the gclog.txt file, try to access the share manually in Windows Explorer. If
you are asked for a user/password, provide it in the upcoming credentials dialog. Then, retry to measure with SUPA.