Sun Microsystems, Inc. hasintellectual property rights relating to technology embodied in the product that is describedin this document. Inparticular, and without
limitation, these intellectual property rights may include oneor more U.S. patentsor pending patent applications in the U.S. and in other countries.
U.S. Government Rights – Commercial software. Governmentusers are subject to the Sun Microsystems, Inc. standardlicense agreement and applicable provisions
of the FAR and its supplements.
This distribution may include materials developed by thirdparties.
Parts of the productmay be derived from Berkeley BSD systems, licensedfrom the University of California. UNIX is a registered trademark in the U.S. and other
countries, exclusively licensed through X/Open Company, Ltd.
Sun, Sun Microsystems, the Sun logo, the Solarislogo, the Java Coee Cuplogo, docs.sun.com, JavaServer Pages, JSP, JVM, JDBC, Java HotSpot, Java, and Solaris are
trademarks or registered trademarks of Sun Microsystems, Inc.in the U.S. and other countries. All SPARC trademarks are used underlicense and are trademarksor
registered trademarks of SPARC International,Inc. in the U.S. and other countries. Products bearingSPARC trademarks are based upon an architecture developed
by Sun Microsystems, Inc.Netscape is a trademark orregistered trademark of Netscape Communications Corporation in the United Statesand other countries.
The OPEN LOOK andSun
of Xerox in researching and developing the conceptof visual or graphicaluser interfaces for the computer industry. Sun holds a non-exclusive license from Xeroxto
the Xerox Graphical UserInterface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's writtenlicense
agreements.
Products covered by andinformation contained in thispublication are controlled byU.S. Export Control lawsand may be subject to the export or import laws in
other countries. Nuclear, missile, chemical or biological weapons or nuclear maritime end usesor end users, whetherdirect or indirect, are strictly prohibited. Export
or reexport to countries subject to U.S. embargoor to entities identiedon U.S. export exclusion lists, including, but not limited to, the denied personsand specially
designated nationals lists is strictly prohibited.
DOCUMENTATION IS PROVIDED “AS IS”AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONSAND WARRANTIES, INCLUDINGANY
IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FORA PARTICULARPURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO
THE EXTENT THAT SUCH DISCLAIMERS AREHELD TO BE LEGALLY INVALID.
TM
Graphical User Interface wasdeveloped by Sun Microsystems, Inc.for its users andlicensees. Sun acknowledges the pioneering eorts
Sun Microsystems, Inc. détientles droits de propriété intellectuelle relatifs à la technologie incorporée dans le produitqui est décrit dansce document. En particulier,
et ce sans limitation, ces droits de propriétéintellectuelle peuvent inclure unou plusieurs brevets américains ou des applications de brevet en attente aux Etats-Unis
et dans d'autres pays.
Cette distribution peutcomprendre des composants développés par des tierces personnes.
Certaines composants dece produit peuvent être dérivées du logiciel Berkeley BSD, licenciés par l'Université de Californie. UNIX est une marque déposée aux
Etats-Unis et dans d'autrespays; elle est licenciée exclusivement par X/Open Company, Ltd.
Sun, Sun Microsystems, le logo Sun, le logoSolaris, le logo Java Coee Cup,docs.sun.com, JavaServer Pages, JSP, JVM, JDBC,Java HotSpot, Java et Solaris sontdes
marques de fabrique ou des marques déposées deSun Microsystems, Inc. aux Etats-Uniset dans d'autres pays. Toutes les marques SPARC sont utilisées sous licence
et sont des marques de fabrique ou desmarques déposées de SPARC International,Inc. auxEtats-Unis et dans d'autres pays. Les produits portant les marques SPARC
sont basés sur une architecture développée par SunMicrosystems, Inc. Netscape est unemarque de Netscape Communications Corporation aux Etats-Unis et dans
d'autres pays.
L'interface d'utilisation graphique OPENLOOK et Sun aété développée par Sun Microsystems, Inc. pour ses utilisateurset licenciés. Sun reconnaît les eorts de
pionniers de Xerox pour la recherche et ledéveloppement du concept desinterfaces d'utilisation visuelle ou graphique pour l'industrie de l'informatique. Sun détient
une licence non exclusive de Xerox sur l'interfaced'utilisation graphique Xerox, cettelicence couvrant également les licenciés de Sun qui mettent en place l'interface
d'utilisation graphique OPEN LOOKet qui, en outre,se conforment aux licences écrites de Sun.
Les produits qui font l'objet de cette publication et les informations qu'ilcontient sont régis parla legislation américaine en matière de contrôle des exportations et
peuvent être soumis au droit d'autres pays dansle domaine des exportationset importations. Les utilisationsnales, ou utilisateurs naux, pour des armes nucléaires,
des missiles, des armes chimiques ou biologiques oupour le nucléaire maritime,directement ou indirectement, sont strictement interdites. Les exportations ou
réexportations vers des pays sous embargo des Etats-Unis,ou vers des entités gurant sur les listes d'exclusiond'exportation américaines, y compris,mais de manière
non exclusive, la liste de personnes qui fontobjet d'un ordre dene pas participer, d'une façon directe ou indirecte, aux exportations des produits oudes services qui
sont régis par la legislation américaine en matièrede contrôle des exportationset la liste de ressortissants spéciquement designés, sont rigoureusement interdites.
LA DOCUMENTATION EST FOURNIE "ENL'ETAT" ET TOUTES AUTRESCONDITIONS, DECLARATIONS ET GARANTIESEXPRESSES OU TACITES
SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEEPAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE
IMPLICITE RELATIVE A LA QUALITEMARCHANDE,A L'APTITUDE A UNE UTILISATION PARTICULIEREOU A L'ABSENCE DE CONTREFACON.
Server Farms ......................................................................................................................................... 21
Using nd-pathinfo-forward ............................................................................................................. 82
Using nostat ......................................................................................................................................... 82
Using Busy Functions ......................................................................................................................... 83
Web Server Start Options ...........................................................................................................99
5Sizing and ScalingYour Server ........................................................................................................101
64-Bit Server ....................................................................................................................................... 101
Drive Space ......................................................................................................................................... 102
Study Goals ......................................................................................................................................... 103
Study Conclusion .............................................................................................................................. 104
E-Commerce Web Application Test ....................................................................................... 122
Index ................................................................................................................................................... 127
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •6
Tables
TABLE 1–1Methods of MonitoringPerformance ..................................................................... 22
TABLE 6–21E-Commerce Web ApplicationScalability .......................................................... 125
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •8
Figures
FIGURE 2–1Web Server Connection Handling .......................................................................... 40
9
10
Preface
This guide discusses adjustments you can make that may improve the performance of Sun Java
System Web Server (henceforth known as Web Server). The guide provides tuning, scaling, and
sizing tips and suggestions; possible solutions to common performance problems; and data
from scalability studies. It also addresses miscellaneous conguration and platform-specic
issues.
Who Should UseThis Book
This guide is intended for advanced administrators only. Be sure to read this guide and other
relevant server documentation before making any changes. Be very careful when tuning your
server, and always back up your conguration les before making any changes.
BeforeYou Read This Book
Web Server can be installed as a stand-alone product or as a component of Sun Java
Enterprise System (Java ES), a software infrastructure that supports enterprise applications
distributed across a network or Internet environment. If you are installing Web Server as a
component of Java ES, you should be familiar with the system documentation at
http://docs.sun.com/coll/1286.3.
WebServer Documentation Set
The Web Server documentation set describes how to install and administer the Web Server.
You can access the Web Server documentation at http://docs.sun.com/coll/1653.1. For an
introduction to Web Server , refer to the books in the order in which they are listed in the
following table.
TM
11
Preface
TABLE P–1 Books inthe Web Server Documentation Set
DocumentationTitleContents
Sun Java System Web Server 7.0 Update 1 Documentation
Center
Sun Java System Web Server 7.0 Update 1 Release Notes
Sun Java System Web Server 7.0 Update 1 Installation and
Migration Guide
Sun Java System Web Server 7.0 Update 1 Administrator’s
Guide
Web Server documentation topics organized by tasks and subject
■
Late-breaking informationabout the software and documentation
■
Supported platforms and patch requirements for installing Web
Server
Performing installation and migration tasks:
■
Installing Web Server and its various components,
■
Migrating data from Sun ONE Web Server 6.0 or 6.1 to Sun Java
System Web Server 7.0
Performing the following administration tasks:
■
Using the Administration GUI and command-line interface
■
Conguring serverpreferences
■
Using server instances
■
Monitoring and logging server activity
■
Using certicates and public key cryptography to secure the server
■
Conguring accesscontrol to secure the server
■
Using Java Platform Enterprise Edition (Java EE) security features
■
Deploying applications
■
Managing virtual servers
■
Dening server workload and sizing the system to meet performance
needs
■
Searching the contents and attributes of server documents, and
creating a text search interface
■
Conguring theserver for content compression
■
Conguring theserver for web publishing and content authoring
using WebDAV
Sun Java System Web Server 7.0 Update 1 Developer’s
Guide
Sun Java System Web Server 7.0 Update 1 NSAPI
Developer’s Guide
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •12
Using programming technologies and APIs to dothe following:
■
Extend and modify Sun Java System Web Server
■
Dynamically generatecontent in response to client requests and
modify the content of the server
Creating custom Netscape Server Application Programmer’s Interface
(NSAPI) plug-ins
TABLE P–1 Books inthe Web Server Documentation Set(Continued)
DocumentationTitleContents
Preface
Sun Java System Web Server 7.0 Update 1 Developer’s
Guide to Java Web Applications
Sun Java System Web Server 7.0 Update 1 Administrator’s
Conguration File Reference
Sun Java System Web Server 7.0 Update 1 Performance
Tuning, Sizing, and Scaling Guide
Sun Java System Web Server 7.0 Update 1 Troubleshooting
Guide
Implementing Java Servlets and JavaServer PagesTM(JSPTM) technology in
Sun Java System Web Server
Editing conguration les
Tuning Sun Java System Web Server to optimize performance
Troubleshooting Web Server
Related Books
The URL for all documentation about Sun Java Enterprise System (Java ES) and its components
is
http://docs.sun.com/coll/1286.3.
Default Paths and File Names
The following table describes the default paths and le names that are used in this book.
13
Preface
TABLE P–2 Default Paths andFile Names
PlaceholderDescriptionDefault Value
install-dirRepresents the base installation directory for Web
Server
instance-dirDirectory that contains the instance-specic
subdirectories.
Sun Java Enterprise System (JavaES) installations on the
TM
Solaris
platform:
/opt/SUNWwbsvr7
Java ES installations on the Linux andHP-UX platform:
For stand-alone installations, the default location for
instance on Solaris, Linux, and HP-UX:install-dir
For stand-alone installations, the default location for
instance on Windows:
system-drive:\Program Files\sun\WebServer7
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •14
Typographic Conventions
The following table describes the typographic changes that are used in this book.
TABLE P–3 TypographicConventions
TypefaceMeaningExample
Preface
AaBbCc123The names of commands, les, and
directories, and onscreen computer
output
AaBbCc123What you type, contrasted with onscreen
computer output
AaBbCc123A placeholder to be replaced with a real
name or value
AaBbCc123Book titles,new terms, and terms to be
emphasized (note that some emphasized
items appear bold online)
Edit your .login le.
Use ls -a to list all les.
machine_name% you have mail.
machine_name% su
Password:
The command to remove a le is rm lename.
Read Chapter 6 in the User's Guide.
A cache is a copy that is stored locally.
Do not save the le.
Symbol Conventions
The following table explains symbols that might be used in this book.
TABLE P–4 SymbolConventions
SymbolDescriptionExampleMeaning
[]Contains optionalarguments and
command options.
ls [-l]The -l option is not required.
{|}Contains aset of choices for a
required command option.
${ }Indicates a variable reference.${com.sun.javaRoot}References the value of the com.sun.javaRoot
-Joins simultaneous multiple
keystrokes.
+Joins consecutive multiple
keystrokes.
-d {y|n}The -d option requires that you use either the y
argument or the n argument.
variable.
Control-APress the Control key while you press the A
key.
Ctrl+A+NPress the Control key,release it, and then press
the subsequent keys.
15
Preface
TABLE P–4 SymbolConventions(Continued)
SymbolDescriptionExampleMeaning
→Indicates menu item selection in a
graphical user interface.
File → New → TemplatesFrom the File menu, choose New. Fromthe
Documentation, Support, and Training
The Sun web site provides information about the following additional resources:
■
Documentation (http://www.sun.com/documentation/)
■
Support (http://www.sun.com/support/)
■
Training (http://www.sun.com/training/)
Searching Sun Product Documentation
Besides searching Sun product documentation from the docs.sun.com web site, you can use a
search engine by typing the following syntax in the search eld:
search-term site:docs.sun.com
For example, to search for “Web Server,” type the following:
Web Server site:docs.sun.com
New submenu, choose Templates.
To include other Sun web sites in your search (for example, java.sun.com, www.sun.com, and
developers.sun.com), use “sun.com” in place of “docs.sun.com” in the search eld.
Third-PartyWeb Site References
Third-party URLs are referenced in this document and provide additional, related information.
Note – Sun is notresponsible for the availability of third-party web sitesmentioned in this
document. Sun does not endorse and is not responsible or liable for any content, advertising,
products, or other materials that are available on or through such sites or resources. Sun will not
be responsible or liable for any actual or alleged damage or loss caused or alleged to be caused by
or in connection with use of or reliance on any such content, goods, or services that are available
on or through such sites or resources.
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •16
Sun Welcomes Your Comments
Sun is interested in improving its documentation and welcomes your comments and
suggestions. To share your comments, go to http://docs.sun.com and click Send Comments.
In the online form, provide the full document title and part number. The part number is a
7-digit or 9-digit number that can be found on the book's title page or in the document's URL.
For example, the part number of this book is 819-2635.
Preface
17
18
CHAPTER 1
1
Performance and Monitoring Overview
Sun Java System Web Server (henceforth known as Web Server) is designed to meet the needs
of the most demanding, high-trac sites in the world. It can serve both static and dynamically
generated content. Web Server can also run in SSL mode, enabling the secure transfer of
information.
This guide helps you to dene your server workload and size a system to meet your
performance needs. Your environment is unique, however, so the impacts of the suggestions
provided here also depend on your specic environment. Ultimately you must rely on your own
judgement and observations to select the adjustments that are best for you.
This chapter provides a general discussion of server performance considerations, and more
specic information about monitoring server performance.
This chapter includes the following topics:
■
“Performance Issues” on page 19
■
“Conguration” on page 20
■
“Virtual Servers” on page 20
■
“Server Farms”on page 21
■
“64–Bit Servers” on page 21
■
“SSL Performance” on page 21
■
“Monitoring Server Performance” on page 22
Performance Issues
The rst step toward sizing your server is to determine your requirements. Performance means
dierent things to users than to webmasters. Users want fast response times (typically less than
100 milliseconds), high availability (no “connection refused” messages), and as much interface
control as possible. Webmasters and system administrators, on the other hand, want to see high
connection rates, high data throughput, and uptime approaching 100%. In addition, for virtual
19
Conguration
servers the goal might be to provide a targeted level of performance at dierent price points.
You need to dene what performance means for your particular situation.
Here are some areas to consider:
■
The number of peak concurrent users
■
Security requirements
Encrypting your Web Server’s data streams with SSL makes an enormous dierence to your
site’s credibility for electronic commerce and other security conscious applications, but it
can also seriously impact your CPU load. For more information, see
page 21
■
The size of the document tree
■
Dynamic or static content
The content you serve aects your server’s performance. A Web Server delivering mostly
static HTML can run much faster than a server that must execute CGIs for every query.
Conguration
Certain tuning parameters are set at the conguration level, so that every server instance that is
based on the conguration has the same tuning information. In addition, some monitoring
information is available at the conguration level, so you can monitor the performance of all
instances based on the conguration. However, the bulk of the monitoring information is
available at the individual server instance, or virtual server level. If you are using a single Web
Server instance per conguration (your server is not part of a server farm), the
conguration-level statistics show the information for the single server instance based on that
conguration.
“SSL Performance” on
.
Virtual Servers
Virtual servers add another layer to the performance improvement process. Certain settings are
tunable for the conguration, while others are based on an individual virtual server.
You can also use the quality of service (QoS) features to set resource utilization constraints for
an individual virtual server. For example, you can use QoS features to limit the amount of
bandwidth and the number of connections allowed for a virtual server. You can set these
performance limits, track them, and optionally enforce them.
For more information about using the quality of service features, see Sun Java System WebServer 7.0 Update 1 Administrator’s Guide.
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •20
Server Farms
The clustering features of Web Server allow you to easily deploy to a server farm. Because all
servers in a server farm share identical congurations, tuning is not done on a server-by-server
basis.
64–Bit Servers
The performance for the 64–bit Web Server is not necessarily better than the performance for
the 32–bit Web Server, but the 64–bit server scales better. Because the 32–bit Web Server
process is conned to 4 GB of address space, it can run out of address space attempting to
support simultaneous sessions beyond a certain limit. Even if the host machine has available
memory and CPU resources, the 32–bit Web Server might not be able to take advantage of it
because of the address space limit. The 64–bit Web Server can run more applications and
servlets than the 32-bit server. Also, the 64–bit Web Server can cache several GBs of static
content, while the 32-bit Web Server is conned to 4 GB of address space.
In general, the tuning for the 64–bit Web Server is similar to the tuning for the 32–bit Web
Server. The dierences are mostly tuned at the operating system level. Tuning specics are
discussed in
page 97
SSL Performance
“Tuning UltraSPARC T1–Based Systems for Performance Benchmarking” on
.
SSL Performance
SSL always has a signicant impact on throughput, so for best performance minimize your use
of SSL, or consider using a multi-CPU server to handle it.
For SSL, the Web Server uses the NSS library. However, there are other options available for
SSL:
■
If you are using the Solaris 10 operating system, kernel SSL (KSSL) is available. It does not
contain all the algorithms available, as does NSS, but it often provides better performance.
■
A cryptographic card hardware accelerator for SSL can also improve performance.
■
If you are using the 64–bit Web Server on Solaris, you can use the cryptographic accelerator
of the UltraSPARC T1 processor.
Chapter 1 • Performanceand Monitoring Overview21
Monitoring Server Performance
Monitoring Server Performance
Making the adjustments described in this guide without measuring their eects doesn’t make
sense. If you don’t measure the system’s behavior before and after making a change, you won’t
know whether the change was a good idea, a bad idea, or merely irrelevant. You can monitor the
performance of Web Server in several dierent ways.
TABLE 1–1 Methods of Monitoring Performance
Monitoring MethodHow to EnableHow to AccessAdvantages and Requirements
Statistics through the
Admin Console
Statistics through
individual wadm
commands
XML-formatted statistics
(stats-xml) through a
browser
XML-formatted statistics
(stats-xml) through the
command-line interface
perfdump through a
browser
perfdump through the
command-line interface
Enabled by defaultIn the Admin Console, for a
conguration, click the
Monitor tab
Enabled by defaultThrough wadm commands:
get-config-stats
get-virtual-server-stats
get-webapp-stats
get-servlet-stats
Enable through
Admin Console or
through editing a
conguration le
Enabled by defaultThrough the wadm command
Enable through
Admin Console or
through editing a
conguration le
Enabled by defaultThrough wadm command
Through a URIAdministration Server
get-stats-xml
Through a URIAdministration Server
get-perfdump
Accessible when session
threads are hanging.
Administration Server
must be running.
Accessible when session
threads are hanging.
Administration Server
must be running.
need not be running.
Accessible when session
threads are hanging.
Administration Server
must be running.
need not be running.
Accessible when session
threads are hanging.
Administration Server
must be running.
Java ES MonitoringEnabled by defaultThrough the Java ES
Monitoring Console
Only for Java ES
installations.
Administration Server
must be running.
Monitoring the server does have some impact on computing resources. In general, using
perfdump through the URI is the least costly, followed by using stats-xml through a URI.
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •22
Monitoring Server Performance
Because using the Administration Server takes computing resources, the command-line
interface and the Admin Console are the most costly monitoring methods.
For more information on these monitoring methods, see the following sections:
■
“About Statistics” on page 23
■
“Monitoring Current Activity Using the Admin Console” on page 25
■
“Monitoring Current Activity Using the CLI” on page 26
■
“Monitoring Current Activity Using stats.xml” on page 29
■
“Monitoring Current Activity Using perfdump” on page 31
■
“Monitoring Current Activity Using the Java ES Monitoring Console” on page 37
About Statistics
You can monitor many performance statistics through the Admin Console user interface,
through the command-line interface, through the stats-xml URI, and through perfdump.For
all these monitoring methods, the server uses statistics it collects. Noneof these monitoring
methods will work if statistics are not collected.
The statistics give you information at the conguration level, the server instance level, or the
virtual server level. The statistics are broken up into functional areas.
For the conguration, statistics are available in the following areas:
■
Requests
■
Errors
■
Response Time
For the server instance, statistics are available in the following areas:
■
Requests
■
Errors
■
Response Time
■
General
■
Java Virtual Machine (JVMTM)
■
Connection Queue
■
Keep Alive
■
DNS
■
File Cache
■
Thread Pools
■
Session Replication
■
Session Threads, including Proling data (available if proling is enabled)
Chapter 1 • Performanceand Monitoring Overview23
Monitoring Server Performance
■
For the virtual server, statistics are available in the following areas:
■
■
■
■
■
Some statistics default to zero if Quality of Service (QoS) is not enabled, for example, the count
of open connections, the maximum open connections, the rate of bytes transmitted, and the
maximum byte transmission rate.
Enabling Statistics
Statistics are activated by default on Web Server. However, if you have disabled them, you need
to enable them again to monitor your server for performance. To enable statistics, use Admin
Console or the wadm command-line utility (CLI).
Java DataBase Connectivity (JDBCTM) (available if a JDBC resource is created and the
connection pool is accessed)
General
Response
Web Applications
Proling Data (available if proling is enabled)
Servlet and Servlet Response Cache (available if the Servlet cache is enabled in
sun.web.xml)
Note – Collecting statistics causesa slight hit to performance.
▼
To Enable Statistics from the Admin Console
From the AdminConsole Common Tasks page, select the conguration.
1
2
Click Edit Conguration.
3
Click the General tab.
4
Click the Monitoring Settings sub tab.
5
On the Monitoring Settings page,under GeneralSettings, select the Statistics Enabled
checkbox.
6
Congure the interval and proling.
■
The Interval is the period in seconds between statistics updates. A higher setting (less
frequent) improves performance. The minimum value is .001 seconds; the default value is 5
seconds.
■
Proling is activated by default. Deactivating it results in slightly less monitoring overhead.
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •24
Monitoring Server Performance
Restart theserver.
7
▼
To Enable Statistics from the CLI
Enter the followingCLI commandto enable statistics collection:
To setthe interval and enableproling, use the set-stats-prop interval and profiling
properties. For moreinformation, see the help forset-stats-prop.
3
Restart theserver.
Monitoring Current Activity Using the Admin Console
Frequently-used statistics are available through the Admin Console, viewed as general statistics,
instance statistics, and virtual server statistics.
▼
To Monitor Statistics from the Admin Console
In the Admin Console, from the Common Tasks page, select the Monitoringtab.
1
Select theconguration.
2
The conguration statistics are displayed.
From the drop-down list, select a View interval.
3
The statistics displayed in your browser are automatically updated at this interval.
Select thetype ofstatistics to display.
4
The initial list of statistics types includes General Statistics, Instance Statistics, and Virtual
Server Statistics.
If you choose Instance Statistics, click the name of the instance to monitor. Detailed statistics
are then displayed, including information on processes and session replications.
If you choose Virtual Server Statistics, click the name of the virtual server to monitor. Statistics
for the virtual server are displayed, including response statistics and web application statistics.
This information is not provided through perfdump.
Chapter 1 • Performanceand Monitoring Overview25
Monitoring Server Performance
Monitoring Current Activity Using the CLI
You can also view statistics information using the wadm commands get-config-stats,
get-virtual-server-stats, get-webapp-stats and get-servlet-stats. Note that the
examples below do not contain all possible command options. For the complete syntax, see the
help for the command.
▼
To Monitor Statistics from the CLI
To getstatistics for a conguration deployed on a singlenode, enter:
Using the node option in this syntax restricts the output to a single node. To get the statistics at
the conguration level, use the command without the node option.
The following shows an example of the output for a single node:
Because the node option is not used, this syntax gives the aggregate statistics for the virtual
server across all the nodes where the conguration has been deployed. Using the node option
restricts the output to a single node.
To getstatistics for a deployed web application, enter:
Sun Java System Web Server 7.0Update 1 Performance Tuning,Sizing, and Scaling Guide •28
Monitoring Server Performance
The syntax gets the statistics for a given web application deployed on the given virtual server of
the given instance. To get the aggregated web application statistics for a given conguration
across all the nodes where the conguration has been deployed, use the command without the
node option.
The following example shows the output for the URI hello:
You can also display statistics using stats-xml, which displays statistics in XML format. The
output of stats-xml is in XML so that various tools can easily parse the statistics. You can view
the stats-xml output through a URI, which you have to enable, or you can view the stats-xml
output through the CLI, which is enabled by default.
▼
To Enable the stats-xml URIfrom the Admin Console
If you enable the stats-xml URI, you can access statistics for your server in XML format
through a browser. Note that when you use the stats-xml URI, you can access statistics even
when the Administration Server is not running. Also, with the stats-xml URI activated, users
can see the statistics information for your server, unless you take precautions to deny access.
1
On the CommonTaskspage, select the conguration fromthe pull-down menu on the left.
2
Select thevirtual server from thepull-down menuon the right, then click Edit Virtual Server.
3
On the Server Settings tab, click theMonitoring Settings sub tab.