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

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

Ключ

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

Логированием работы Traffic Monitor записывает лог базы данных PostgreSQL в файл /u01/postgres/pg_log/postgresql.log. Кроме того, Система формирует логи о заданиях, выполняемых с помощью pgAgent, и сохраняет их в файл /u01/postgres/pg_log/pgagent-15.log.

Логированием заданий СУБД PostgreSQL в Traffic Monitor управляет скрипт , который позволяет устанавливать /opt/iw/tm5/csw/postgres/scripts/sys_log/sys_log.sh, который позволяет устанавливать уровень логирования и выгружать данные лога в CSV-файл. При работе скрипта используются настройки текущего конфигурационного файла /opt/iw/tm5/csw/database.conf. Запускать скрипт следует из директории его местонахождения: 

Скрипт поддерживает следующие команды:

  • Чтобы установить уровень логирования, выполните команду:
    /opt/iw/tm5/csw/postgres/scripts/sys_log/sys_log.sh
.  

Скрипт поддерживает следующие команды:

  • чтобы установить уровень логирования: level <уровень>
    где <уровень> может принимать значения: debug, info, warning, error - выполните команду:
    level 
    при этом выводится текущий уровень логирования при запуске без второго параметра;
    чтобы выгрузить тело лога (представление V_SYS_LOG) в CSV-файл warning или error.
    Если выполнить команду без указания уровня, то отобразится текущий уровень логирования;
  • Чтобы выгрузить архив лога, выполните команду:
    /opt/iw/tm5/csw/postgres/scripts/sys_log/sys_log.sh export
    при При этом, если требуется,  можно можно задать количество выгружаемых строк: 
    export <кол-во строк>
    /opt/iw/tm5/csw/postgres/scripts/sys_log/sys_log.sh export <количество строк>
    При экспорте файл с логами сохраняется с именем вида iwtm_sys_log_<гггг-мм-дд_чч-мм-сс>.csv.gz в текущей директории. 

О хранении логов на диске см. "Рoтация логов базы данных".

Sv translation
languageen

Traffic Monitor saves logs of PostgreSQL database to /u01/postgres/pg_log/postgresql.log file. The System also generates logs on tasks running with pgAgent and saves them to /u01/postgres/pg_log/pgagent-15.log file.

PostgreSQL DBMS operation in Traffic Monitor is logged with a script. This script allows you to set the logging level and export log data to a CSV file.  The The script uses settings of the current configuration file:   /opt/iw/tm5/csw/database.conf. You should run the script from the directory where it is stored: 

The script supports the following commands:

  • To set the logging level, run the command:
    /opt/iw/tm5/csw/postgres/scripts/sys_log/sys_log.sh
.  

The script supports the following commands:

  • To set the logging level: debug, info, warning, error - run the command:
    level 
    If you do not specify the second parameterlevel <level_value>
    where <level_value> can be debug, info, warning or error.
    If you run the command without specifying the level value, the current logging level is will be displayed.
  • To export the log body (V_SYS_LOG representation) to a CSV filearchive, run the command:
    /opt/iw/tm5/csw/postgres/scripts/sys_log/sys_log.sh export
    If necessary, you can set the number of lines to be exported: 
    export <кол-во строк>/opt/iw/tm5/csw/postgres/scripts/sys_log/sys_log.sh export <number_of_lines>
    The exported file gets a name of iwtm_sys_log_<yyyy-mm-dd_hh-mm-ss>.csv.gz format and is saved to the current directory. 

On how logs are stored on the disk, see "Рoтация логов базы данных".