Home > Chapters & Articles > XPages Portable Command Guide: Working with the Domino Server Console and the Notes OSGi Console

XPages Portable Command Guide: Working with the Domino Server Console and the Notes OSGi Console

Chapter Description

This chapter outlines the most relevant commands available to you as an XPages developer via the Domino server console and the Notes OSGi console.

Common Console Commands You Should Know

Beyond the realm of OSGi and the XSP command manager, the Domino server has a rich set of commands. Knowing at least a subset of them will greatly benefit any budding XPages developer or administrator. Table 3.4 lists some of the more commonly used commands.

Table 3.4. Common Domino Server Commands

Command

Description

help

Displays a list of server commands, with a brief description

load [task name]

Loads the named Domino server task

load [task name] -?

Gets help for the specified command

quit

Tells the Domino server to shut down

restart server

Tells the Domino server to shut down completely and restart

tell [task name] quit

Tells the named Domino server task to shut down

show server

Prints all basic statistics relating to the server to the console

show conf [notes.ini variable]

Prints the value of the server's notes.ini variable to the console

set conf [notes.ini variable=value]

Sets the value of the server's notes.ini variable to the specified value

tell adminp [options]

Performs various administrative tasks on the Domino server

load chronos [options]

Updates full-text indexes that are marked to be updated hourly or daily

load updall [path] [options]

Updates the view indexes and the full-text index for the specified database (or for all databases, if one is not provided)

load design [source] [target] [options]

Updates all databases with design updates from their master templates

load fixup [path] [options]

Locates and fixes corrupted databases on the server

show allports

Shows all enabled and disabled ports on the server

show diskspace

Displays the amount of free disk space on the server

show heartbeat

Displays a value if the server is responding

show memory

Displays the amount of RAM available on the server

show tasks

Displays the names of all the Domino server tasks running

You can obtain a much more extensive list of server commands by reading the Domino Administrator help, which is installed on the Domino server under the help directory.

help

This command displays a list of server console commands, with a brief description of each command, the command’s arguments, and a sample of the syntax of each command.

Sample usage:

help

Figure 3.11 shows a subset of the sample output from running the help command on the Domino server console.

Figure 3.11

Figure 3.11. Result of running the help command on the Domino server console

load [task-name]

This command loads and starts the specified server task. It loads tasks that run continually until the server is stopped or loads a task that runs until complete. Further task arguments can be passed to the task as needed. This command is convenient because it enables developers and administrators to dynamically start server tasks without needing to restart the entire server. For example, the HTTP task can be started without affecting other tasks running on the Domino server.

Sample usage:

load http

In this example, the HTTP task is loaded, allowing the Domino server to act as a HTTP server.

Listing 3.14 shows the console output of running the previous command.

Listing 3.14. Result of Running the load http Command on the Domino Server Console

> load http

09/19/2011 08:05:03 PM  HTTP Server: Using Web Configuration View

09/19/2011 08:05:07 PM  JVM: Java Virtual Machine initialized.

09/19/2011 08:05:07 PM  HTTP Server: Java Virtual Machine loaded

09/19/2011 08:05:07 PM  HTTP Server: DSAPI Domino Off-Line Services
HTTP extension Loaded successfully

09/19/2011 08:05:12 PM  XSP Command Manager initialized

09/19/2011 08:05:12 PM  HTTP Server: Started

load [task-name] -?

This command displays help information that relates to the task specified. In general, the help information lists any options or flags that can or should be passed to the task.

Sample usage:

load chronos -?

Listing 3.15 shows the sample output from running the help command against a specific task name.

Listing 3.15. Sample Output from Running the help Command Against the Chronos Task

> load chronos -?

>

Purpose:   Performs automatic hourly and daily full text indexing.

Usage:     Load CHRONOS [options]...

[options]:

hourly     Update all hourly full text indexes.

daily      Update all daily  full text indexes.

quit

This command stops the server. The server shuts down completely after running this command.

Sample usage:

quit

Figure 3.12 shows output from running the quit command on the Domino server console.

Figure 3.12

Figure 3.12. Result of running the quit command on the Domino server console

restart server

This command stops the server completely and then restarts the server after a brief delay.

Sample usage:

restart server

Figure 3.13 shows output from running the restart server command on the Domino server console.

Figure 3.13

Figure 3.13. Result of running the restart server command on the Domino server console

tell [task-name] quit

This command stops the named task. All other server tasks remain in their current state.

Sample usage:

tell http quit

Listing 3.16 shows the sample console output after executing the quit command on a specific task.

Listing 3.16. Domino Server Console Output from Running the quit Command on the HTTP Task

> tell http quit

10/19/2011 08:50:21 PM  Domino Off-Line Services HTTP extension
unloaded.

10/19/2011 08:50:21 PM  XSP Command Manager terminated

10/19/2011 08:50:22 PM  HTTP Server: Shutdown

This sample terminates the HTTP task so that the Domino web server and all other HTTP functions are shut down. XPages developers might find this useful if the web server needs to be quickly and independently recycled—say, to reread and apply new XSP runtime settings.

restart task [task-name]

This command stops and restarts the named task. All other server tasks remain in their current state. XPages developers will find this to be a particularly powerful command because it enables them to completely and quickly restart the XPages runtime. This is of particular importance when debugging OSGi bundles running on the server. Chapter 6 discusses this in greater detail.

Sample usage:

restart task http

Listing 3.17 shows the Domino server output that results from restarting a specific task.

Listing 3.17. Sample Output from Running the restart task http Command

> restart task http

10/19/2011 09:03:10 PM  Domino Off-Line Services HTTP extension
unloaded.

10/19/2011 09:03:10 PM  XSP Command Manager terminated

10/19/2011 09:03:11 PM  HTTP Server: Shutdown

10/19/2011 09:03:13 PM  HTTP Server: Using Web Configuration View

10/19/2011 09:03:16 PM  JVM: Java Virtual Machine initialized.

10/19/2011 09:03:16 PM  HTTP Server: Java Virtual Machine loaded

10/19/2011 09:03:16 PM  HTTP Server: DSAPI Domino Off-Line Services
HTTP extension Loaded successfully

10/19/2011 09:03:19 PM  XSP Command Manager initialized

10/19/2011 09:03:19 PM  HTTP Server: Started

show server

This command prints all the basic information to the server’s console, including (but not limited to) the server’s name, data directory location, amount of time since the server was started, and total number of transactions completed by the server since it was started.

Sample usage:

show server

Listing 3.18 shows sample output from executing the show server command on the Domino server console.

Listing 3.18. Sample Output from the show server Command

> show server

  Lotus Domino (r) Server (Build V853_06302011 for Windows/32)

09/14/2011 07:28:42 PM

Server name:            greenane/GAA - Greenane

Domain name:            ibm

Server directory:       C:\Program Files\IBM\Lotus\Domino\data

Partition:              C.Program Files.IBM.Lotus.Domino.data

Elapsed time:           1 day 01:38:37

Transactions/minute:    Last minute: 10; Last hour: 200; Peak: 997

Peak # of sessions:     60 at 09/14/2011 06:50:06 PM

Transactions: 4524      Max. concurrent: 40

ThreadPool Threads:     40  (TCPIP Port)

Availability Index:     100 (state: AVAILABLE)

Mail Tracking:          Not Enabled

Mail Journalling:       Not Enabled

Number of Mailboxes:    10

Pending mail: 0         Dead mail: 0

Waiting Tasks:          0

DAOS:                   Not Enabled

Transactional Logging:  Not Enabled

Fault Recovery:         Not Enabled

Activity Logging:       Not Enabled

Server Controller:      Not Enabled

Diagnostic Directory:   C:\Program Files\IBM\Lotus\Domino\data\IBM_TECHNICAL_SUPPORT

Console Logging:        Enabled (10240K)

Console Log File:       C:\Program Files\IBM\Lotus\Domino\data\IBM_TECHNICAL_SUPPORT\console.log

DB2 Server:             Not Enabled

show conf [notes.ini variable]

This command enables the developer or administrator to examine the value of any given notes.ini variable without needing to physically open the notes.ini file residing in the Domino server’s program directory. This is a powerful command because it allows developers and administrators alike to view the values of notes.ini variables that the runtime is using without needing to wade through the array of variables present in the Domino server’s notes.ini file.

Sample usage:

show conf HTTPJVMMaxHeapSize

Listing 3.19 shows sample output as a result of executing the show conf command on the Domino server console.

Listing 3.19. Result of Executing the show conf Command Using the HTTPJVMMaxHeapSize Variable

> show conf HTTPJVMMAxHeapSize

HTTPJVMMAXHEAPSIZE=256M

set conf [notes.ini variable=value]

This command enables developers and administrators to quickly and easily set a notes.ini variable in the Domino server’s notes.ini without actually physically opening the file and editing the value. This command is particularly useful because it enables users to set the notes.ini variable while the server is running. A typical use case for this command is one in which the administrator wants to increase the minimum Java heap size of the HTTP task’s JVM without worrying about accidentally overwriting any other server settings that may have been written to notes.ini in the time the file was open for editing.

Sample usage:

set conf JavaMinHeapSize=64M

Figure 3.14 shows how the JavaMinHeapSize notes.ini variable can be reset using the set conf command and displays how the setting is applied by restarting the HTTP task.

Figure 3.14

Figure 3.14. Result of running the set conf command on the JavaMinHeapSize notes.ini variable

tell adminp [options]

This command performs various automated administration tasks on the server. A wide range of options can be passed to this task; you can obtain the complete listing of adminp options from the Lotus Domino Administrator help, installed in the help directory of the Domino server.

Sample usage:

tell adminp show databases

Listing 3.20 shows the output from executing adminp with the show databases option specified.

Listing 3.20. Result of Executing the adminp Task on the Domino Server Console

> tell adminp show databases

10/20/2011 04:11:32 PM  Admin Process: These databases have greenane/GAA designated as their Administration Server.

10/20/2011 04:11:32 PM  Title: Administration Requests Path: admin4.nsf

10/20/2011 04:11:32 PM  Title: CPP FreeBusy WebService Path: cppfbws.nsf

10/20/2011 04:11:32 PM  Title: Domino Directory Cache (6) Path: dbdirman.nsf

10/20/2011 04:11:32 PM  Title: Offline Services Path: doladmin.nsf

10/20/2011 04:11:32 PM  Title: greenane's Log Path: log.nsf

10/20/2011 04:11:32 PM  Title: admin admin Path: mail\aadmin.nsf

10/20/2011 04:11:32 PM  Title: Eileen Leonard Path: mail\eleonard.nsf

10/20/2011 04:11:32 PM  Title: Frank Adams Path: mail\fadams.nsf

load chronos [options]

This command loads the chronos task on the Domino server. The task is responsible for updating the full-text indexes of databases that are marked to be updated daily or hourly. This is useful to XPage developers when the full-text index of a database is needed to test particular functionality. This task enables developers to force the creation or update of the index without needing to modify the indexing schedule.

Sample usage:

load chronos hourly

Listing 3.21 shows the sample output from running the chronos task.

Listing 3.21. Sample Console Output from Running the chronos Task

>load chronos hourly

09/14/2011 08:35:06 PM  Chronos: Performing hourly full text indexing

09/14/2011 08:35:09 PM  Chronos: Full text indexer terminating

load updall [path] [options]

This command updates all changed views and/or all full-text indexes within the given database or all databases on the server. Obviously, this is quite useful if you are working with FTSearch features in your XPages application because testing and debugging requires an up-to-date full-text index.

You can pass a wide range of options to this task. The Lotus Domino Administrator help, installed in the help directory of the Domino Server, includes a complete listing of adminp options.

Sample usage:

load updall XPagesSBT.nsf –f

Listing 3.22 shows the output received on the Domino server console from running the updall task on the Domino server.

Listing 3.22. Sample Console Output from Running the updall Task to Update Full-Text Indexes on a Specified Application

> load updall XPagesSBT.nsf -f

09/14/2011 08:44:39 PM  Index update process started:  XPagesSBT.nsf -f

09/14/2011 08:44:39 PM  Updating views in C:\Program Files\IBM\Lotus\Domino\data\XPagesSBT.nsf

09/14/2011 08:44:39 PM  Index update process shutdown

load design [source] [target] [options]

This command updates all databases on the server with design updates from their master template. This command can be quite useful when an administrator has accidentally modified the design of a particular database and needs to update the design of that database from the master template outside the regular design update schedule.

Sample usage:

load design rossacussane.swg.myco.com greenane.swg.myco.com –f XPagesSBT.nsf

Listing 3.23 shows the Domino server console output received from executing the design task on the Domino server.

Listing 3.23. Sample Console Output from Running the Design Task

> load design rossacussane.swg.myco.com greenane.swg.myco.com -f XPagesSBT.nsf

09/14/2011 08:54:52 PM  Database Designer started

09/14/2011 08:54:52 PM  Opened session for rossacussane/GAA (Release 8.5.3)

09/14/2011 08:54:55 PM  Closed session for rossacussane/GAA Databases
accessed: 3   Documents read: 0   Documents written:  0

09/14/2011 08:54:55 PM  Opened session for greenane/GAA (Release 8.5.3)   09/14/2011

08:54:55 PM  Closed session for greenane/GAA Databases accessed:
1   Documents read: 0   
Documents written:  0

09/14/2011 08:54:55 PM  Opened session for greenane/GAA (Release 8.5.3)

09/14/2011 08:54:55 PM  Database Designer shutdown

09/14/2011 08:54:55 PM  Closed session for greenane/GAA Databases accessed: 1   

Documents read: 0   Documents written:  0

load fixup [path] [options]

This command runs the fixup task on the specified database or on all databases on the server. The fixup task scans for databases that contain inconsistencies from partially written operations that may have occurred during a previous failure, such as a hardware failure or a crash. You can pass a wide range of options to this task. The complete listing of adminp options is available from the Lotus Domino Administrator help, installed in the help directory of the Domino server.

Sample usage:

load fixup XPagesSBT.nsf –l

Listing 3.24 shows the result of running the fixup command against a particular database on the Domino server.

Listing 3.24. Sample Console Output from Running the fixup Command

> load fixup XPagesSBT.nsf -l

 09/14/2011 09:08:55 PM  Database Fixup: Started:  XPagesSBT.nsf -l

 09/14/2011 09:08:55 PM  Checking database C:\Program Files\IBM\Lotus\Domino\data\XPagesSBT.nsf

 09/14/2011 09:08:55 PM  Performing consistency check on XPagesSBT.nsf...

 09/14/2011 09:08:56 PM  Completed consistency check on XPagesSBT.nsf

 09/14/2011 09:08:56 PM  Performing consistency check on views in database XPagesSBT.nsf

 09/14/2011 09:08:56 PM  Completed consistency check on views in database XPagesSBT.nsf

 09/14/2011 09:08:56 PM  Database Fixup: Shutdown

show tasks

This command shows the names of all the Domino Server tasks that are running on the server. Administrators will find this useful for determining which tasks are running on any given server.

Sample usage:

show tasks

Figure 3.15 shows the sample output received when running the show tasks command on a Domino server.

Figure 3.15

Figure 3.15. Result of running the show tasks command on the Domino server console

show allports

This command prints the configuration of all enabled and disabled ports on the server.

Sample usage:

show allports

Listing 3.25 shows the result of executing the show allports command on the Domino server console.

Listing 3.25. Sample Console Output from Running the show allports Command

> show allports

Enabled Ports:

TCPIP=TCP, 0, 15, 0

Disabled Ports:

LAN0=NETBIOS, 0, 15, 0

LAN1=NETBIOS, 1, 15, 0

LAN2=NETBIOS, 2, 15, 0

LAN3=NETBIOS, 3, 15, 0

LAN4=NETBIOS, 4, 15, 0

LAN5=NETBIOS, 5, 15, 0

LAN6=NETBIOS, 6, 15, 0

LAN7=NETBIOS, 7, 15, 0

LAN8=NETBIOS, 8, 15, 0

show diskspace

This command prints the amount of disk space available on the server.

Sample usage:

show diskspace

Listing 3.26 displays the results from executing the show diskspace command.

Listing 3.26. Sample Console Output from the show diskspace Command

> show diskspace

Available disk space 83,342,319,616 bytes

show heartbeat

This command prints a value to the console if the server is still responding.

Sample usage:

show heartbeat

Listing 3.27 shows the result of running the show heartbeat command on the Domino server console.

Listing 3.27. Sample Console Output for the show heartbeat Command

> show heartbeat

greenane/GAA's elapsed time: 100827 seconds
6. Conclusion | Next Section Previous Section