Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.


Zoznam parametrov z príkazového riadku je možné získať príkazomThe list of parameters from the command line can be obtained with the command:
> bin\SGCom.bat -h
Program SGCom používa parametre z príkazového riadku predovšetkým na to, aby sa dokázal pripojiť k centrále a predstaviť sa. Nasledujúce parametre sú preto povinnéSGCom uses command line parameters primarily to connect to the metering central and introduce itself. The following parameters are therefore mandatory:


  • -c <connectionString>adresa, na ktorej počúva proces the address where the D2Connector.exe na príchádzajúce JAPI spojenia. Ak je JAPI spojenie šifrované, za bodkočiarkou sa nachádza cesta k súboru s certifikátom. Ak je využitá redundancia, parameter je možné zadať viackrát a vymenovať tak všetky body pripojenia. Príklady hodnoty parametraprocess listens for incoming JAPI connections. If the JAPI connection is encrypted, the path to the certificate file is after the semicolon.  If redundancy is used, the parameter can be specified multiple times to enumerate all connection points. Parameter value examples
    •  server.domain.sk:3120
    •  172.16.1.3:3121
    •  srvapp120v:3120;certifikatcertificate.crt
  • -w <applicationName>meno konkrétne inštancie SGCom-u, ktorým sa predstaví do bodu prvého pripojeniathe name of the specific instance of SGCom with which it will introduce itself to the point of first connection.
  • -u <userName>meno D2000 používateľského účtu, s ktorým sa SGCom pokúsi prihlásiťthe name of the D2000 user account with which SGCom will attempt to log in.
  • -p <password>heslo k používateľskému menu. Prihlásenie sa bez hesla nie je podporenépassword for the specified username. Logging in without a password is not supported.
  • -f <firstContact>adresa miesta prvého kontaktu. Adresa sa skladá z mena D2000 Event-u, D2000 procesu a voliteľne z čísla inštancie D2000 eventu. Príkladyaddress of the first contact. The address consists of the D2000 Event name, the D2000 process, and optionally the D2000 event instance number. Examples:
    •  E.FirstContact@SELF.EVH
    •  E.FirstContact[1]@SGC.EVH


Ďalšími parametrami je možné vyladiť niektoré prevádzkové vlastnosti aplikácieOther parameters can be used to tune some operational properties of the application:

  • -d <seconds>dĺžka časového intervalu, počas ktorého logické zariadenie zotrváva v stave HardError. Štandardne je interval dlhý 300 sekúndthe length of the time interval during which the logical device remains in the HardError state. By default, the interval is 300 seconds long.
  • -k <days>dĺžka časového intervalu, po ktorom sú dáta z DataStorage automaticky odstránené, aj keď neboli odovzdané do aplikácie. Štandardne je interval dlhý 90 dníthe length of the time interval after which data is automatically deleted from DataStorage, even if it has not been transferred to the application. By default, the interval is 90 days long.
  • -n <seconds>dĺžka časového intervalu, ktorý sa čaká na zadanie novej úlohy pred uzatvorením spojenia k logickému zariadeniu. Štandardne sa čaká 10 sekúnd.the length of time interval that SGCom waits for a new task to be entered before closing the connection to the logical device. By default, the interval is 10 seconds.
  • -r <retryLimit> – the maximum number of consecutive failed attempts to connect to a logical device after which the device is declared disconnected - a HardError condition is raised. By default, the attempt is repeated a maximum of 3 times-r <retryLimit> – maximálny počet po sebe nasledujúcich neúspešných pokusov o pripojenie sa k logickému zariadeniu, po ktorých je zariadenie prehlásené za odpojené – navodený stav HardError. Štandardne sa pokus opakuje maximálne 3-krát.
  • -s <seconds>dĺžka ochranného časového intervalu, keď po zrušení spojenia nie je možné používať danú komunikačnú linku. Štandardne je interval nastavený na 20 sekúndthe length of the protection time interval, when it is not possible to use the given communication line after the connection is canceled. By default, the interval is set to 20 seconds.
  • -t <threads>maximálny počet vlákien v ThreadPool-e, ktoré vykonávajú úlohy na logických zariadeniach. Štandardne je limit nastavený na 512 vlákien.-cdt <seconds> – dĺžka časového intervalu, na ktorý je komunikácia na linke zastavená, ak dôjde k opakovanému zlyhaniu o nadviazanie spojenia s tým istým zariadenímthe maximum number of threads in the ThreadPool (threadsexecute tasks on logical devices). By default, the limit is set to 512 threads.
  • -cdt <seconds> – the length of the time interval for which communication on the line is stopped if there is a repeated failure to establish a connection with the same device.
  • -hri<seconds> – HDLC reconnect interval - interval pre opakovanie for HDLC frame repetition.


Okrem parametrov priamo pre SGCom je možné definovať aj parametre pre In addition to the parameters directly for SGCom, it is also possible to define parameters for the JVM Java Virtual Machine – behové prostredie, v ktorom je SGCom vykonávaný.. Uvádzajú sa v premennej prostredia JAVA_OPTS oddelené medzerami vo forme- 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
Kompletný zoznam parametrov je daný použitou verziou JVM (viď. príslušnú dokumentáciu), ale v praxi boli použitéThe complete list of parameters is given by the JVM version used (see the relevant documentation), but in practice these were used:


  • -Djava.util.logging.config.file=<filename>nastavuje cestu k súboru s parametrami pre vytváranie LOG-u (protokolu o vykonávanísets the path to the parameter file for creating the LOG (execution log).
  • -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=numožňuje pripojenie sa k procesu cez allows connecting to the process via the java debugger na on TCP port 8787.

Parametre pre vytváranie LOG-u


Parameters for creating LOG


SGCom uses SGCom používa na vytváranie LOG-u subsystém java.util.logging . Parametre pre tento subsystém sú definované v „properties" súbore, na ktorý odkazuje parameter 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. V tomto súbore je možné nastaviť úroveň podrobností, ktoré budú do LOG-u zaznamenané a to pre každý subsystém aplikácie zvlášť. Taktiež sa v súbore definuje, kam má byť LOG ukladaný.
Poznámka: Je odporúčané, ak sa z jedného adresára spúšťa viacero inštancií SGCom-u odlíšených menom, aby bol pre každú inštanciu definovaný samostatný súbor s parametrami pre LOG-ovanie.
Štruktúra súboru je podrobne popísaná v príslušnej dokumentácii Viď. dokumentáciu 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, tu sa obmedzíme na najpoužívanejšie vlastnosti.here we will limit ourselves to the most used properties.


  • Definition of outputs - Output to file and consoleDefinícia výstupov – výstup do súboru a na konzolu


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


  • Úrovne závažnosti správ od najzávažnejšej súThe message severity levels from the most severe are: OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST, ALL.Definovanie minimálnej úrovne závažnosti, ktorú handler
  • publikujeDefining the minimum severity level that the handler publishes


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


  • Definovanie názvu súboru, do ktorého je LOG zaznamenaný. V uvedenom príklade je súbor uložený do adresára log/ a jeho názov má tvar Defining the name of the file to which the LOG is recorded. In the given example, the file is stored in the log/ directory and its name is of the form SGom(0).1.log. Číslo v zátvorke je takmer vždy 0, používa sa iba v prípade konfliktu (ak by sa dve inštancie snažili zapisovať do rovnakého súboru). Číslo medzi bodkami označuje generáciu súboru – Program pri štarte vždy založí nový súbor a predošlé premenuje tak, že im zvýši číslo generácieThe number in parentheses is almost always 0, only used in case of a conflict (if two instances are trying to write to the same file). The number between the dots indicates the generation of the file - the program always creates a new file at startup and renames the previous ones by increasing their generation number.


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


  • Obmedzenie veľkosti LOG súboru a počtu archivovaných generácií – v uvedenom príklade je limit stanovený na 8 MB a 6 generáciíLimiting the size of the LOG file and the number of generations archived - in the example given, the limit is set to 8 MB and 6 generations.


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


  • Defining the message logging level for individual subsystems of the application. Fully qualified identifiers of classes or their hierarchically superior units are used to name individual parts. The defined level applies to all hierarchically lower units if no own level of detail is defined for any subtree. In the given example:
    • The INFO severity level is set globally.
    • The ALL level applies to all classes included in sk.ipesoft.
    • The FINER level applies to the
    Definovanie úrovne zaznamenávania správ pre jednotlivé subsystémy aplikácie. Na pomenovanie jednotlivých častí sa používajú plne kvalifikované identifikátory tried alebo ich hierarchicky nadradených celkov. Definovaná úroveň platí na všetky hierarchicky nižšie celky, ak pre niektorý podstrom nie je definovaná vlastná úroveň podrobnosti. V uvedenom príklade plati:
    •  Globálne je nastavená úroveň závažnosti INFO.
    •  Pre všetky triedy zaradené do sk.ipesoft platí úroveň ALL.
    •  Pre subsystém sk.ipesoft.sgcom.hdlc platí úroveň FINER subsystem.


.level = INFO
sk.ipesoft.level = ALL
sk.ipesoft.sgcom.hdlc.level = FINER
V prípade ladenia môže byť definovaná úroveň zvlášť pre tieto subsystémy
In the case of debugging, the level can be defined separately for the following subsystems:


  • sk.ipesoft.d2000.d2japi.connector.Connector –sledovanie – monitoring of JAPI komunikáciecommunication
  • sk.ipesoft.sgcom.configsledovanie konfigurácieconfiguration monitoring
  • sk.ipesoft.sgcom.dataStorage – sledovanie –monitoring of DataStorage-u
  • sk.ipesoft.sgcom.hdlcsledovanie monitoring of HDLC komunikáciecommunication
  • sk.ipesoft.sgcom.iec21sledovanie monitoring of IEC 62056-21 komunikáciecommunication
  • sk.ipesoft.sgcom.serialsledovanie sériovej komunikáciemonitoring of serial communication
  • sk.ipesoft.sgcom.udpsledovanie monitoring of UDP-ADDAX komunikáciecommunication
  • sk.ipesoft.sgcom.jdlmssledovanie obslužnej knižnice nad monitoring of service library over DLMS (nie priamo not directly DLMS komunikáciacommunication)
  • sk.ipesoft.sgcom.production.TaskExecutorImpl – sledovanie –monitoring of TaskExecutor-a
  • sk.ipesoft.sgcom.production.ImmediateCommandListenerImplsledovanie okamžitých úlohmonitoring of immediate tasks
  • sk.ipesoft.sgcom.production.ProcessStateDispatcherImplsledovanie notifikácii o stavemonitoring of status notifications