Sun StorageTek 5800 System SDK Developer's Guide

Chapter 3 Sun StorageTek 5800 System Emulator

This chapter provides information on running the 5800 system emulator.

The following topics are discussed:

Introduction to the Emulator

The 5800 system emulator mimics the behavior of a 5800 system server. This feature enables you to test software being developed for a 5800 system without having to access a 5800 system server. The emulator stores all data and metadata on the local hard drive. This data is by default stored in the emulator/var directory.

Software Requirements

The 5800 system emulator requires at minimum the JDK 1.5 software.

Emulator Startup

The 5800 system emulator can run on Solaris, Linux, or Windows environments. To start the emulator, go to the emulator/bin directory and execute the file for Solaris and Linux environments or the start.bat file for the Windows environment. The emulator will be listening on port 8080 of the machine you start it on.

See Emulator Configuration File for directions on changing the port number.

Emulator Shutdown

Connect to port 8080 of the machine running the 5800 system emulator with your web browser (http://localhost:8080 if you are on your local system). Click on HttpContext [/admin], then Click here to shutdown the emulator.

Schema Modification

To add a custom schema to the 5800 system, create an XML file detailing your custom schema. Refer to the XML files in the config directory for examples of a custom schema. Also, see “Configuring Metadata and File System View” in Sun StorageTek 5800 System Administration Guide.

Once your XML schema file is complete, stop the emulator and run the script (metadata_merge_config.bat on Windows) located in the bin directory. This script takes one command-line argument, which is the full path to your XML schema file. The emulator should be stopped while updating the schema.

To use a new schema in the emulator you should first do a manual wipe of the emulator contents.

ProcedureTo Manually Clear the Emulator Contents

  1. Shut down the emulator if it is currently running.

  2. Remove the emulator var directory and all of its contents.

    For example:

    rm -fr SDK directory name/emulator/var

    where SDK directory name is the directory into which you unzipped the 5800 system SDK.

  3. Run the metadata_merge_config program to activate the new schema.

  4. Restart the emulator.

Emulator Event Log

The emulator event log is automatically stored under /emulator/logs/emulator.log. The event log contains all the transactions that the emulator has processed, as well as startup and shutdown information. This log can be very helpful in debugging your 5800 system client applications.

Emulator Configuration File

The emulator configuration file is located at /emulator/config/emulator.config. This file contains settings for configuring the emulator. To configure the emulator to listen on a different port, add the line:

honeycomb.protocol.port = port_number

to the emulator.config file, where port_number is the port the emulator will listen on. For further information on the configuration file, refer to the Sun StorageTek 5800 Administrator’s Guide.