Description

The GMUS must be launched within a command line terminal with the minimum of a port number.  The different options for launching the GMUS are defined below.


Running GMUS REST Server with PortNumber Only

The GMUS may be launched with its default settings via the -gmusr option:

genrocket -gmusr <portNumber>

Example

The following example launches the GMUS REST Server on port 8070:

genrocket -gmusr 8070


Running GMUS REST Server for secured requests with PortNumber Only

The GMUS may be launched with its default settings in the secured mode for https requests via the -gmussr option:

genrocket -gmussr <portNumber>


Example

The following example launches the GMUS REST Server for secured requests on port 8443:

genrocket -gmussr 8443


Running GMUS Socket Server with PortNumber Only

The GMUS may be launched with its default settings via the -gmuss option:

genrocket -gmuss <portNumber>


Example

The following example launches the GMUS Socket Server on port 4445:

genrocket -gmuss 4445


Launching GMUS with Properties File and Port Number

The GMUS allows for configuration options to be defined within a properties file and loaded via the -gmusp option:


REST

genrocket -gmusp <propertiesFileWithPath> -gmusr <portNumber>

REST for secured requests

genrocket -gmusp <propertiesFileWithPath> -gmussr <portNumber>

Socket

genrocket -gmusp <propertiesFileWithPath> -gmuss <portNumber>


GMUS Configuration Options

The GMUS configuration options are the following:

  • sendMail=true- defines whether or not to send mail on completion of Scenario runs (Default is false). If sendMail property is true, you need to specify four more properties: host, port, user and password. 
  • host=This property is required only when sendMail is true. You need to specify the mail server in this field. e.g. smtp.gmail.com.
  • port=This property is required only when sendMail is true. You need to specify the port to connect to mail server. e.g. 587.
  • user=This property is required only when sendMail is true. A sender's email ID is required to send the mail. e.g. john@gmail.com.
  • password=This property is required only when sendMail is true. The sender's password for his email ID is required to send the mail.
  • body=This property is optional. You can specify the HTML for the mail body here which will override the default message for the mail body.
  • subject=This property is optional. You can specify the HTML for the mail subject here which will override the default message for the mail subject.
  • historyDurationInHours - This property is optional. This property defines how long (in hours) the queue history will be retained. Be default, the queue history is being retained for 3 hours only.
  • memoryLimit=100 - defines whether Memory available to run a scenario should be minimum 100 MB, else scenario will go into the queue (Default = 50 MB).
  • requestWaitTimeInSeconds - This is an optional property. This property defines how long a request will wait for a Stateful scenario to be executed successfully.
  • queueWaitTimeInMilliSec - Defines how frequently a Scenario, Scenario Chain, or Scenario Chain set should be processed from the queue. By default, the value is 10000 milliseconds (10 seconds)
  • cpuUsage=0.99 - defines the CPU usage limit after which Scenarios should not be immediately run, but place into the queue. The cpuUsage value should lie within an interval of 0.0 - 1.0 (Default 0.95).   
    • A value of 0.0 means that all CPUs are actively idle during the recent period of time observed 
    • A value of 1.0 means that all CPUs are actively running at max capacity 100% of the time during the recent period being observed
  • scenarioSizeLimit=1000 - Defines the maximum number of rows a Scenario is allowed to keep in memory when the inMemory flag is set to true or both (Default 5000000).
    • GenRocket checks the scenarioSizeLimit by multiplying the number of Attributes by the loopCount (loopCount * number of Attributes)
    • If the scenarioSizeLimit is exceeded, GenRocket will not run the Scenario and respond with the following message:
      • Scenario Size exceeds the limit to run in memory. Hence, Can not generate data in memory. Please set inMemory to false

Examples Properties File

sendMail=true
memoryLimit=100
cpuUsage=0.90
scenarioSizeLimit=100000


Launching GMUS with Properties File

The following example launches the GMUS with a properties file and on port 8070:

genrocket -gmusp /home/jDoe/Desktop/gmusprop.properties -gmusr 8070


genrocket -gmusp <propertiesFileWithPath> -gmusr <portNumber>

REST for secured requests

genrocket -gmusp <propertiesFileWithPath> -gmussr <portNumber>

Launching GMUS with Logging File and Port Number

The GMUS allows you to enable the logging of the messages while the server is running using the log4j properties file and loaded via the -gmusl option:

genrocket -gmusl <loggingFileWithPath> -gmusr <portNumber>

The following example launches the GMUS with a logging file and on port 8070:

genrocket -gmusl /home/jDoe/log4j.properties -gmusr 8070

REST for secured requests

genrocket -gmusl <loggingFileWithPath> -gmussr <portNumber>


Sample log4j.properties file:

# Define the root logger with appender filelog4j.rootLogger =DEBUG,FILE,STDOUTlog4j.logger.deng=DEBUG# Define the file appenderlog4j.appender.FILE=org.apache.log4j.DailyRollingFileAppender# Set the name of the filelog4j.appender.FILE.File=/home/jDoe/productionApi.log# Set the immediate flush to true (default)log4j.appender.FILE.ImmediateFlush=true# Set the threshold to debug modelog4j.appender.FILE.Threshold=debug# Set the append to false, should not overwritelog4j.appender.FILE.Append=true# Set the DatePatternlog4j.appender.FILE.DatePattern='.' yyyy-MM-dd-a# Define the layout for file appenderlog4j.appender.FILE.layout=org.apache.log4j.PatternLayoutlog4j.appender.FILE.layout.conversionPattern=%m%nlog4j.appender.STDOUT=org.apache.log4j.ConsoleAppenderlog4j.appender.STDOUT.Target=System.outlog4j.appender.STDOUT.layout=org.apache.log4j.PatternLayoutlog4j.appender.STDOUT.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n