Home > Articles > Web Development

This chapter is from the book

How to Execute the XSP Command Manager Commands

Commands are executed via the XSP Command Manager similar to any other command on the Domino server. The XSP Command Manager is running within the HTTP task, so the commands it executes must be fed through the HTTP task, as in this example:

tell http xsp <<xsp command manager command>>

Table 3.1 lists all the XSP Command Manager Commands.

Table 3.1. XSP Command Manager Commands

Command Name

Description

show data directory

Shows the location of the Domino server's data directory.

show program directory

Shows the location of the Domino server's program directory.

show version

Displays the exact version of the XPages runtime that is installed and running on the Domino server.

show settings

Shows all the variables/properties that have been set on the server's bootstrap.properties file. If a bootstrap.properties file does not exist, the XPages runtime provides reasonable recommended defaults.

show modules

Displays the modules loaded in the system. The XPages runtime dynamically loads each Domino database as a web application module.

refresh

Causes the services in the XPages runtime to be refreshed. This is mainly reserved for future use.

heapdump

Performs a live dump of all objects on the Domino server's Java heap. Creates a dump file that must be read by other tools (such as the Eclipse Memory Analyzer); the file is not human readable.

javadump

Performs a Java dump, sometimes referred to as a thread dump or JavaCore dump, of the Domino server's JVM. The information collected during the dump operation is stored in human-readable format.

systemdump

Performs a full system dump, sometimes referred to as a core dump, of the Domino server's JVM. The dump information is platform specific and contains all the memory, process, and thread information for the JVM at the time the dump occurred.

These commands can greatly aid administrators and developers when trying to analyze particular issues. The dump commands are of particular importance because they perform diagnostic dumps on the server’s JVM but do not cause the JVM or the server to stop operation.

show data directory

As the name suggests, this command simply tells the user where the Domino server’s data directory resides on the operating system’s file system. In a Domino server environment, the data directory stores all the databases that are available through the Domino server. The location of this directory is significant because all applications running on the server will reside in this directory or within a subdirectory of this directory.

Sample usage:

tell http xsp show data directory

Figure 3.1 shows the results of running the show data directory command on a Domino server.

Figure 3.1

Figure 3.1. Result of running the show data directory command

show program directory

This command tells the user where the Domino server’s program directory resides on the operating system’s file system. This command can be convenient for developers who are not familiar with a particular setup of an individual server machine. The command enables developers or administrators to quickly identify the file system location of the Domino server’s program directory.

Sample usage:

tell http xsp show program directory

Listing 3.1 shows the result of running the show program directory command in the Domino server console.

Listing 3.1. Result of Running the show program directory Command in the Console

> tell http xsp show program directory

09/20/2011 10:52:33 PM  C:\Program Files\IBM\Lotus\Domino

show version

This command shows the exact version of the XPages runtime that is installed and running on the Domino server. The version number is updated only when upgrading from one release to another of XPages core runtime. Adding or upgrading extensions such as the XPages Extension library does not update the version number. This command typically is used when a developer or administrator needs to confirm which version of the XPages runtime is running on a particular server. New features are added to the XPages runtime with each release. These features can range from new properties on existing controls to entirely new controls. Over time, a developer or administrator must confirm that the version of XPages runtime is at the appropriate release level for the applications running on the server. This command enables the developer or administrator to quickly confirm the XPages runtime version.

Sample usage:

tell http xsp show version

Listing 3.2 shows how to determine the version of the XPages runtime.

Listing 3.2. Result of Running the show version Command in the Console

> tell http xsp show version

09/20/2011 04:34:21 PM  XSP Runtime Version: [DSI8.5.3] 20110629.1645

In the previous example, the version number can be broken down as follows:

  • The DSI prefix is a constant, which does not vary from release to release.
  • 8.5.3 represents the Major.Minor.Maintenance version number. The first digit is updated with each major feature release, the second digit is updated with each minor feature release, and the last digit is updated with each maintenance release.
  • The final number (20110629.1645) represents the time stamp (yyyyMMdd.hhmm) at which the build in question occurred.

show settings

This command makes a request to the XPages runtime to print all the settings in use by the runtime. By default, the XPages runtime is configured with a host of default settings. These settings can be overwritten by adding a bootstrap.properties file to the xsp directory, which resides in the Domino server’s program directory (for example C:\domino\xsp). As a result of being able to override the default settings in the XPages runtime (via bootstrap.properties), it is not guaranteed that the XPages runtime defaults will apply from server to server. This command enables developers and administrators to quickly list all the current settings without needing to manually access various file system locations to determine which properties are being applied.

Sample usage:

tell http xsp show settings

Listing 3.3 shows the XPages runtime default settings being output to the Domino server console.

Listing 3.3. Result of Running the show settings Command in the Console (Default Case)

> tell http xsp show settings

09/16/2011 11:24:26 AM  xsp.commas.not.delimiters.in.cookie=false

09/16/2011 11:24:26 AM  com.ibm.faces.USE_UNENCODED_CONTEXT_PATH=/xsp

09/16/2011 11:24:26 AM  xsp.gc.on.shutdown=false

09/16/2011 11:24:26 AM  xsp.sessionid.name=SessionID

09/16/2011 11:24:26 AM  xsp.default.charset=UTF-8

09/16/2011 11:24:26 AM  xsp.log.severe.stack.trace=false

09/16/2011 11:24:26 AM  xsp.default.post.buffer.size=1024

09/16/2011 11:24:26 AM  xsp.allow.cookie.sessionid=true

09/16/2011 11:24:26 AM  xsp.global.context.path=/xsp

09/16/2011 11:24:26 AM  xsp.send.set.cookie2.header=true

09/16/2011 11:24:26 AM  xsp.max.cookies.per.session=50

09/16/2011 11:24:26 AM  xsp.allow.packagenames=false

09/16/2011 11:24:26 AM  xsp.allow.url.sessionid=true

09/16/2011 11:24:26 AM  xsp.default.chunk.post.buffer.size=8

In some cases, it is necessary to set extra system settings or even overwrite existing settings. Being able to quickly analyze which settings have changed can be invaluable. Listing 3.4 shows a case in which some settings (xsp.sessionid.name) have been overwritten by bootstrap.properties and some new logging settings (log_configuration and logdir) have been added. Chapter 6, “Server-Side Debugging Techniques,” explains these settings

Listing 3.4. Result of Running the show settings Command in the Console

> tell http xsp show settings

09/16/2011 11:01:47 PM  xsp.commas.not.delimiters.in.cookie=false

09/16/2011 11:01:47 PM  com.ibm.faces.USE_UNENCODED_CONTEXT_PATH=/xsp

09/16/2011 11:01:47 PM  xsp.gc.on.shutdown=false

09/16/2011 11:01:47 PM  log_configuration=xsp/log.properties

09/16/2011 11:01:47 PM  xsp.sessionid.name=FOOID

09/16/2011 11:01:47 PM  xsp.default.charset=UTF-8

09/16/2011 11:01:47 PM  xsp.log.severe.stack.trace=false

09/16/2011 11:01:47 PM  xsp.default.post.buffer.size=1024

09/16/2011 11:01:47 PM  xsp.allow.cookie.sessionid=true

09/16/2011 11:01:47 PM  xsp.global.context.path=/xsp

09/16/2011 11:01:47 PM  xsp.send.set.cookie2.header=true

09/16/2011 11:01:47 PM  xsp.max.cookies.per.session=50

09/16/2011 11:01:47 PM  xsp.allow.packagenames=false

09/16/2011 11:01:47 PM  xsp.allow.url.sessionid=true

09/16/2011 11:01:47 PM  logdir=c:/Domino/log         

09/16/2011 11:01:47 PM  xsp.default.chunk.post.buffer.size=8

show modules

Each Domino database (.NSF) that is running within the XPages runtime is loaded by the XPages runtime as an application module. The show modules command shows all the databases (NSF modules) that are currently running within the XPages runtime. This command also shows registered system service modules that the XPages runtime automatically loads. This command is convenient for server administrators who need to know which XPages applications are being served by the XPages runtime at any point in time.

Sample usage:

tell http xsp show modules

Listing 3.5 shows all the active modules running within a Domino server that has sessions open for three XPages applications.

Listing 3.5. Result of Running the show modules Command in the Console

> tell http xsp show modules

09/16/2011 11:47:36 AM  XSP Resources

09/16/2011 11:47:36 AM  Default Http Registry Module

09/16/2011 11:47:36 AM  OSGI WebContainer Bridge Service

09/16/2011 11:47:36 AM  oauthtokenstore.nsf

09/16/2011 11:47:36 AM  lsdemo2011.nsf

09/16/2011 11:47:36 AM  xpagessbt.nsf

In Listing 3.5, six modules are listed. Three of these modules are XPages runtime system modules; the other three modules represent XPages applications that are currently running on the server.

  • xpagessbt.nsf, lsdemo2011.nsf, and oauthtokenstore.nsf are all XPages applications that were running on the server when the command was executed.
  • XSP Resources is a module loaded by the XPages runtime; it is not configurable.
  • Default Http Registry Module is a module loaded by the Domino web container; it is not configurable.
  • OSGI WebContainer Bridge Service is a module loaded by the Domino to OSGi bridge; it is not configurable.

The core runtime modules are not configurable and can be removed or added to in future releases.

refresh

This command was implemented with future extensions of the XSP Command Manager’s HTTP service in mind. As of release 8.5.3 of the Domino server, this command does nothing. It is intended to be used with HTTP services and will enable services to be refreshed as necessary without restarting the HTTP task or the XPages runtime.

Sample usage:

tell http xsp refresh

heapdump

The heapdump command performs a live dump of all objects on the Domino server’s Java heap. The operation creates a dump file that must be read by third-party tools; the file is not human readable. The dump file can be read using tools such as the Eclipse Memory Analyser Tool (www.eclipse.org/mat). Because the dump file is written in the IBM JVM heap dump format, it is necessary to install further add-ons to the Eclipse Memory Analyser Tool to read the heap dump information. You can download the add-on for the Eclipse Memory Analyzer tool from www.ibm.com/developerworks/java/jdk/tools/dtfj.html. The heapdump command causes a dump file to be generated in the server’s program directory, as demonstrated in Figure 3.2.

Figure 3.2

Figure 3.2. Result of running the heapdump command in the console

Sample usage:

tell http xsp heapdump

When configured, the Eclipse Memory Analyzer tool enables the user to read the content of the dump file and provide information on where memory is potentially being leaked and which objects are in use when the dump occurs. Figure 3.3 shows sample output from the Eclipse Memory Analyzer Tool.

Figure 3.3

Figure 3.3. Eclipse Memory Analyzer Tool

javadump

Running the javadump command causes the server’s JVM to create a Java Dump file. Sometimes referred to as a thread dump or a Javacore dump, the dump information is written to disk in a human-readable format—the contents of the dump file can be opened with applications such as Microsoft Notepad. The information stored as a result of a javadump is generally diagnostic information relating to the threads, stacks, locks, and memory that were in use by the JVM when the dump occurred. Javadump files are of particular use where the developer or administrator needs to quickly obtain system information (such as operating system version, JVM version, and loaded threads).

The Javadump file is lightweight by nature and can help to quickly identify which threads are hung in the system.

Sample usage:

tell http xsp javadump

Listing 3.6 shows the console output when the javadump command is executed.

Listing 3.6. Result of Running the javadump Command in the Console

> tell http xsp javadump

10/18/2011 11:40:00 PM  HTTP JVM: JVMDUMP034I User requested

Java dump using 'C:\Program Files\IBM\Lotus\Dominojavacore.20111018.233959.8220.0001.txt' through com.ibm.jvm.Dump.JavaDump

10/18/2011 11:40:01 PM  HTTP JVM: JVMDUMP010I Java dump written to C:Program Files\IBM\Lotus\Domino\javacore.20111018.233959.8220.0001.txt

In Listing 3.6, you can see the result of executing the javadump command. A Javadump file is written to the location specified in the console output. It is beyond the scope of this book to go into the details of reading the contents of dump files. However, in the case of Javadump files, a few tips can easily be bestowed upon the reader to make reading the contents of the Javadump file easier. The dump file can essentially be broken down into different sections:

  • Date and time of the javadump.
  • Operating system signal information (who initiated the javadump and how it was initiated). The signal information tells the reader whether the user initiated the dump or whether the operating system did so due to a program fault. The signal information is operating system specific.
  • Java (JVM) version.
  • Information about threads running when the javadump occurred.
  • Operating system and processor details.
  • Native libraries loaded by the JVM.
  • Full command line, including arguments, that the Domino server used to launch the JVM.
  • JVM monitor information.
  • Current stack for each thread running within the JVM.

For further in-depth information on how to read the contents of the Javadump file, see the following article from IBM support:

www-01.ibm.com/support/docview.wss?uid=swg21181068

Alternatively, you can search for information on how to read a javacore dump file in your favorite Internet search engine.

systemdump

The systemdump command is the most intensive of the three dump commands available through the XSP Command Manager. As a result, the footprint of the resulting systemdump file can be quite large. The systemdump file contains detailed information on the JVM’s threads, memory, and active processes. When a Java application crashes as a result of general protection fault failure or as a result of a major JVM error, a systemdump file is generated by default.

Sample usage:

tell http xsp systemdump

Listing 3.7 shows the console output when the systemdump command is executed.

Listing 3.7. Result of Running the systemdump Command in the Console

09/20/2011 12:36:30 AM  HTTP JVM: JVMDUMP034I User requested
System dump using 'C:\Program Files\IBM\Lotus\Dominocore.20110920.003630.8220.0002.dmp' through com.ibm.jvm.Dump.SystemDump
09/20/2011 12:38:26 AM  HTTP JVM: JVMDUMP010I System dump written to
C:\Program Files\IBM\Lotus\Domino\core.20110920.003630.8220.0002.dmp

The dump file is stored in a platform-specific format and, as a result, must be read by tools specific to the platform on which the dump was created. The IBM Dump Analyzer enables you to read and analyze the contents of a system dump that is performed on the Domino server. For more information on the IBM Dump Analyzer tool, refer to the following websites:

The information generated by a system dump is extremely granular in nature. An XPage developer rarely will need to create a system dump because the information the dump generates details information about every process executing on the system, not just the information pertinent to the JVM. A system dump generally is needed only when the failure is as a result of complex interactions with programs running outside the Domino server.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020