Wire listener command line options

You can use command line options to control the wire listener.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-java-- -cp pathToListener------------------------------------>

>-- com.ibm.nosql.server.ListenerCLI---------------------------->

   .--------------------------.   
   V                          |   
>---- -config properties_file-+--------------------------------->

>--+- -start-+---------------------+-+-----------------------+-+-------------------------+-+-->
   |         '- -logfile--log_file-' |             .-error-. | |         .-27017-------. | |   
   |                                 '- -loglevel--+-warn--+-' '- -port--+-port_number-+-' |   
   |                                               +-info--+                               |   
   |                                               +-debug-+                               |   
   |                                               '-trace-'                               |   
   '- -stop-+-----------------------+------------------------------------------------------'   
            |         .-10--------. |                                                          
            '- -wait--+-wait_time-+-'                                                          

>--+-----------+--+--------------------+-----------------------><
   '- -version-'  '- -buildInformation-'   

Argument Purpose
-cp pathToListener Specifies the fully qualified or relative path to the jsonListener.jar file.
com.ibm.nosql.server.ListenerCLI Specifies the Java™ main method for the JSON wire listener.
-config properties_file Specifies the name of the wire listener configuration file to run. This argument is required to start or stop the wire listener.
-start Starts the wire listener. You must also specify the configuration file.
-stop Stops the wire listener. You must also specify the configuration file. The stop command is similar to the MongoDB shutdown command.
-logfile log_file Specifies the name of the log file that is used. If this option is not specified, the log messages are sent to std.out.
Important: If you have customized the Logback configuration or specified another logging framework, the settings for -loglevel and -logfile are ignored.
-loglevel Specifies the logging level.
error
Errors are sent to the log file. This is the default value.
warn
Errors and warnings are sent to the log file.
info
Informational messages, warnings, and errors are sent to the log file.
debug
Debug, informational messages, warnings, and errors are sent to the log file.
trace
Trace, debug, informational messages, warnings, and errors are sent to the log file.
Important: If you have customized the Logback configuration or specified another logging framework, the settings for -loglevel and -logfile are ignored.
-port port_number Specifies the port number. If a port is specified on the command line, it overrides the port properties set in the wire listener configuration file. The default port is 27017.
-wait wait_time Specifies the amount of time, in seconds, to wait for any active sessions to complete before the wire listener is stopped. The default is 10 seconds. To force an immediate shutdown, set the wait_time to 0 seconds.
-version Prints the wire listener version.
-buildInformation Prints the wire listener build information.

Examples

In this example, the wire listener is started and the log is specified as $INFORMIXDIR/jsonListener.log:
java -cp $INFORMIXDIR/bin/jsonListener.jar com.ibm.nosql.informix.server.ListenerCLI
-config $INFORMIXDIR/etc/jsonListener.properties
-logfile $INFORMIXDIR/jsonListener.log -start
In this example, the wire listener is started with the log level set to debug:
java -cp $INFORMIXDIR/bin/jsonListener.jar com.ibm.nosql.informix.server.ListenerCLI
-config $INFORMIXDIR/etc/jsonListener.properties
–loglevel debug -start
In this example, port 6388 is specified:
java –cp $INFORMIXDIR/bin/jsonListener.jar com.ibm.nosql.informix.server.ListenerCLI
-config $INFORMIXDIR/etc/jsonListener.properties
–port 6388 -start
In this example, the wire listener is paused 10 seconds before the wire listener is stopped:
java –cp $INFORMIXDIR/bin/jsonListener.jar com.ibm.nosql.informix.server.ListenerCLI
-config $INFORMIXDIR/etc/jsonListener.properties
–wait 10 -stop
In this example, the wire listener version is printed:
java –cp $INFORMIXDIR/bin/jsonListener.jar com.ibm.nosql.informix.server.ListenerCLI
–version
In this example, the wire listener build information is printed:
java –cp $INFORMIXDIR/bin/jsonListener.jar com.ibm.nosql.informix.server.ListenerCLI
–buildInformation

Copyright© 2019 HCL Technologies Limited