Technological log 1s 8.3 processing does not start. Technology magazine

Colleagues, we continue the series of articles on the technology magazine.

Today we will show the practice of analyzing TJ logs.

Other articles in the series " Technology magazine»:

Analysis of technology logs

What will you learn from this article?

  • Let's take a closer look at the logs in 1C: Enterprise 8
  • Let's study the log format in detail Technology magazine
  • Let's analyze the example of a log with recorded data

Let's see what happens if we create a file logcfg.xml with the above structure and put it in the directory "C:\Program Files\1Cv82\conf"

Let's wait 60 seconds and open the directory "C:\1C_Info\Logs", because we specified it in the 3rd line of the file logcfg.

If directory 1C_Info is not on the disk, then the 1C server will try to create it, but there is a risk that the user under which the 1C service is running will not have rights. Therefore, it is recommended to create directories for logs manually and check if the 1C server has permissions to write to this directory.

As a result, we see 3 subdirectories in the directory.

Each cluster process has created a directory that contains logs only this process, and since I only have 3 processes, so there are also 3 directories.

The catalog is created according to a template ProcessName_PIDProcess. PID needed to distinguish between processes with the same name.

The log file is named after a wildcard YYMMDDHH.log.

If the log is older than the number of hours specified in the parameter history file log cfg, then it is automatically removed by the platform.

Let's take a closer look at the technology log format.

The event is written to the log only after it has completed, because. it is necessary to record the duration of the event.

The log line has the format:

Mm:ss.tttt-d,<ИмяСобытия>, <Уровень>, <Свойства>

mm is the number of the minute in the current hour.

ss is the number of the second in the current minute.

tttt– number of the ten-thousandth part of the current ̆ second, for 8.3 the number of the millionth part is displayed here.

d is the duration of the event in ten-thousandths of a second, for 8.3 in parts per million.

<ИмяСобытия> – name of the event.

<Уровень> – the level of the event on the stack of the current thread.

<Свойства> - event properties separated by commas, property values ​​are separated by a sign «=» .

Let's take an example.

There is a log with the following content:

00:16 are the minutes and seconds of the end of the event. The date and hour of the event can be taken from the name of the log file. The event ended on April 6, 2015 at 11:00 16 seconds. 8640 - for 8.2 it is ten-thousandths of a second. And for 8.3 - millionths of a second of the moment of completion of the event. 1 is the duration of the event. In 8.2, the duration is given in ten-thousandths of a second, in 8.3, in millionths of a second. If you need to set a filter for duration, then you can use the property name "Duration". DBMSSQL is the name of the event. In this case, the execution of MS SQL Server DBMS instructions. 3 – event level. Next are the properties of the event DBMSSQL, while each event has its own set of properties. A complete list of properties for all events can be found in the administrator's guide. Here, we'll take a closer look at the properties for the current event only. process– Describes the process for which this log is being written. All events have this property. In my case, the rphost process log is written. P:processName- the name of the 1C infobase. The event was generated in a database called Deadlock. T:clientID- connection identifier with the client via TCP. T:applicationName– identifier of the client program. Those. who exactly triggered the event, in my case it is a background job. T:connectID– number of the connection to the infobase. SessionID– session number assigned to the current thread. If no session is assigned to the current thread, then the property is not added. Usr– name of the infobase user under which this flow is executed. If the user is not defined, the DefUser value is substituted. Trans– shows whether the transaction is open at the time of the event start or not. 1 - open, 0 - not. dbpid- connection number of the 1C server with the database server. SQL– the text of the SQL statement. Most often, this contains the text of an SQL query with parameters. Rows is the number of rows returned by the query. RowsAffected is the number of rows that the query changed in the database. Context- which line of code in 1C language generated this event. Probably the most interesting event for us.

Burmistrov Andrey

In the following articles, we will consider "Events", as well as their filtering in TJ.

In the meantime, fix the received material on your test information base:)

Colleagues, we are starting a series of articles on a technology magazine.

In this series, we'll take a look at the practice of using a useful tool to investigate performance and stability issues. 1C:Enterprise- technology magazine.

Not all experts know about it, and only a few know how to use it correctly. Let's try to fix it :)

Description and inclusion of the technological log

What will you learn from this article?

  • Description and purpose of the tool Technology magazine
  • How to turn it on Technology magazine in 1C:Enterprise 8
  • The principle of generating and saving logs and dumps

Description of TJ

TJ designed to investigate errors, analyze and diagnose various problems in the platform 1C:Enterprise.

With the help of TJ, you can find out which requests are slow and where they are called from, when executing which code the server worker processes “fall”, where the memory “leaks” and much, much more.

All platform performance analysis tools use TJ to obtain information. If you wish and thoroughly study the issue with the help of TJ, you can write your own performance analysis tool.

TJ can be collected both for 1C server processes and for client applications. Accordingly, the set of events that can be recorded in the TJ will be different.

Client logs and dumps are extremely rarely of interest, so in this article we will consider TJ exclusively from the server point of view. However, everything written here also applies to client logs.

With the help of TJ, you can collect logs and configure the generation of dumps in case of an abnormal termination of the process.

Logs are files with the extension .log where information is stored in text form.

Dumps is a file with the extension .mdmp, which contains the content random access memory process at the moment of "fall".
A dump can be essential for investigating platform stability issues. We cannot analyze dumps on our own, because we don't have platform source code, but we can send them to technical support or to a partner forum and get a solution to our problem.

Inclusion of TJ

By default, the technology log is enabled and works, but collects a very limited amount of data.

The minimum amount of data means 2 things:

1) Formation of dumps minimum size in the event of an emergency shutdown of the 1C cluster processes ( ragent, rmngr or rphost).

By default, the dump is created in the directory:

%USERPROFILE%\Local Settings\Application Data\1C\1Cv82\dumps

If you are using Windows Vista and above, then the directory will be used:

%LOCALAPPDATA%\1C\1Cv82\dumps

For 8.3 instead of directory 1Cv82 used 1Cv8.

2) For 8.3, the minimum TJ includes the formation of logs with one event SYSTEM with level error.

Logs are stored in the directory:

%USERPROFILE%\Local Settings\Application Data\1C\1Cv8\logs

For Windows Vista and older, the directory is:

%LOCALAPPDATA%\1C\1Cv8\logs

These logs will be kept for 24 hours by default, after which the platform will delete log files that exceed this threshold.

Most often, information from the TJ by default is not enough, and you need to configure it manually.

To fine-tune the TJ, you need to create a file logcfg.xml with a certain structure in a certain place.

This file must be placed in the directory:

C:\Program Files\1Cv82\conf (for 8.3 1Cv8 directory)

In this case, the settings TJ will apply to all versions 1C that are installed on this computer and for all users. This is the most commonly used option and is the one we recommend.

With settings MCC, cloud performance monitoring services and other tools where you need to specify the path to log cfg, it is also better to use this directory, otherwise when updating the platform or changing the username under which the server service is running 1C, the described tools will stop working and you will have to change the setting.

However, there are other options, although they are used much less often. I will describe only what you are most likely to need.

To customize TJ for only one version of the platform, we place logcfg.xml in directory:

C:\Program Files\1Cv82\8.2.19.106\bin\conf

Where 8.2.19.106 is the version number you need.

It is extremely rare, but still, it may be necessary to configure the TJ separately for each user under which the server service is running 1C.

Then we place log cfg in directory:

%USERPROFILE%\Local Settings\Application Data\1C\1Cv82\Conf

For Windows Vista and older:

%LOCALAPPDATA%\1C\1Cv82\Conf

This may be required if you have, for example, 1 server service 1C used as working, and the second for debugging. If necessary, you can run services under different users and collect TJ only for one of them, so as not to load the second server and not collect unnecessary data in the logs, or make your own settings for each of the services TJ.

Settings from logcfg are not read immediately, but every 60 seconds, and each of the cluster processes reads the settings file independently of other processes. For example, the logs of the rmngr process may appear first, and only after 45 seconds the logs of rphost.

To turn off TJ just delete or rename the file logcfg.xml.

Burmistrov Andrey

In the following articles, we will consider the nuances of setting TJ and practice of use.

In the meantime, fix the received material on your test information base :)

- executable code 1C: Enterprise 8;
- Transact-SQL code for the DBMS;
— interactive actions of users;
— error messages;
- memory leaks.

In case of a crash, the log allows you to make a memory dump and a copy of the screen for transfer to developers.

To enable the technological log, you must:
Create a logcfg.xml file in the C:\Program Files (x86)\1cv82\8.2.15.301\bin\conf folder (the path is the 1C Enterprise directory) on the 1C Enterprise server.
After that, you need to write the paths to the created folders in the logcfg.xml file (where the Specified path 1 is the path to the logs, and the Specified path 2 is the path to the dumps):

Here is an example settings from my server:























After completing these steps, the 1cv8 application will automatically start saving system information about all errors that have occurred in the system in these directories.
After running the analysis, the process log can be disabled by deleting or renaming the logcfg.xml file.
It is assumed that on computers where this log will be enabled, files can take up a fairly large amount of disk space (relatively, of course). Therefore, I recommend specifying paths to disks with a large amount of free space.
1) To successfully create logs, you need to create directories for logs (for example "D:\1Clog") and dumps (for example "D:\1Cdumps"), it is better to create them not on the system drive.
2) These TJ directories must have the following permissions:
— full rights to the technological journal catalog;
— rights to read the owner of the technological log directory.
Note. If you still do not write TJ, then give everyone the rights to this folder (temporarily, to make sure that things are in rights).
3) There should be no extraneous files in the technological log directory. A directory that contains extraneous files will not allow the creation of a log (logs).
4) Do not store dumps and logs together, because after the specified interval (1 hour by default) the contents are completely erased and you will lose the dumps
It is better to set up the TJ (with the help of filters - logcfg.xml tags) only for the events under investigation, do not collect the rest, otherwise you will catch "lack of disk space" and brakes in the server's speed.
1) It's easier to set up filters using ITS processing. latest releases may be absent in the return line (each a new version adds new features, they are not reflected in processing). In this case, correct the logcfg.xml file by hand.
2) In order for the logs to stop being collected, it is enough to rename the file, there is no need to restart the server, the settings are recalculated every minute on the fly
3) configure logcfg.xml to filter events by a specific IB, you need to use "p: processName ="

With these settings, I collect information about:

exceptions, applications of the 1C: Enterprise 8.2 system, which are not normally processed and can cause the server process to crash or the client process connected to it.

    events that started but did not end at the time of the emergency.

    events related to the entire process and affecting the further performance of the process. For example: start, end, crash, etc.

    control actions of the server cluster administrator 1C:Enterprise 8.2

    events related to the increase in the amount of memory occupied by server processes (ragent, rmngr, rphost).

    events related to memory leaks, which can be caused by errors in the configuration code.

Examples of setting up a technological log

Technological log is off
If the logcfg.xml file is not present in the C:\Program Files\1cv81\bin directory, no production log is generated. If the logcfg.xml file is required for proper dump configuration, then it should not contain any log element. The following example determines whether to build a complete dump of an application if it crashes. Dumps are placed in the directory: C:\Program Files\1cv81\bin\dumps.

< config xmlns="http://v8.1c.ru/v8/tech-log">
< dump location="C:\Program Files\1cv81\bin\dumps" create="l" type="3"/>
< /config>

Complete technological journal
The configuration file below defines the output to the process log of all events along with all properties. The log will be kept for a week (168 hours). The amount of information displayed in this case will be very large, however, it can be useful in the analysis of complex emergency situations. This configuration is recommended for use during the testing phase and when investigating bugs.
The code

< config xmlns="http://v8.1c.ru/v8/tech-log">
< log location="C:\Program Files\1cv81\bin\logs" history="168"> < event>
< ne property="Name" value="" /> < /event>
< property name="al1"> < /property>
< /log>
< /config>

Calls to the DBMS
The following configuration file defines that the technological log will contain only 1C:Enterprise calls to the DBMS, as well as information about error situations. The amount of information displayed is less than with a full technological log, but can also be very large.

< config xmlns="http://v8.1c.ru/v8/tech-log">
< log location="C:\Program Files\1cv81\bin\logs" history="168"> < event>
< eq propertу ="Name" va1ue="DBV8DBEng" /> < /event>
< event>
< eq propertу ="Name" va1ue="DBMSSQL"/> < /event>
< event>
< eq property="Name" value="DBPOSTGRS"/> < /event> < event>
< eq property="Name" value="DB2"/> < /event> < event>
< eq proper t у ="Name" va1ue="EXCP"/> < /event>
< property name="al1"> < /property>
< /log>
< /config>

Administrator actions and errors
This configuration file creates a small technological log that contains information about starting and shutting down applications, establishing and disconnecting connections to the 1C:Enterprise server cluster, actions of the cluster administrator, and error situations in 1C:Enterprise operation. In most cases, such a log is sufficient to investigate erroneous situations both in the configuration and in the 1C:Enterprise technology platform.

< config xmlns="http://v8.1c.ru/v8/tech-log">
< log location="C:\Program Files\1cv81\bin\logs" history="168"> < event>
< event> < eq property= Name" value= PR0C"/> < /event>
< event> < eq property= Name" value= SC0M"/> < /event>
< event> < eq property= Name" value= C0NN"/> < /event>
< event> < eq property= Name" value= EXCP"/> < /event>
< event> < eq property= Name" value= ADMIN"/> < /event>
< event> < eq property= Name" value= QERR"/> < /event>
< property name="all"> < /property>
< /log>
< /config>

Mistakes and long operations
Compared to the previous one, this configuration file adds all operations whose duration exceeds 10 seconds. This can be useful for detecting user actions that have been running for a long time, for example, in order to optimize them later. The duration of events is expressed in hundreds of microseconds.

< config xmlns="http://v8.1c.ru/v8/tech-log">
< log location="C:\Program Files\1cv81\bin\logs" history="168"> < event>
< event> < eq property= Name" value= PR0C"/> < /event>
< event> < eq property= Name" value= SC0M"/> < /event>
< event> < eq property= Name" value= C0NN"/> < /event>
< event> < eq property= Name" value= EXCP"/> < /event>
< event> < eq property= Name" value= ADMIN"/> < /event>
< event> < eq property= Name" value= QERR"/> < /event>
< event> < gt property= Duration" value="100000"/> < /event>
< property name="al1"> < /property>
< /log>
< /config>

I. The Technological Log (hereinafter referred to as TG) allows you to log all 1C:Enterprise events (or a part, using a filter), for example:
- executable code 1C:Enterprise 8.1;
- Transact-SQL code for DBMS;
- interactive actions of users,

error messages,

Memory leaks.
In case of a crash, the log allows you to make a memory dump and a copy of the screen for transfer to developers.

II. The log is configured using the logcfg.xml file in the program folder C:\Program Files\1cv81\bin\conf
1) To successfully create logs, you need to create directories for logs (for example C:\Program Files\1cv81\bin\logs) and dumps (for example C:\Program Files\1cv81\bin\dumps)

2) These TJ directories must have the following permissions:

Full rights to the technological journal catalog;

Read rights to the owner of the technology log directory.

Note. If you still do not write TJ, then give everyone the rights to this folder (temporarily, to make sure that things are in rights).

3) There should be no extraneous files in the technological log directory. A directory that contains extraneous files will not allow the creation of a log (logs).

4) Do not store dumps and logs together, because after the specified interval (1 hour by default) the contents are completely erased and you will lose the dumps

III. It is better to set up the TJ (with the help of filters - logcfg.xml tags) only for the events under investigation, do not collect the rest, otherwise you will catch "lack of disk space" and brakes in the server speed.

1) It is easier to set up filters using the processing with the ITS Setting the Technological Journal.epf, but remember that new features of the latest releases may not be available in the return (each new version adds new features, they are not reflected in the processing). In this case, correct the logcfg.xml file by hand.

2) In order for the logs to stop being collected, it is enough to rename the file, there is no need to restart the server, the settings are recalculated every minute on the fly

3) set up logcfg.xml to filter events by a certain IB, you need to use "p:processName="

4) http://users.v8.1c.ru/Adm1936.aspx - examples of settings

IV. It is clear that collecting logs is not enough, they still need to be processed to solve a specific problem.

1) Difficulties in reading TJ:

Requires a good understanding of system architecture

Query texts are registered in the internal language of 1C:Enterprise and in the DBMS language

2) Technology log files are stored in subdirectories. The name of each subdirectory of the technological log of one process will be:<ИмяПроцесса>_<ИдентификаторПроцесса>, for example: rphost_4076. The log file name is given by the pattern YYMMDDHH.log. For example, in the log 07051819.log, the file name is formed from May 2007 18, 19 hours)

3) The log for analysis can be uploaded to Excel using a comma separator, for example

4)1С:TsUP uses logs of the technological log for its analytical indicators. When using DRM, no other data should be collected, delete logcfg.xml manually, DRM itself will create a file with the necessary settings.

5) There are no other log parsers from 1C, there is http://partners.v8.1c.ru/forum/getfile.jsp?name=ObrabotkaTehnologiceskogoGurnala.epf
http://partners.v8.1c.ru/forum/thread.jsp?id=576266#576266

v. Possible mistakes and additional information:

We are looking for logs in the directory on the server, although for a 64-bit server a different program directory

Track the failed request; the DBMSSQL technology log event is output only at the end of the query execution. If the request cannot be executed for a long time, then its execution can be interrupted, after which the related events will be displayed in the technological log.

< config xmlns= "http:>
< log location= "C:\Program Files\1cv81\logs" history= "24" >
< event>
< eq property= "Name" value= "EXCP" />
< /event>
< event>
< eq property= "Name" value= "SDBL" />
< eq property= "Func" value= "BeginTransaction" />
< /event>
< event>
< eq property= "Name" value= "DBMSSQL" />
< ge property= "Duration" value= "30000" />
< /event>
< property name= "All" />
< /log>
< /config>

More details about the features of using the technological journal can be found on the materials of the partners' seminar on March 2 - 4, 2007, the report "Tools for diagnosing the operation of the 1C:Enterprise 8.1 system".

The course where they teach this issue http://www.1c.ru/news/info.jsp?id=9144

All questions are answered in "C:\Program Files\1cv81\AddDoc\RU\V8AddDoc81.htm", Book "1C:Enterprise 8.1. Configuration and Administration”, Chapter 21. Administration, Technology Journal

if you did not find the answer to your question, let's expand the material