This is the second drop of the hyades data collection code that is intended to be a
illustration of some of the capabilities we will be bringing forward.  This drop
contains a server process (RAServer.exe) that has the capability to launch and manage
applications on the local machine from a remote workbench.  It also has a Java profiling
engine that uses JVMPI to profile java applications.  Using the corresponding Hyades
build you can launch java applications for profiling or import remote Apache error and
Apache access logs.


In order to get started you first need to generate a configuration file that provides the
rules for what applications can be run with the server process.  This can be done by running
the SetConfig.bat file in the \bin directory.  This will require that a JVM be present in
the path .  Run this with the shell being in the \bin directory and the output will be the
\config\serviceconfig.xml file.  This is a sample of a file that will be used by the service
when it is started.   You may edit this file manually if you wish and the rules are documented
in the \dtd\serviceconfig.dtd file.

Once the config file has been generated you can start the server process.  This can be done in
one of two ways.  The server process can run as a application or as a Windows Service.

Running the server as an application
====================================
The only additional requirement is that you set the RASERVER_HOME environment variable to point to where you have
unzipped the server to.  The server will use this environment variable to locate the configuration
file.


Installing the server as a Windows Service
=======================================
Run the manageservice.exe application to create the windows service installation.  The syntax is

	manageservice add "<service name>" "<unzip location>"

For example, if you unzipped the files to "d:\hyades" and wanted to create a Windows Service named
"Hyades Data Collector"

	manageService add "Hyades Data Collector"  "d:\hyades"

You can now start and stop the server using the Windows Services panel or with the windows 'net' command.


Uninstalling the server as a Windows Service
============================================
Run the manageservice.exe application to delete the windows service installation.  To remove the service
in the example above the command would be

	manageservice remove "Hyades Data Collector"


Service Logging
===============
All log entries will be placed in \config\servicelog.log.

The Java Profiler
=================
The Java Profiler is a library that attaches to a Java virtual machine (JVM) to capture and record
the Java application's behavior.The output from the agent is in the form of XML fragments.  Documentation
of the fragments is located at http://dev.eclipse.org/viewcvs/indextools.cgi/~checkout~/hyades-home/docs/components/data_collection/docs/XML4Profiling.htm

Invocation of the Java Profiler from the workbench
=============================

The profiler can be launched from the Eclipse workbench.  Open the profiling perspective and you can
launch applications using the 'Profile' menu contribution or the toolbar button.  Applications can
be run either using code within the current workspace or binaries that are on the file system.


Invocation of the Java Profiler from the command line
================================

The Java Profiler is invoked using the -Xrun Java option as follows:
	-XrunpiAgent[:agent_parm[,agent_parm]*
,where agent_parm may be:

server=[standalone | enabled | controled]
	standalone
		The Java Profiler is manually attached to a JVM instance and generates a stand-alone
		trace to a specified file based on the options and filters given on the command line.
		When this option is selected, the Java Profiler produces the enclosing traceRoot
		element to form a complete and valid XML document.
	enabled
		The Java Profiler is loaded, allows the application to run normally, but produces no
		trace until a workbench attaches to the agent to give it instructions.  When this
		option is selected, the Java Profiler only produces XML fragments instead of a
		complete XML document.
	controlled
		The Java Profiler is loaded, blocks the application from running until a client gives
		it instructions to continue.  When this option is selected, the Java Profiler only
		produces XML fragments instead of a complete XML document.

filters=filename
	This parameter is only used when server=standalone is specified.
	Specifies the name of the file that contains the initial class filter definitions to be used
	during the trace.The default is filters.txt in the current directory.The format of the file
	is as follows:
	 classpattern methodpattern mode , where:
	classpattern
		is a string with no imbedded blanks.The string may contain a single "*" either at the
		beginning of the string or at the end of the string.The "*" will match zero or more
		characters, thus making the pattern a generic prefix or suffix pattern.A single "*"
		can also be specified to represent all strings.
	methodpattern
		is a string with no imbedded blanks.The string may contain a single "*" either at the
		beginning of the string or at the end of the string.The "*" will match zero or more
		characters, thus making the pattern a generic prefix or suffix pattern.A single "*"
		can also be specified to represent all strings.
	mode
		is one of INCLUDE or EXCLUDE.

	Filter patterns are processed in the order that they are specified until the first pattern
	match succeeds.If the class name does not match any of the specified filter patterns, the
	default is to INCLUDE the class.

file=filename
	This parameter is only used when server=standalone is specified.
	Specifies the name of a file that the trace will be written to.The default is trace.xml in
	the current directory.

help
	Displays a list of available agent options to stdout.
