Starting the Adapter from the Command Line

To start the Log File Input adapter from the command line, set the CLASSPATH environment variable and execute the start command.

To set the CLASSPATH environment variable, use createClasspath.sh (UNIX, Linux) or createClasspath.bat (Windows).

Most UNIX-like operating systems place startup scripts in /etc/init.d. To start the adapter on such a system, Sybase recommends that you copy the script logfile_input.rc to the /etc/init.d directory and make any necessary edits.

Note: The logfile_input.rc script is a sample, and only works on Linux. To use this on another platform, you need to customize this script.

On systems without /etc/init.d, you can use logfile_input.rc as the basis for writing your own script to start the Log File Input adapter.

The commands that you can execute through the logfile_input.rc file are:
  • Start
  • Stop
  • Status
  • Restart
Attention: The logfile_input.rc script requires you to have write permissions to /etc/sysconfig, /var/run, and /var/lock/sybsys.
  1. Run the command source createClasspath.bat for Windows or source createClasspath.sh for UNIX to set the CLASSPATH environment variable.
  2. To run the adapter from the command line:
    java -cp $CP -Dproperties=FILE.PROPERTIES com.sybase.esp.adapters.logFileInput.Main

    There is no space between the "D" and the word "properties".