Wire listener command line options
You can use command line options to control the wire listener.
Syntax
>>-java-- -jar pathToListener---- -config properties_file-+----->
>--+- -start-+---------------------+-+-------------------------+-+-->
| '- -logfile--log_file-' | .-27017-------. | |
| '- -port--+-port_number-+-' |
'- -stop-+-----------------------+-------------------------------'
| .-10--------. |
'- -wait--+-wait_time-+-'
>--+-----------+--+--------------------+-----------------------><
'- -version-' '- -buildInformation-'
Argument | Purpose |
---|---|
-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: From version 2.0.1.1 and newer -loglevel
and -logfile command line options are ignored. Use the XML
configuration file to specify log levels and log file locations. |
-loglevel | Specifies the logging level.
Important: From version 2.0.1.1 and newer -loglevel
and -logfile command line options are ignored. Use the XML
configuration file to specify log levels and log file locations. |
-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
:
java -jar onedb-wire-listener.jar -config onedb-wire-listener.properties -start
In this example, port 6388 is
specified:
java -jar onedb-wire-listener.jar
-config onedb-wire-listener.properties
-port 6388 -start
In this example, the wire listener is paused 10 seconds before the wire listener is
stopped:
java -jar onedb-wire-listener.jar
-config onedb-wire-listener.properties
-wait 10 -stop
In this example, the wire listener version is
printed:
java -jar onedb-wire-listener.jar -version
In this example, the wire listener build information is
printed:
java -jar onedb-wire-listener.jar -buildInformation