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. 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.

Once you have the file path, enter the following commands on the command line as shown in example below:

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

Note: If you define the %OMNIBUS_JVM_DLL% environment variable, the probe uses that dynamic link library (DLL) for the windows service. Otherwise, by default, the probe uses the j9vm\jvm.dll that comes with Tivoli Netcool/OMNIbus.

If you want to use IBM Java that is supplied with Netcool/OMNIbus V7.3.0, V7.3.1, or 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

Registering the probe as a Windows service and running the probe

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

  1. Open a Command Prompt.
  2. To register the probe as a Windows service, run the following command:

    %OMNIHOME%\probes\win32\nco_p_probename /INSTALL /INSTANCE instance-name /CMDLINE "command-line-options"

    Where nco_p_probename is the probe executable as listed in the Summary table of the probe's reference guide. For example nco_p_wineventlog.exe or nco_p_jdbc.bat.

    Replace instance-name with a unique name for the service and command-line-options with any command line options that you want to use when running the probe. You must include double quotes ("") after /CMDLINE for the command line arguments, otherwise the Windows service will not work as expected.. If you do not want to use any command line options, exclude the /CMDLINE switch.

    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 NCONcoPInitialsProbe where Initials is the probe initials.

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

  1. Select Control Panel > Administrative Tools.
  2. Double-click on Services.

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

  3. Search for the probe by its name in the list of services.
  4. Click on its name and select Start.

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 probe instance as windows service, use one of the following methods:

Method 1

  1. Make a copy of the probe properties file and rules file. For example:

    probename2.props and probename2.rules respectively

    Where probename is the probe name from the probe properties and rules file as listed in the Summary table of the probe's reference guide.

  2. Edit the rulesfile property of the probename2.props file to reference probename2.rules.
  3. Run the following command:

    nco_p_probename /INSTALL /INSTANCE instance_name2 /CMDLINE "-name probename2"

    Where nco_p_probename is the probe executable as listed in the Summary table of the probe's reference guide. For example nco_p_wineventlog.exe or nco_p_jdbc.bat.

    Where instance-name is the instance name you supplied when registering the probe as a service.

Note: The -name probename2 option determines that the properties and rules files, and the instance of the probe called will be probename2; the probe instance will appear in the list of services as, for example, probename2.

Method 2

  1. Make a copy of the probe properties file and rules file. For example:

    probename2.props and probename2.rules respectively

    Where probename is the probe name from the probe properties and rules file as listed in the Summary table of the probe's reference guide.

  2. Edit the rulesfile property of the probename2.props file to reference probename2.rules.
  3. Run the following command:

    nco_p_probename /INSTALL /INSTANCE instance_name2 /CMDLINE "-propsfile probename2.props"

    Where nco_p_probename is the probe executable as listed in the Summary table of the probe's reference guide. For example nco_p_wineventlog.exe or nco_p_jdbc.bat.

    Where instance-name is the instance name you supplied when registering the probe as a service.

Removing a running instance of the probe

To remove a probe instance, run the following command:

  1. Stop the service, if it is running:
    1. Open the Windows Control Panel and double click Administrative Tools.
    2. Double click Services.
    3. Click on the entry for the probe service and click Stop.
  2. Open a Command Prompt and enter the following command to remove the probe service from the system:

    %OMNIHOME%\probes\win32\nco_p_probename /REMOVE /INSTANCE instance-name

    Where nco_p_probename is the probe executable as listed in the Summary table of the probe's reference guide. For example nco_p_wineventlog.exe or nco_p_jdbc.bat.

    Where instance-name is the instance name you supplied when registering the probe as a service.