The list of parameters from the command line can be obtained with the command:
> bin\SGCom.bat -h
SGCom uses command line parameters primarily to connect to the metering central and introduce itself. The following parameters are therefore mandatory:



Other parameters can be used to tune some operational properties of the application:


In addition to the parameters directly for SGCom, it is also possible to define parameters for the JVM Java Virtual Machine - the runtime environment in which SGCom is executed. They are specified in the JAVA_OPTS environment variable separated by spaces in the form:
set JAVA_OPTS=-Xmx1024m –Xms128m
The complete list of parameters is given by the JVM version used (see the relevant documentation), but in practice these were used:



Parameters for creating LOG


SGCom uses java.util.logging subsystem to create LOG. The parameters for this subsystem are defined in the "properties" file, which is referenced by the -Djava.util.logging.config.file parameter. In this file, it is possible to set the level of detail that will be recorded in the LOG for each subsystem of the application separately. The file also defines where the LOG should be stored.
Note: It is recommended that if multiple named instances of SGCom are launched from the same directory, a separate file with LOG parameters is defined for each instance.
The file structure is described in detail in the relevant documentation See documentation https://docs.oracle.com/javase/8/docs/api/java/util/logging/package-summary.html, here we will limit ourselves to the most used properties.



handlers = java.util.logging.FileHandler, java.util.logging.ConsoleHandler



java.util.logging.FileHandler.level = ALL
java.util.logging.ConsoleHandler.level = FINE



java.util.logging.FileHandler.pattern = log/SGCom(%u).%g.log
java.util.logging.FileHandler.append = false



java.util.logging.FileHandler.limit = 8388608
java.util.logging.FileHandler.count = 6



.level = INFO
sk.ipesoft.level = ALL
sk.ipesoft.sgcom.hdlc.level = FINER

In the case of debugging, the level can be defined separately for the following subsystems: