Starting Java collectors

Use this information to start collectors written in Java™.

About this task

You start a Java collector by going to the Java collector bin directory at $NCHOME/precision/collectors/javaCollectors/bin and issuing a command-line interface command. Issue the following command to start a Java collector (note that the command is entered on one line; options are explained in Table 1):
collector.sh -jar [ -Xmsminimum_memory-sizem ] [ -Xmxmaximum_memory-sizem ] jar_file -propsFile file_name -port port_number [ -bg ] 
Table 1. Explanation of command-line options

Option

Explanation

-jar jar_file

Required: path to the jar file for the collector to be run relative to the root Java collector directory; for example, csv/csvcollector.jar.

-propsFile file_name

Optional: path to the properties file for the collector. The default is specified by the collector; for example, for the CSV collector the default is ../csvcollector.properties.

-port port_number

Optional: port on which to run the collector. Default value is 8080.
Note: This value can also be specified in a collector properties file.

-bg

Optional, and on UNIX™ only. Use this parameter to run the collector in the background.
Note: Do not use the standard UNIX & parameter to run a collector in the background. Use the -bg option only.

[ -Xmsminimum_memory-sizem ]

Optional: the minimum heap size for the collector. Increase the heap size settings if you receive errors relating to the collector process being out of memory. The default minimum heap size is 256M.

[ -Xmxmaximum_memory-sizem ]

Optional: the maximum heap size for the collector. Increase the heap size settings if you receive errors relating to the collector process being out of memory. The default maximum heap size is 768M.

Example: starting the Java CSV collector

To start the Java CSV collector, perform the following steps:
  1. Go to the following directory:
    $NCHOME/precision/collectors/javaCollectors/bin
  2. Run the following command to start the Java CSV collector with the default .jar and property files, on port 8089, with minimum heap size of 512M and maximum heap size of 1024M:
    ./collector.sh -Xms512m   -Xmx1024m  -jar csv/csvcollector.jar -propsFile csv/csvcollector.properties  -port 8089 -bg