A process start and stop monitoring method and system based on Hbase

By inserting log generation and reporting programs in the application system, capturing abnormal signals, and using the Hbase database for data statistics, the problem of not being able to monitor the entire life cycle of the process in the existing technology is solved, and efficient process monitoring and intuitive monitoring display are achieved.

CN113535511BActive Publication Date: 2024-12-20SI-TECH INFORMATION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202110735099.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2024-12-20
Estimated Expiration
2041-06-30

AI Technical Summary

Technical Problem

The existing process start-stop monitoring method cannot monitor the system for the entire life cycle, especially the start-stop status of the timed process, resulting in inaccurate monitoring and low efficiency.

Method used

Data collection is collected using the process reporting mode, and data management and statistics are managed and counted by using the Hbase database. By inserting log generation programs in the application system, actively reporting programs, semaphore capture programs and exit programs, the process status is collected in real time and log files are formed, and stored in Statistical analysis was performed in the Hbase database.

Benefits of technology

It realizes full life cycle monitoring of process status, saves monitoring costs, improves monitoring efficiency, and is non-invasive to distributed processes, making the monitoring situation more intuitive.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113535511B_ABST
    Figure CN113535511B_ABST
Patent Text Reader

Abstract

The present invention provides a process start-stop monitoring method and system based on Hbase, comprising the steps of: inserting a log generation program, an active reporting program, a semaphore capture program and an exit program in an application system; the application system calls the active reporting program and the log generation program before the process starts and ends; running the log generation program to obtain a log file, and running the reporting program to report the log file to a monitoring management system; the semaphore capture program continuously captures process abnormal signals, and calls the exit program when the process abnormal signal is captured; running the exit program, and reporting the log file to the monitoring management system. The invention has the beneficial effects of: by adopting the process reporting mode for data collection, the process status can be collected in real time and a log file can be formed, thereby monitoring the task throughout its life cycle, thereby saving monitoring costs and improving monitoring efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of software design, and in particular to an Hbase-based process start / stop monitoring method and system. Background Art

[0002] The current common method for monitoring the start and stop status of processes in large and complex systems is to use third-party detection. However, this monitoring method has disadvantages: first, the data obtained is only the running status of the process at a certain point in time, and it is impossible to monitor the system according to the life cycle. Second, the third-party detection method cannot monitor the start and stop of scheduled processes.

[0003] Therefore, the existing process start and stop monitoring method cannot monitor the system accurately and effectively. Summary of the invention

[0004] In view of the above problems, the present invention provides a process start and stop monitoring method and system based on Hbase, which adopts the process reporting mode for data collection, and uses a third-party Hbase database for data management and statistics to realize the full life cycle monitoring of the system process status.

[0005] To achieve the above object, the present invention provides a process start and stop monitoring method based on Hbase, comprising the steps of:

[0006] Insert log generation program, active reporting program, semaphore capture program and exit program into the application system;

[0007] The application system calls the active reporting program and the log generation program before the process starts and ends;

[0008] Running the log generation program to obtain a log file, and running the reporting program to report the log file to a monitoring management system;

[0009] The semaphore capture program continuously captures process abnormal signals, and calls the exit program when the process abnormal signal is captured;

[0010] Run the exit program and report the log file to the monitoring management system.

[0011] As a further improvement of the present invention, before inserting the log generation program, the active reporting program, the semaphore capture program and the exit program into the application system, the method includes:

[0012] Define the initialization log program, determine the log template, and compile the log generation program;

[0013] Compile process active reporting program, semaphore capture program and exit program.

[0014] As a further improvement of the present invention, the data items in the log template include log version, timestamp, operation flow, link type, service host, startup account, belonging account, process path, process name, Bin file size, Bin file modification time, process ID, process parameters, process status and description information.

[0015] As a further improvement of the present invention, the description information includes the location and reason of process exit.

[0016] As a further improvement of the present invention, the application system and the monitoring management system agree on an interaction protocol and an interaction format.

[0017] As a further improvement of the present invention, the interactive protocol adopts TCP or UDP data transmission control protocol.

[0018] As a further improvement of the present invention, the log file should meet the interactive format requirements.

[0019] As a further improvement of the present invention, the process abnormality signal includes:

[0020] Signals sent when a segmentation fault occurs while executing invalid memory (SIGSEGV), when aborting (3) is called (SIGABRT), or when aborting (SIGTERM) is called.

[0021] As a further improvement of the present invention, the monitoring management system uses an Hbase database to store the log files, and statistically analyzes and displays the application system process status based on the received log files.

[0022] The present invention also provides a process start-stop monitoring system based on Hbase, comprising: a program insertion module, a process reporting module, an abnormal monitoring module, and a monitoring management module;

[0023] The program insertion module is used to:

[0024] Insert log generation program, active reporting program, semaphore capture program and exit program into the application system;

[0025] The process reporting module is used to:

[0026] The application system calls the active reporting program and the log generation program before the process starts and ends;

[0027] Running the log generation program to obtain a log file, and running the reporting program to report the log file to a monitoring management system;

[0028] The abnormality monitoring module is used to:

[0029] Continuously capturing the process abnormal signal through the semaphore capture program, and calling the exit program when the process abnormal signal is captured;

[0030] Run the exit program and report the log file to the monitoring management system;

[0031] The monitoring management module is used to:

[0032] The log files are stored, and the application system process status is statistically analyzed and displayed based on the received log files.

[0033] Compared with the prior art, the present invention has the following beneficial effects:

[0034] By adopting the process reporting mode for data collection, the process status can be collected in real time and a log file can be formed, thereby monitoring the task throughout its life cycle, thereby saving monitoring costs and improving monitoring efficiency.

[0035] An application-based logging framework that is non-intrusive to distributed processes.

[0036] Use the third-party Hbase database to perform statistical analysis on data, and then display the application system process status, making the monitoring situation more intuitive. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flow chart of a process start / stop monitoring method based on Hbase disclosed in an embodiment of the present invention;

[0038] Figure 2 A schematic diagram of a process start / stop monitoring system based on Hbase disclosed in an embodiment of the present invention;

[0039] Figure 3 The present invention discloses a detailed flowchart of a process start and stop monitoring method based on Hbase according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] The present invention is further described in detail below in conjunction with the accompanying drawings:

[0042] like Figure 1 , 3As shown, the present invention provides a process start and stop monitoring method based on Hbase, comprising:

[0043] S1. Insert log generation program, active reporting program, semaphore capture program and exit program into the application system;

[0044] Among them, include:

[0045] Define the initialization log program, determine the log template, and compile the log generation program;

[0046] For example: void init_unified_log(int argc,char**argv,const char*logLevel);

[0047] Compile process active reporting program, semaphore capture program and exit program.

[0048] The data items in the log template of the present invention include log version, timestamp, running flow, link type, service host, startup account, belonging account, process path, process name, Bin file size, Bin file modification time, process ID, process parameters, process status and description information, and the description information includes the location and reason for process exit; the detailed information is as follows:

[0049]

[0050]

[0051] S2, the application system calls the active reporting program and log generation program before the process starts and ends;

[0052] S3, run the log generation program to obtain a log file, and run the reporting program to report the log file to the monitoring management system;

[0053] in,

[0054] The application system and the monitoring management system agree on the interaction protocol and interaction format;

[0055] The interactive protocol uses TCP or UDP data transmission control protocol;

[0056] The log file should meet the interactive format requirements and must contain all mandatory fields in the log template.

[0057] S4, the semaphore capture program continuously captures the process abnormal signal, and calls the exit program when the process abnormal signal is captured;

[0058] Among them, process abnormal signals include:

[0059] Signals sent when a segmentation fault occurs while executing invalid memory (SIGSEGV), when aborting (3) is called (SIGABRT), or when aborting (SIGTERM) is called.

[0060] S5. Run the exit program and report the log file to the monitoring management system.

[0061] The exit function example is as follows:

[0062]

[0063] S6. The monitoring management system uses the Hbase database to store log files, and performs statistical analysis and displays the application system process status based on the received log files.

[0064] like Figure 2 As shown, the present invention also provides a process start-stop monitoring system based on Hbase, including: a program insertion module, a process reporting module, an abnormal monitoring module, and a monitoring management module;

[0065] Program plug-in modules for:

[0066] Insert log generation program, active reporting program, semaphore capture program and exit program into the application system;

[0067] Process reporting module, used for:

[0068] The application system calls the active reporting program and log generation program before the process starts and ends;

[0069] Run the log generation program to obtain the log file, and run the reporting program to report the log file to the monitoring management system;

[0070] Abnormal monitoring module, used for:

[0071] The semaphore capture program continuously captures the process abnormal signal, and calls the exit program when the process abnormal signal is captured;

[0072] Run the exit program and report the log file to the monitoring management system;

[0073] Monitoring and management module, used for:

[0074] Store log files, and perform statistical analysis and display of application system process status based on the received log files.

[0075] Advantages of the present invention:

[0076] (1) By adopting the process reporting mode for data collection, the process status can be collected in real time and a log file can be generated, thereby monitoring the task throughout its life cycle, thereby saving monitoring costs and improving monitoring efficiency.

[0077] (2) Application-based logging framework, non-invasive to distributed processes.

[0078] (3) Use the third-party Hbase database to perform statistical analysis on data, and then display the application system process status, making the monitoring situation more intuitive.

[0079] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A process start and stop monitoring method based on Hbase, characterized in that: include: Define an initialization log program, determine a log template, and compile a log generation program. The data items in the log template include process ID, process parameters, process status, and description information. The description information includes the location and reason for process exit; Insert log generation program, active reporting program, semaphore capture program and exit program into the application system; The application system calls the active reporting program and the log generation program before the process starts and ends; Running the log generation program to obtain a log file, and running the active reporting program to report the log file to a monitoring management system; The semaphore capture program continuously captures process abnormal signals, and calls the exit program when the process abnormal signal is captured; Run the exit program and report the log file to the monitoring management system; The monitoring management system uses Hbase database to store the log files, and performs statistical analysis and displays the application system process status based on the received log files.

2. The process start and stop monitoring method according to claim 1, characterized in that: Before inserting the log generation program, the active reporting program, the semaphore capture program and the exit program into the application system, the method includes: Compile process active reporting program, semaphore capture program and exit program.

3. The process start and stop monitoring method according to claim 1, characterized in that: The data items in the log template also include log version, timestamp, running flow, link type, service host, startup account, belonging account, process path, process name, Bin file size and Bin file modification time.

4. The process start and stop monitoring method according to claim 1, characterized in that: The application system and the monitoring management system agree on an interaction protocol and an interaction format.

5. The process start and stop monitoring method according to claim 4, characterized in that: The interactive protocol adopts TCP or UDP data transmission control protocol.

6. The process start and stop monitoring method according to claim 4, characterized in that: The log file should meet the interactive format requirements.

7. The process start and stop monitoring method according to claim 1, characterized in that: The process abnormal signal includes: Signals sent when a segmentation fault occurs while executing invalid memory (SIGSEGV), abort(3) (SIGABRT), or termination (SIGTERM).

8. A system for implementing the process start and stop monitoring method according to any one of claims 1 to 7, characterized in that: include: Program insertion module, process reporting module, abnormal monitoring module, monitoring management module; The program insertion module is used to: Insert log generation program, active reporting program, semaphore capture program and exit program into the application system; The process reporting module is used to: The application system calls the active reporting program and the log generation program before the process starts and ends; Running the log generation program to obtain a log file, and running the reporting program to report the log file to a monitoring management system; The abnormality monitoring module is used to: Continuously capturing the process abnormal signal through the semaphore capture program, and calling the exit program when the process abnormal signal is captured; Run the exit program and report the log file to the monitoring management system; The monitoring management module is used to: The log files are stored, and the application system process status is statistically analyzed and displayed based on the received log files.

Citation Information

Patent Citations

  • Method and unit for monitoring process state

    CN102200941A

  • Reporting method and device for internal process journals

    CN106649071A

  • Background program monitoring method and monitoring apparatus

    CN108427616A

  • A processing framework for abnormal crash based on an IOS system application

    CN109656773A

  • A process monitoring method and device

    CN109740345A