Running in a Command Shell

As a general rule, the server runs as a "service" as appropriate for the platform. For example, under Microsoft Windows, this is a Windows Service.

It is possible to run the server under the command shell. To do so, you need access to the shell. The location containing the server software (usually the bin directory under the installation point) must be in the execution path of the operating system.

To start the server, enter the following command:

iwsrv <configname>

The command is documented in other manuals and by entering the following command directly at the Windows command line:

iwsrv ?

A batch startup script is supplied with the installation for Windows and for Unix/ZOS platforms. These are named iway7.cmd and iway7.sh respectively. They support the same parameters.

Commands can also be sent using the secure telnet command channel. To enable this channel, configure a TelnetD channel on the master configuration (or any other configuration). Only the inlet/listener component matters. The remainder of the configuration is ignored. Once configured, any standard Telnet client can be used to communicate command and control to the server.

If the server is running as a service with no console access (e.g. Windows), iWay recommends configuration of a TelnetD channel to provide command, control, and analysis services.

When running in the command shell, you control the server by typed commands in addition to the run time console. These commands are designed to assist in resolving issues, and many are technical in nature. Some of the key commands are:

Command

Description

copy <from> <to>

Copies a file between locations.

errors

Displays the last few errors reported by the server.

info

Displays monitor information.

line

Draws a line. This makes reading of the display simpler.

manifest <jarname>

Displays the manifest of the named jar file. The name can be a full path name or a simple jar name in the classpath.

memory

Displays statistics on memory in use.

quit

Exits the server. All listeners must have been stopped.

refresh <listener name>

Restarts the listener with an updated local configuration. The listener should be started.

start [<listener name>]

Starts all listeners or the identified listener.

stats

Displays statistics. For standard operation, this shows a wall clock (response) time figure. iWay provides a measurement that extends the functionality of this command.

stop [<listener name>]

Stops all listeners or the identified listener.

threads

Lists execution “threads” currently being controlled by the server. This may not include threads started by auxiliary packages such as third party interfaces. This is often very useful after a STOP command to determine what might still be running.

Options on the threads command enable you to write a current JVM status (stacktrace), track internal monitors (locks), and so on. These options can help to diagnose what might appear to be a "loop" or "work stoppage".

time

Displays the time in GMT.

tool <toolname> [parameters]

Runs the specified tool. See Supplied Tools.

The show command can display information regarding key system resources and the environment of the server. You may need to use some of the show commands depending on the situation being investigated. While the show command changes for each release, some of the most useful subcommands for debugging are listed and described in the following table:

Command

Description

show classpath

The JAR files contributing to the environment of the server are shown. This information is also available from the console. Some systems restrict classpath length, and this will be apparent if the classpath seems truncated.

show configs

Information about the operating status of configuration/applications is displayed. This can quickly show whether a configuration is running.

show extensions

Displays information about the extensions loaded by the server. Extensions usually contain components of the system, for example, a channel protocol such as Sonic. If the extension did not load properly, you may see runtime startup errors. The reason that the extension did not load is usually shown in the listing.

show pools

Displays the contents of key internal resource pools.

show providers

Providers control resources, such as keystores or data base access connections. When problems in the resources controlled by the providers appear, this command will display usage statistics that may help isolate issues.

show queue

Displays information about the queues by protocol or channel name. All queuing systems are not necessarily supported. You can use this information to understand how many messages are on the queue, error counts, number processed so far, and so on.

show sregs (or show registers)

Displays manager and listener-level special registers and their values. Registers that are created as part of a document workflow, such as the source name of a document read by the file listener, are not shown.

show xalog

Displays information related to the transaction log update drivers. BAM (Business Activity Monitor) uses a transaction log driver. If issues arise in BAM or other transaction log, this can help isolate errors.

Console command help is available through use of the help command at the console. Entering the following command shows a list of the currently supported command:

help

Be aware that the commands (especially the informational commands) may vary with the release.

Entering the following commands provides additional information where available and appropriate: