Running the probe as a Windows service

The Windows version of the probe can be run as a Windows service. Configuring the probe to run as a Windows service is a two-part process: First you need to register the probe as a Windows service, then you need to start the probe using the Services window within Windows Control Panel.

Setting the path to jvm.dll in the Windows environment

Before running any probe as a Windows service, you must have the path to jvm.dll set in the probe environment. This file forms a part of your Java installation and its location depends on the version of Java that you are running.

If you want to use IBM Java that is supplied with Netcool/OMNIbus V7.4.0, enter the following commands on the command line:

set OMNIBUS_JVM_DLL=C:\IBM\Tivoli\Netcool\platform\win32\jre_1.6.7\jre\bin\j9vm\jvm.dll

If you want to use another version of Java (for example, Sun Oracle Java) you must set the path to the location of the jvm.dll file within that Java environment. To identify the path to set, search for jvm.dll using Windows Explorer or consult the documentation supplied with your version of Java.

Note: If you do not set OMNIBUS_JVM_DLL, the nco_p_jdbc.bat script will use the default jvm.dll delivered with Netcool/OMNIbus in the following location %NCHOME%\platform\arch\jre_version.

Registering the probe as a Windows service and running the probe

To register the probe as a Windows service, run the following command:

%OMNIHOME%\probes\win32\probe_name /INSTALL /CMDLINE "command_line_options"

Where probe_name is the name of the probe, for example nco_p_jdbc.bat.

Note: You must include double quotes ("") after /CMDLINE for the command line arguments, otherwise the Windows service will not work as expected.

To run the probe as a Windows service, use the following steps:

  1. Configure the probe properties file.
  2. Select Control Panel > Administrative Tools.
  3. Double-click on Services.

    The Services window opens. This window lists all of the services that are currently installed on your machine.

  4. Search for the probe by its name in the list of services.
    Note: If you did not specify an instance name within the command line options, the probe instance will appear in the list of services as NCONcoPJdbcProbe.
  5. Click on its name and select Start.

To remove the probe service, run the following command:

%OMNIHOME%\probes\win32\probe_name /REMOVE

Running multiple instances of the probe as a Windows service

When you run multiple instances of the probe as a Windows service, you should use separate properties files and rules file. You should also specify different files for the PidFile and DataBackupFile properties.

To create a second JDBC probe instance as windows service, use one of the following methods:

Method 1

  1. Make a copy of the jdbc.props and jdbc.rules files naming them JDBCProbe2.props file and a JDBCProbe2.rules respectively.
  2. Edit the rulesfile property of the JDBCProbe2.props file to reference JDBCProbe2.rules.
  3. Run the following command:

    nco_p_jdbc.bat /INSTALL /INSTANCE JDBCProbe2 /CMDLINE "-name JDBCProbe2"

Note: The -name JDBCProbe2 option determines that the files JDBCProbe2.props and JDBCProbe2.rules will be used and that the instance of the probe will be called JDBCProbe2; the probe instance will appear in the list of services as JDBCProbe2.

Method 2

  1. Make a copy of the jdbc.props and jdbc.rules files naming them jdbc2.props file and a jdbc2.rules respectively.
  2. Edit the rulesfile property of the jdbc2.props file to reference jdbc2.rules.
  3. Run the following command:

    nco_p_jdbc.bat /INSTALL /INSTANCE JDBCProbe2 /CMDLINE "-propsfile jdbc2.props"

Removing a running instance of the probe

To remove a probe instance, run the following command:

nco_p_jdbc.bat /REMOVE /INSTANCE instance_name

For example:

nco_p_jdbc.bat /REMOVE /INSTANCE JDBCProbe2