Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.
Комментарий: Published by Scroll Versions from space RED and version 7.1
Sv translation
languageru

Файл конфигурации qmover_server.conf

Scroll Table Layout
widths60%,40%

СодержимоеОписание
{
 
    "Clients": [
Массив пар "IP/Queue" (агент/директория)
        {
 
            "IP": "127.0.0.1", 
IP-адрес обслуживаемого агента
            "Queue": "queue/db",
Соответствующая данному демону директория очередей объекта. Если указать путь "/dev/null", то:
    • если очередь входящая, то будет возвращаться пустой элемент;
    • если очередь выходящая, то обработанный элемент будет удаляться после обработки
            "TCPKeepaliveProbing": {
Секция мониторинга активности соединения
               "ProbesIntervalSec": 

...

30,
Интервал между отправкой keep alive пакетов (в секундах).
               "ProbesCount": 

...

10,
Количество отправляемых keep alive пакетов
               "StartProbingInSec": 

...

300,

Время, в течении которого нет активности по соединению и по истечении которого начинается отправка keep alive пакетов (в секундах). Если ни на один keep alive пакет не придет ответ, текущее соединение будет сброшено.

В случае, если версия ядра системы поддерживает опцию TCP_USER_TIMEOUT для сокета, данный таймауту будет установлено значение, равное (StartProbingInSec + ProbesIntervalSec * ProbesCount). С такой настройкой, даже при наличии активности (т.е. попытки передачи данных в уже закрытое с другой стороны соединение), соединение будет закрыто через время, рассчитанное по указанной формуле.

               "Enabled": true
Включена или выключена опция
             }
 
        }
 
    ], 
 
    "DebugBreak": false, 
Посылать ли SIGTRAP (SIGBREAK на Windows) при обработке любого исключения. Служит для отладки
    "Logging": {...},
см. Общая секция Logging
    "NookDir": "/opt/iw/tm5", 

В секции указывается рабочий каталог модуля. По умолчанию – /opt/iw/tm5.

    "Port": 16888, 
Порт сервера. По умолчанию: 16888
    "UnsafeSignalHandlers":false
Поддержка работы с необрабатываемыми сигналами. По умолчанию выключена (false). При установке значения true позволяется устанавливать в коде обработчики "небезопасных" сигналов (например, SIGSEVG). Добавлять, включать/выключать данную настройку не рекомендуется без предварительной консультации с разработчиками.
}
 

Unit-файл iw_qmover_server.service 

Scroll Table Layout
widths50%, 50%

Код
Описание

[Unit]

Раздел для определения метаданных демона и настройки его взаимодействия с другими демонами
Description=InfoWatch Traffic Monitor Queue Mover Server

Название демона

After=network-online.service iwtm-consul.service Демоны, которые будут запущены до запуска текущего демона
  
[Service]Раздел настройки запуска демона

Type=simple

Тип запуска демона. simple - демон запускается и переходит в режим ожидания на консоли

PermissionsStartOnly=true

Запуск команд из ExecStartPre под пользователем root

ExecStartPre=/bin/bash /opt/iw/tm5/bin/check_coredumps.sh -d iw_qmover_server

Полный путь и аргументы команды, которые должны быть выполнены до запуска основного процесса

ExecStart=/opt/iw/tm5/bin/iw_qmover_server -p /opt/iw/tm5/etc

Полный путь и аргументы команды, которая должна быть выполнена для запуска демона. Запускается от пользователя, указанного в User

ExecStop=/bin/kill -s SIGQUIT $MAINPID

Команда для остановки демона. Если не указано, процесс будет немедленно уничтожен, когда демон будет остановлен. Запускается от пользователя, указанного в User

ExecReload=/bin/kill -s SIGHUP $MAINPID

Команда для перезагрузки конфигурации демона, если она доступна. Запускается от пользователя, указанного в User

Restart=on-failure

Команда для рестарта демона, если он остановится или упадет. Значение on-failure означает, что демон будет перезапускаться, если он остановился с ненулевым кодом возврата или был завершен по сигналу (kill <pid_демона>)

RestartSec=5

Время ожидания перед попыткой перезапуска демона

RestartPreventExitStatus=SIGKILL

Команда, по которой можно принудительно завершить работу демона

TimeoutStopSec=0

Время, в течение которого система будет ждать остановки демона, прежде чем пометить его недоступный или завершенный принудительно

User=iwtm

Имя пользователя, от которого осуществляется запуск демона

Group=iwtm

Имя группы пользователя

LimitNOFILE=32768

Максимальное количество открытых файлов

LimitFSIZE=infinity

Максимальный размер файла (КБ). infinity - без ограничений

LimitNPROC=65536

Максимальное количество процессов

LimitCORE=infinity

Ограничение на размер coredump-файла (КБ)

LimitMEMLOCK=infinity

Максимальное заблокированное в памяти адресное пространство (КБ)

 

 
  

[Install]

Определение поведения демона, если он включен или отключен

WantedBy=multi-user.target

Запускать этот демон, когда система грузится в multi-user режиме
Sv translation
languageen

qmover_server.conf configuration file

Scroll Table Layout
widths65%,35%

ContentDescription
{
 
    "Clients": [
Pairs massive "IP/Queue" (agent/directory).
        {
 
            "IP": "127.0.0.1", 
IP-address of the maintained agent.
            "Queue": "queue/db"

Object queues directory, appropriate to this particular daemon. If " /dev/null " path is specified, then:

    • for the input queue, an element will be returned empty;
    • for the output queue, an element will be removed after processing
            "TCPKeepaliveProbing": {
Section for monitoring connection activity
              "ProbesIntervalSec": 30,
The interval between sending keepalive packets (in seconds)
              "ProbesCount": 10,
The number of keepalive packets to be sent
              "StartProbingInSec": 300,
The time during which the connection is inactive (in seconds). After this time, the sending of keepalive packets starts. If no keep alive packets receive a response, the current connection will be dropped.

If the system kernel version supports the TCP_USER_TIMEOUT option for the socket, the timeout is set equal to StartProbingInSec + ProbesIntervalSec * ProbesCount. With this option, even in the case of activity (attempts to transfer data to a connection already closed on the other side), the connection will be closed after the time calculated by the formula.

              "Enabled": true
Whether the option is enabled
            }
 
        }
 
    ], 
 
    "DebugBreak": false, 
If SIGTRAP should be sent (SIGBREAK to Windows) while any exception handling. Used for debugging purposes.
    "Logging": {...},
see General section Logging
    "NookDir": "/opt/iw/tm5", 

Module working catalogue is specified in the section. By default – /opt/iw/tm5.

    "Port": 16888, 
Server port. By default: 16888
    "UnsafeHandlers":false
Unhandled signals support. Disabled by default (false). Once true is set, it is allowed to use unsafe handlers in code (e.g. SIGSEVG). Adding, enabling/disabling this parameter is not recommended without consultation with developers.
}
 

iw_qmover_server.service unit file

Scroll Table Layout
widths50%, 50%

Code
Description

[Unit]

A section where the daemon metadata is determined and interaction settings with other daemons are specified
Description=InfoWatch Traffic Monitor Queue Mover Server

Daemon name

After=network-online.service iwtm-consul.service Daemons that will be started before the current one
  
[Service]A section where the daemon start settings are specified

Type=simple

Daemon start type. simple - the daemon is started and goes into standby on the console

PermissionsStartOnly=true

Running commands from ExecStartPre under root

ExecStartPre=/bin/bash /opt/iw/tm5/bin/check_coredumps.sh -d iw_qmover_server

The full path and arguments of the command that should be executed before the main process is started

ExecStart=/opt/iw/tm5/bin/iw_qmover_server -p /opt/iw/tm5/etc

The full path and command arguments that should be executed before starting the daemon. The command is run under user specified in the User field

ExecStop=/bin/kill -s SIGQUIT $MAINPID

A command to stop the daemon. If the command is not specified, the process will be killed once the daemon is stopped. The command is run under user specified in the User field

ExecReload=/bin/kill -s SIGHUP $MAINPID

A command that reloads the daemon configuration if it is available. The command is run under user specified in the User field

Restart=on-failure

A command that restarts the daemon when it stops or crashes. The on-failure value indicates that the daemon will be restarted if it has stopped with a non-zero return code or was ended by signal (kill <daemon_pid>)

RestartSec=5

A timeout before attempting to restart the daemon

RestartPreventExitStatus=SIGKILL

A command that forcibly ends the daemon operation

TimeoutStopSec=0

The time during which the system waits for the signal to stop before marking the process as unavailable or terminated

User=iwtm

The name of the user under whose account the daemon is started

Group=iwtm

Name of the user group

LimitNOFILE=32768

The maximum number of open files

LimitFSIZE=infinity

The maximum size of a file (KB). The infinity value means that the size is unlimited

LimitNPROC=65536

The maximum number of processes

LimitCORE=infinity

Limit for core dump size (KB)

LimitMEMLOCK=infinity

The maximum size of memory locked address space (KB)

 

 
  

[Install]

Defines the behavior of a daemon when it is enabled/disabled

WantedBy=multi-user.target

Start the daemon when the system is loaded in multi-user mode