Welcome to Host Simulator


Overview
Prerequisites
How to run Host Simulator
Recording
Playing back
Playing back from the Command Prompt




Overview

Host Simulator is a Java application used to record a client's interaction with a host as a trace and then play it back, simulating the host's side of the conversation.

It provides an excellent means for demonstrating client technology, such as IBM's Personal Communications, Host On-Demand, Screen Customizer, and Host Publisher software. It is also a useful tool for servicing customer problems. Customers can use this tool to record the host-to-client communications that cause problems and deliver the recorded trace to IBM Service. Host Simulator enables reproduction of the same error condition in-house, making it easier to diagnose the problem and making it possible to develop and test a fix. Host Simulator supports TN3270, TN5250, and VT terminal types.


Prerequisites

JRE 1.1.6 or higher is required. Host Simulator assumes that the JRE's classes.zip file is located within the system's CLASSPATH environment variable, and that JRE's bin directory (where java.exe is located) is in the system's PATH environment variable.

The Host Simulator is written in Java and can run on most any platform. It has been tested on Windows NT, AIX, and Linux.


How to run Host Simulator

  1. At the command prompt from the directory where the tool resides, type hostsim.bat.
  2. The left frame in the Host Simulator window contains two radio buttons that control the content of the right frame. Select Recording to begin recording an interaction between a client and the host. This saves the results as a trace file for which you specify a name.
  3. Select Playback to play back the host side of the trace conversation.


Recording

Host Simulator sits in between the client and the server, acting as a passthru for the conversation between the two, while recording every flow of the conversation. When you click Recording, the following fields appear:

Output file name
Name of the trace file (for example, d:\HostSim\test.trc)
Telnet server address
Either TCP/IP address or host name of the server to which the client intends to connect (for example, ralvms.raleigh.ibm.com, ralvm17.raleigh.ibm.com)
Port number
Port number on which the server previously mentioned is listening.

  1. Complete the information for these fields, then click Start Recording. If any of the information entered in the above fields is not correct an error message displays; correct the information and click Start Recording again. If all the information is correct, Host Simulator opens a socket to which the client can connect. The port number on which Host Simulator is listening displays in the text area in the center of the window.
  2. Configure the client with the host name of the machine where Host Simulator is running as the server address, and the port on which Host Simulator is listening as the port number.

    For example, if you want to record the flow between the Personal Communications emulator and ralvms.raleigh.ibm.com, and the host name of the machine where Host Simulator is running is nirven.raleigh.ibm.com:

    Host Simulator

    • OutPut file name: c:\test.trc
    • Telnet server address: ralvms.raleigh.ibm.com
    • Port number: 23
    • Assume Host Simulator opens a socket at port 7021 after clicking Start Recording

    Personal Communications

    • Host Name or IP Address: nirven.raleigh.ibm.com
    • Port: 7021
  3. Click Start Recording and begin using the client emulator to logon to and navigate through the host application.
  4. Click Logon End once when the connect phase is complete.
  5. Click Data End once when the data part is complete.
  6. Click Logoff End to mark the end of the disconnect phase and stop recording. Click Cancel to stop recording at any time.


Playback

Host Simulator plays back a recorded trace to simulate the host. Only the trace recorded with tool can be played back.

Input trace file specifies the trace file that Host Simulator will play back. Port number is the port number on which you want Host Simulator to listen for the client connections.

  1. Click Playback. If the information in the above fields is correct, a message stating that Host Simulator is listening on the port displays in the text area. Connect the client to this port, and you can see the recorded screens on the client.
  2. Click Stop to stop playback of the trace.

Active client connections
The number of clients currently connected to Host Simulator. Total clients disconnected is the total number of clients disconnected, and Total clients connected is the total number of clients ever connected.

Time delay

No Delay
Host Simulator plays back the next screen without any delay.
Actual
Host Simualtor plays back the next screen with the same delay as was seen when recording the trace.
Random
Type the maximum and minimum time delay, in seconds, used to play the screens back. The actual delay used is randomly generated between these two values, inclusively, for every screen.

Note: The client must reproduce its side of the conversation EXACTLY as it is recorded. Otherwise, Host Simulator issues an error in the Status window, stating that the input received does not match the trace. Playback will continue, however.

Playing back from the Command Prompt

Host Simulator can also play back the recorded trace with out actually bringing up the GUI. The way to do this is to add HostSim.jar to your classpath and type the following command at the command prompt.

java com.ibm.HostPublisher.HostSim.Gui tracefile port [TimeDelay [minTD maxTD]]

tracefile
Name of the trace file
port
The port number at which Host Simulator will be listening
TimeDelay
Type of time delay to play back the screens. Choices are: 'No Delay', 'Random', 'Actual'. Default is 'No Delay'.
minTD
Specified only if time delay is 'Random'. It is a number between 0 and 100.
maxTD
Specified only if time delay is 'Random'. It is a number between 0 and 100 and maxTD should be >= minTD. The actual delay is randomly generated between minTD and maxTD.

Note: If the command is run with out any options TimeDelay defaults to "No Delay" option and the recorded screens are played back with out any delay.

After you run the command, if all the options are valid, a message is displayed at the command prompt stating that Host Simulator is listening on the specified port. All the other Host Simulator messages such as the number of clients connected to the Host Simualtor and trace mis-match information are also displayed at the command prompt.

Examples

  1. Play back the trace with 'No Delay' option. The following two commands are equivalent.
  2. Play back the trace with 'Random' time delay option.
  3. Play back the trace with 'Actual' time delay option.