Log storage method, device and storage medium

By judging the communication status and space of the log storage server through the management platform and nodes, the storage problem caused by the large amount of log data is solved, the safe transfer of log files and detailed alarms are realized, and the platform performance and log management efficiency are improved.

CN115061887BActive Publication Date: 2024-10-29INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210573717.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2024-10-29
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

Existing technology cannot effectively solve the problem of log file loss caused by large amounts of log data and insufficient storage space, and cannot send detailed alarm information to users in a timely manner.

Method used

Determine the communication status and remaining space of the log storage server through the management platform and nodes. If the communication is abnormal or the space is insufficient, a corresponding alarm will be issued, and the log files will be transferred from the local storage to other servers according to the priority and first-in-first-out principle to ensure that the log files are Secure storage of files.

Benefits of technology

It effectively solves the problem of log file loss, reduces local storage pressure, improves the performance of the platform and nodes, and sends detailed alarm information to users in a timely manner to ensure log data management and troubleshooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115061887B_ABST
    Figure CN115061887B_ABST
Patent Text Reader

Abstract

The present invention relates to a log storage method, device and storage medium, and the method comprises the following steps: after a management platform and a node generate a log file, the log file is stored in their respective local spaces, and the log file to be transferred is determined; the management platform and the node send a communication signal to a first log storage server and determine whether a communication response signal returned by the log storage server is received; if the communication response signal is received, it is determined whether the log file to be transferred is smaller than the available space of the first log storage server; if so, the log file to be transferred is transferred to the first log storage server; when the local space margin of the management platform and the node reaches a threshold, the log file to be transferred is transferred from the management platform and the node to a second log storage server. The present invention avoids the loss of logs due to overwriting and saving when the storage space is full due to a large amount of logs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a log storage method, device and storage medium. Background Art

[0002] Network devices, operating systems, and service programs all generate logs during operation. Each line of the log records the date, time, user, action, and other related operation descriptions. Logs are an important basis for troubleshooting, analyzing attack sources, and tracing. A huge amount of log data is generated all the time. If such logs are stored in local storage space for a long time, they will take up a large amount of disk space, affecting the performance of the platform and each node, and affecting the user experience.

[0003] In the prior art, announcement number CN114356638A provides a log preservation method, apparatus, storage medium and computer equipment to improve the efficiency of log preservation. This technical solution can improve the efficiency of log preservation, but it cannot solve the problem of log being overwritten and lost due to large log volume and limited storage space. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a log storage method, device and storage medium, which can judge the power status of the log storage server when communication with the log storage server fails, so as to send more detailed log storage server alarm information to the user.

[0005] To achieve the above objectives, this application proposes a first technical solution:

[0006] A log storage method, the method comprising:

[0007] After the management platform and the node generate log files, they store the log files in their respective local spaces and determine the log files that need to be transferred.

[0008] The management platform and the node send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received.

[0009] If the communication response signal is received, it is determined whether the log file to be transferred is smaller than the available space of the first log storage server.

[0010] If so, the log file to be transferred is transferred to the first log storage server.

[0011] When the local space margin of the management platform and the node reaches a threshold, the log files to be transferred are transferred from the management platform and the node to the second log storage server.

[0012] In one embodiment of the present invention, the management platform sends a communication signal to the first log storage server and determines whether a communication response signal returned by the log storage server is received, including:

[0013] The management platform sends an initial communication signal to the first log storage server.

[0014] If a communication response signal returned by the first log storage server in response to the first communication signal is received, it is determined that the communication response signal returned by the first log storage server is received.

[0015] If no communication response signal is received from the first log storage server in response to the first communication signal, the power status of the first log storage server is detected, and it is determined whether to continue to send a communication signal to the first log storage server according to the power status of the first log storage server.

[0016] In one embodiment of the present invention, determining whether to continue to send a communication signal to the first log storage server according to the power state of the first log storage server includes:

[0017] If the power status of the first log storage server is normal, continue to send a communication signal to the first log storage server, and determine whether a communication response signal returned by the first log storage server is received.

[0018] If the power status of the first log storage server is abnormal, a first log storage server power abnormality alarm is issued.

[0019] In one embodiment of the present invention, if the communication signal continues to be sent to the first log storage server but no communication response signal returned by the first log storage server is received, a communication abnormality alarm of the first log storage server is issued.

[0020] In one embodiment of the present invention, the method further comprises:

[0021] If the log file is larger than the available space of the first log storage server, an insufficient space alarm of the first log storage server is issued to prompt the administrator to clean up the space of the first log storage server.

[0022] In one embodiment of the present invention, the method further comprises:

[0023] After receiving the trigger recovery instruction from the administrator that the first log storage server has performed space cleanup.

[0024] The log files stored in the second log storage server are transferred to the first log storage server, and after the transfer of the log files stored in the second log storage server is completed, the log files to be transferred in the management platform and the node are transferred to the first log storage server.

[0025] In one embodiment of the present invention, the method further comprises:

[0026] If the administrator does not clean up the space of the first log storage server within the preset time, the space of the log storage server will be automatically cleaned up according to the first-in-first-out principle based on the size of the log files to be transferred from the second log storage server to the first log storage server.

[0027] In one embodiment of the present invention, the method further comprises:

[0028] Configure the respective priorities of the management platform and nodes.

[0029] The log files to be transferred by the management platform and the nodes are transferred to the first log storage server or the second log storage server according to the priority, and the log files stored in the second log storage server are transferred to the first log storage server according to the priority.

[0030] To achieve the above purpose, the present application also proposes a second technical solution:

[0031] A log storage device, characterized in that the log storage device comprises:

[0032] The log management module is used to manage the log files generated by the platform and nodes, store the log files in their respective local spaces, and determine the log files that need to be transferred;

[0033] The communication module is used to manage the platform and the node to send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received.

[0034] The judgment module is used to judge whether the log file to be transferred is smaller than the available space of the first log storage server if the communication response signal is received.

[0035] If so, the log file to be transferred is transferred to the first log storage server.

[0036] The log management module is also used to dump the log files to be transferred from the management platform and the node to the second log storage server when the local space margin of the management platform and the node reaches a threshold.

[0037] To achieve the above objectives, this application proposes a third technical solution:

[0038] A computer-readable storage medium stores a program, and when the program is executed by a processor, the processor is caused to execute the steps of the method.

[0039] The above technical solution of the present invention has the following advantages compared with the prior art:

[0040] The present invention configures a log storage server, stores the management platform and each node log in the log storage server in order according to the set level, judges the communication status and remaining space size of the log storage server through the management platform, and sends detailed alarm information to the user in time.

[0041] The present invention can solve the problem of log file loss due to large log data volume, insufficient storage space and other problems; it can also solve the problem of partial log file loss due to excessive number of nodes and excessive concurrent data volume. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 is a flow chart of the method of the present invention;

[0044] Figure 2 It is a processing flow chart of platform and node processing in the present invention;

[0045] Figure 3 It is a processing flow chart of the log storage server in the present invention;

[0046] Figure 4 It is a program structure diagram of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment 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.

[0048] The log storage method, device and storage medium provided by the present application can be applied to various network devices, reinstallation systems, service programs, etc., and a large number of log files saved in the local storage space will affect the performance of the platform and each node. In order to facilitate future troubleshooting, analysis of attack tracing and other operations, the log storage method, device and storage medium provided by the present application can transfer the log files in the local storage space to a dedicated log storage server according to the first-in-first-out principle. The present application is described as an example for a more complex artificial intelligence development platform. The sources of the logs of the artificial intelligence development platform mainly include: Linux operating system logs, development platform service logs, each node service log, training task logs, and log data are generated at all times, and the number is huge. The local storage space of the management platform and each node is difficult to accommodate log files with a large amount of data. At this time, the log files in the local storage space need to be transferred to the log file storage server to reduce the performance pressure of the management platform and each node.

[0049] Embodiment 1:

[0050] Reference Figure 1 , 2 As shown in , 3, this embodiment discloses a log storage method, the method comprising:

[0051] After the management platform and the node generate log files, they store the log files in their respective local spaces and determine the log files that need to be transferred; the management platform and the node send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received; if the communication response signal is received, it is determined whether the log files that need to be transferred are smaller than the available space of the first log storage server; if so, the log files that need to be transferred are transferred to the first log storage server. When the local space margin of the management platform and the node reaches the threshold, the log files that need to be transferred are dumped from the management platform and the node to the second log storage server.

[0052] Specifically, the log files generated by the management platform and the nodes are first saved in the local space. When the log files in the local space reach a certain capacity, the log files to be transferred are determined, and the log files to be transferred are transferred to the log storage server. The log files to be transferred are determined by setting a threshold in the local space of the management platform and the node. When the log file capacity in the local space is greater than the threshold, the part exceeding the local space capacity threshold is determined as the log file to be transferred. The threshold can be set to one or more.

[0053] When the threshold is set to one, for example, the threshold is set to 10% of the local space capacity, when the local space capacity of the management platform and each node exceeds 10%, the management platform and each node will classify the log files that exceed 10% of the local space capacity as log files to be transferred.

[0054] When the local space capacity of the management platform and each node exceeds 10%, the log files that exceed the local space capacity by 10% are classified as log files that need to be transferred, and the management platform and the nodes send a communication signal to the first log storage server. Whether the communication of the first log storage server is normal is determined by whether the first log storage server returns a communication response signal. When it is determined that the communication of the first log storage server is normal, it is further determined whether the available space of the first log storage server can meet the needs of the log files to be transferred. If the available space of the first log storage server meets the space requirements of the log files to be transferred, the log files to be transferred will be transferred to the first log storage server.

[0055] When multiple thresholds are set, for example, the thresholds are set to 10% and 80% of the local space capacity, when the local space capacity of the management platform and each node exceeds 10% but has not reached 80%, the log files continue to be saved in the local space of the management platform and the node; when the capacity of the log files in the local space exceeds 80%, the management platform and each node will classify the log files that exceed 80% of the local space capacity as log files that need to be transferred.

[0056] When the local space capacity of the management platform and each node exceeds 10%, the log files that exceed the local space capacity by 10% are classified as log files that need to be transferred, and the management platform and the nodes send a communication signal to the first log storage server. Whether the communication of the first log storage server is normal is determined by whether the first log storage server returns a communication response signal. When it is determined that the communication of the first log storage server is normal, it is further determined whether the available space of the first log storage server can meet the needs of the log files to be transferred. If the available space of the first log storage server meets the space requirements of the log files to be transferred, the log files to be transferred will be transferred to the first log storage server.

[0057] When the communication of the first log storage server is abnormal or the available space of the first log storage server is insufficient, resulting in the inability to transfer the log files to the first log storage server, the log files exceeding 10% of the local space of the management platform and each node continue to be saved in the local space. When the local space capacity of the management platform and each node reaches 80%, the log files exceeding 80% of the local space capacity are divided into log files to be transferred, and then the log files to be transferred are dumped to the second log storage server. When the local space capacity of the management platform and each node drops below 80%, the dumping to the second log storage server is stopped.

[0058] Furthermore, during the period when the log files to be transferred are transferred to the second log storage server, when the first log storage server resumes normal operation, log files exceeding 10% of the local space of the management platform and each node are started to be saved in the first log storage server.

[0059] In the above log storage method, by judging the communication status of the log storage server and the size of the remaining space, and by transferring the log files to the first log storage server or the second log storage server, the problem of log file loss caused by the large amount of log data and insufficient storage space can be solved, thereby reducing the storage pressure of the local space and improving the performance of the platform and each node.

[0060] In one embodiment, the management platform sends a communication signal to the first log storage server and determines whether a communication response signal returned by the log storage server is received, including: the management platform sends a first communication signal to the first log storage server. If a communication response signal returned by the first log storage server to the first communication signal is received, it is determined that the communication response signal returned by the first log storage server is received; if a communication response signal returned by the first log storage server to the first communication signal is not received, the power supply status of the first log storage server is detected, and it is determined whether to continue to send a communication signal to the first log storage server according to the power supply status of the first log storage server.

[0061] Specifically, after not receiving the communication response signal returned by the first log storage server to the first communication signal, the power status of the first log storage server is detected to determine whether the management platform's failure to receive the communication signal response returned by the first log storage server is due to the power failure of the first log storage server. By detecting the power status of the first log storage server, the problem of the first log storage server being unable to respond to the communication signal of the management platform and the node due to abnormal power operation can be located.

[0062] In one embodiment, determining whether to continue to send a communication signal to the first log storage server according to the power state of the first log storage server includes: if the power state of the first log storage server is normal, continuing to send a communication signal to the first log storage server, and determining whether a communication response signal returned by the first log storage server is received. If the power state of the first log storage server is abnormal, issuing a power abnormality alarm for the first log storage server.

[0063] Specifically, when the power status of the first log storage server is normal, the communication signal continues to be sent to the first log storage server. In order to prevent network fluctuations from causing network communication blockage, the communication signal cannot be received by the first log storage server in time, and the communication response signal cannot be returned by the first log storage server and received by the management platform in time. In other words, the communication signal transmission delay caused by network communication blockage avoids false alarms caused by network communication blockage.

[0064] In one implementation manner, if the communication signal continues to be sent to the first log storage server but no communication response signal returned by the first log storage server is received, a communication abnormality alarm of the first log storage server is issued.

[0065] Specifically, when the power status of the first log storage server is normal, when the first log storage server cannot return a communication response signal for the communication signal that continues to be sent, it indicates that the communication of the first log storage server is abnormal. At this time, the management platform sends an alarm message of the communication abnormality of the first log storage server to the management personnel, prompting the management personnel to perform maintenance on the communication abnormality.

[0066] In one embodiment, the method further includes: if the log file is larger than the available space of the first log storage server, issuing an insufficient space alarm for the first log storage server to prompt the administrator to clear space on the first log storage server.

[0067] Specifically, when the function of the first log storage server is normal, when saving log files to the first log storage server, it should also be determined whether the available space of the first log storage server is sufficient. By comparing the available space size of the first log storage server and the required space size of the log files to be transferred, when the log file is larger than the available space of the first log storage server, it is determined that the available space of the first log storage server is insufficient. The management platform issues an alarm message of insufficient space, prompting the management personnel to perform space processing.

[0068] In one implementation manner, if the administrator fails to clean up the space of the first log storage server within a set time, the first log storage server automatically cleans up the log files within the set time or the earlier log files.

[0069] Specifically, the first log storage server automatically cleans up log files within a set time or early log files, where the set time can be a periodic time of 12 hours, 24 hours, 36 hours, etc. The set time is the time point when the management platform and the node generate logs, such as one day, one week, etc., and the logs within the set time are cleaned up in time to avoid the occupation and waste of the storage space of the first log storage server when the log files can no longer play a role in troubleshooting, analyzing the attack source.

[0070] In one embodiment, the method further includes: upon receiving a trigger recovery instruction from an administrator indicating that space has been cleared on the first log storage server, the log files stored in the second log storage server are transferred to the first log storage server, and after the transfer of the log files stored in the second log storage server is completed, the log files to be transferred in the management platform and the node are dumped to the first log storage server.

[0071] Specifically, the log files temporarily stored in the second log storage server are transferred from the second log storage server to the first log storage server after the available space of the first log storage server is released. Because the transmission speed between log storage servers is much faster than the transmission speed between the management platform and the log server, after the log files in the second log storage server are transferred to the first log storage server, the operation of the management platform and each node generating log files and saving them to the second log storage server is stopped. At this time, the log files generated by the management platform and each node will be transferred from being saved in the second log storage server to being saved in the first log storage server. Such a setting facilitates the orderly saving of log files in a log storage server and facilitates the management of log data.

[0072] In one embodiment, the method further includes: if the administrator fails to clean up space on the first log storage server within a preset time, the space on the log storage server is automatically cleaned up according to the first-in-first-out principle based on the size of the log file that the second log storage server needs to transfer to the first log storage server.

[0073] Specifically, the log files generated by the management platform and nodes are saved using the first-in-first-out principle of the queue, that is, the first generated log files are saved first. This setting allows the log files to be sorted and saved in chronological order of generation. After the log files to be transferred are determined, the space size of the log files to be transferred is obtained through the first-in-first-out principle, which facilitates the release of space on the first log storage server for the log files to be transferred, so that the size of the available space released meets the required space size of the log files to be transferred.

[0074] In one embodiment, the method further includes: configuring respective priorities of the management platform and the node. According to the priorities, the log files to be transferred by the management platform and the node are transferred to the first log storage server or the second log storage server, and according to the priorities, the log files stored in the second log storage server are transferred to the first log storage server.

[0075] Specifically, the device sets the management platform priority to 0 by default, and the other nodes also set priorities in turn. The smaller the number, the higher the priority, and log forwarding will be given priority. When the priority is the same, multi-threaded concurrent forwarding will be adopted. After the log is generated on the management platform and each node, the network communication signal will be sent to the log storage server in turn according to the priority. The setting of the priority is configured through the use scenarios of various log data, such as: for showing the trajectory of program execution (such as the mutual call relationship between functions, the parameters and return values ​​of functions and other on-site information), for pointing out fine-grained information, indicating the situation where potential errors will occur, and highlighting the running process of the application at the coarse-grained level.

[0076] In this embodiment, the alarm can be an alarm message sent by the management platform to the management personnel when an abnormality or insufficient space occurs in the log storage server. The management personnel can notify the designated person in different ways according to the different states, different times, and different levels of the alarm. The notification method of the alarm message can be telephone, SMS, WeChat, email, APP and other information. At the same time, the alarm message can be an early warning of insufficient space and other situations by the management platform through intelligent algorithms, or it can be an early warning of the period when the log storage server has frequent communication abnormalities and / or power abnormalities, such as communication abnormalities caused by network fluctuations leading to network communication blockage, such as voltage instability caused by the simultaneous use of high-probability electrical equipment in a certain period of time.

[0077] Embodiment 2:

[0078] A log storage device, characterized in that the log storage device comprises: a log management module, a communication module, a judgment module and a log management module.

[0079] The log management module is used to manage the log files generated by the platform and nodes, store the log files in their respective local spaces, and determine the log files that need to be transferred;

[0080] The communication module is used to manage the platform and the node to send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received.

[0081] The judging module is configured to judge whether the log file to be transferred is smaller than the available space of the first log storage server if the communication response signal is received, and if so, transfer the log file to be transferred to the first log storage server.

[0082] The log management module is also used to dump the log files to be transferred from the management platform and the node to the second log storage server when the local space margin of the management platform and the node reaches a threshold.

[0083] In one embodiment, the communication module is also used for the management platform to send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received, including: the communication module sends a first communication signal to the first log storage server. If a communication response signal returned by the first log storage server for the first communication signal is received, it is determined that the communication response signal returned by the first log storage server is received; if a communication response signal returned by the first log storage server for the first communication signal is not received, the power supply status of the first log storage server is detected, and it is determined whether to continue to send a communication signal to the first log storage server according to the power supply status of the first log storage server.

[0084] In one embodiment, the communication module can also determine whether to continue sending communication signals to the first log storage server based on the power status of the first log storage server, including: if the power status of the first log storage server is normal, continue to send communication signals to the first log storage server, and determine whether a communication response signal returned by the first log storage server is received; if the power status of the first log storage server is abnormal, issue a first log storage server power abnormality alarm.

[0085] In one embodiment, if the communication module continues to send a communication signal to the first log storage server but does not receive a communication response signal returned by the first log storage server, a communication abnormality alarm of the first log storage server is issued.

[0086] In one embodiment, the log storage device further includes: if the judgment module determines that the log file is larger than the available space of the first log storage server, the communication module issues an insufficient space alarm for the first log storage server to prompt the administrator to clear space on the first log storage server.

[0087] In one embodiment, the log storage device further includes: when the management platform receives a trigger recovery instruction from the administrator that the first log storage server has been cleared, the log management module transfers the log files stored in the second log storage server to the first log storage server, and after the transfer of the log files stored in the second log storage server is completed, the log files to be transferred in the management platform and the node are transferred to the first log storage server. If the administrator does not perform space cleaning on the first log storage server within a preset time, the log management module automatically performs space cleaning on the log storage server according to the first-in-first-out principle based on the size of the log files that the second log storage server needs to transfer to the first log storage server.

[0088] In one embodiment, the log storage device also includes: configuring the respective priorities of the management platform and the node; dumping the log files to be transferred by the management platform and the node to the first log storage server or the second log storage server according to the priority, and transferring the log files stored in the second log storage server to the first log storage server according to the priority.

[0089] Embodiment three:

[0090] This embodiment provides a computer-readable storage medium, which stores a program. When the program is executed by a processor, the following steps are implemented:

[0091] After the management platform and the node generate log files, they store the log files in their respective local spaces and determine the log files that need to be transferred.

[0092] The management platform and the node send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received.

[0093] If the communication response signal is received, it is determined whether the log file to be transferred is smaller than the available space of the first log storage server. If so, the log file to be transferred is transferred to the first log storage server.

[0094] When the local space margin of the management platform and the node reaches a threshold, the log files to be transferred are transferred from the management platform and the node to the second log storage server.

[0095] In one embodiment, when the program is executed by the processor, the following steps are also implemented: the management platform sends a communication signal to the first log storage server and determines whether a communication response signal returned by the log storage server is received, including: the management platform sends a first communication signal to the first log storage server, and if a communication response signal returned by the first log storage server for the first communication signal is received, it is determined that the communication response signal returned by the first log storage server is received; if the communication response signal returned by the first log storage server for the first communication signal is not received, the power status of the first log storage server is detected, and according to the power status of the first log storage server, it is determined whether to continue to send a communication signal to the first log storage server.

[0096] In one embodiment, when the program is executed by the processor, the following steps are also implemented: determining whether to continue sending a communication signal to the first log storage server based on the power status of the first log storage server, including: if the power status of the first log storage server is normal, continuing to send a communication signal to the first log storage server, and determining whether a communication response signal returned by the first log storage server is received; if the power status of the first log storage server is abnormal, issuing a first log storage server power abnormality alarm.

[0097] In one embodiment, when the program is executed by the processor, the following steps are also implemented: if the communication signal continues to be sent to the first log storage server, but the communication response signal returned by the first log storage server is not received, a communication abnormality alarm of the first log storage server is issued.

[0098] In one embodiment, when the program is executed by the processor, the following steps are also implemented: if the log file is larger than the available space of the first log storage server, an insufficient space alarm of the first log storage server is issued to prompt the administrator to clean up space on the first log storage server.

[0099] In one embodiment, when the program is executed by the processor, the following steps are also implemented: after receiving a trigger recovery instruction from the administrator that the first log storage server has performed space cleanup; the log files stored in the second log storage server are transferred to the first log storage server, and after the transfer of the log files stored in the second log storage server is completed, the log files to be transferred in the management platform and the node are dumped to the first log storage server.

[0100] In one embodiment, when the program is executed by the processor, the following steps are also implemented: if the administrator does not clean up the space of the first log storage server within a preset time, the space of the log storage server is automatically cleaned up according to the first-in-first-out principle based on the size of the log file that the second log storage server needs to transfer to the first log storage server.

[0101] In one embodiment, when the program is executed by the processor, the following steps are also implemented: configuring the respective priorities of the management platform and the node; dumping the log files to be transferred by the management platform and the node to the first log storage server or the second log storage server according to the priority, and transferring the log files stored in the second log storage server to the first log storage server according to the priority.

[0102] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0103] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0104] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A log storage method, It is characterized in that The method comprises: After the management platform and the node generate log files, they store the log files in their respective local spaces and determine the log files that need to be transferred; The management platform and the node send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received; If the communication response signal is received, determining whether the log file to be transferred is smaller than the available space of the first log storage server; If yes, the log file to be transferred is transferred to the first log storage server; if the log file is larger than the available space of the first log storage server, an insufficient space alarm of the first log storage server is issued to prompt the administrator to clean up the space of the first log storage server; When the local space margin of the management platform and the node reaches a threshold, the log files to be transferred are transferred from the management platform and the node to the second log storage server; Configuring respective priorities of the management platform and nodes; Dumping the log files to be transferred by the management platform and the nodes to the first log storage server or the second log storage server according to the priority, and transferring the log files stored in the second log storage server to the first log storage server according to the priority; The management platform sends a communication signal to the first log storage server and determines whether a communication response signal returned by the log storage server is received, including: The management platform sends a first communication signal to the first log storage server; If a communication response signal returned by the first log storage server in response to the first communication signal is received, it is determined that a communication response signal returned by the first log storage server is received; If no communication response signal is received from the first log storage server in response to the first communication signal, the power status of the first log storage server is detected, and it is determined whether to continue to send a communication signal to the first log storage server according to the power status of the first log storage server.

2. The log storage method according to claim 1, It is characterized in that The determining whether to continue to send a communication signal to the first log storage server according to the power state of the first log storage server includes: If the power status of the first log storage server is normal, continue to send a communication signal to the first log storage server, and determine whether a communication response signal returned by the first log storage server is received; If the power status of the first log storage server is abnormal, a first log storage server power abnormality alarm is issued.

3. The log storage method according to claim 2, It is characterized in that If the communication signal continues to be sent to the first log storage server but no communication response signal returned by the first log storage server is received, a communication abnormality alarm of the first log storage server is issued.

4. The log storage method according to claim 1, It is characterized in that The method further comprises: After receiving a trigger recovery instruction from an administrator that the first log storage server has performed space cleanup; The log files stored in the second log storage server are transferred to the first log storage server, and after the transfer of the log files stored in the second log storage server is completed, the log files to be transferred in the management platform and the node are transferred to the first log storage server.

5. The log storage method according to claim 4, It is characterized in that The method further comprises: If the administrator does not clean up the space of the first log storage server within the preset time, the space of the log storage server will be automatically cleaned up according to the first-in-first-out principle based on the size of the log files to be transferred from the second log storage server to the first log storage server.

6. A log storage device for implementing the log storage method according to claim 1, It is characterized in that The log storage device comprises: The log management module is used to manage the log files generated by the platform and nodes, store the log files in their respective local spaces, and determine the log files that need to be transferred; A communication module, used for managing the platform and the node to send a communication signal to the first log storage server and determine whether a communication response signal returned by the log storage server is received; A judgment module, configured to judge whether the log file to be transferred is smaller than the available space of the first log storage server if the communication response signal is received; If yes, the log file to be transferred is transferred to the first log storage server; The log management module is also used to dump the log files to be transferred from the management platform and the node to the second log storage server when the local space margin of the management platform and the node reaches a threshold.

7. A computer-readable storage medium, Features: The computer-readable storage medium stores a program, and when the program is executed by a processor, the processor executes the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Log storage method and device, storage medium and computer equipment

    CN114356638A

  • A log storage method and apparatus

    CN109460390A

  • Log management method and device, electronic equipment and storage medium

    CN110661650A

  • Method for obtaining log information from network element device by network management server, a network element device and a network management server

    US20080086561A1