Server log automatic saving method, device, equipment, storage medium and product

By running shell scripts on the server and collecting log data via the target serial port, and automatically saving and archiving it, the problem of server log data not being saved automatically is solved, thus achieving log data integrity and system reliability.

CN119356996BActive Publication Date: 2025-11-25SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411191563.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-11-25
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

In existing technologies, server log data cannot be automatically saved, resulting in the loss of some log information, which affects the timeliness of fault location and system reliability.

Method used

The automatic save program is initialized by running a shell script, which starts the automatic log saving process. It collects server log data through the target serial port and records it as a text file, temporarily saving it to the target folder. It is then archived and saved to storage, releasing process resources. Multithreading and mutex locks are used to improve efficiency and reliability.

Benefits of technology

It enables automatic collection, storage, and archiving of server log data, ensuring the integrity of log data, facilitating timely location of server problems, and improving system reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356996B_ABST
    Figure CN119356996B_ABST
Patent Text Reader

Abstract

The application provides a kind of server log automatic saving method, device, equipment, storage medium and product, comprising: running first shell script, initializing automatic saving program, starting log automatic saving process, and obtaining process occupation resource and configuration information of log automatic saving process;Collect server log data through target serial port;Server log data is recorded as text file, and the text file is temporarily saved under target folder;Archive the text file and save it to the memory;Release the process occupation resource of log automatic saving process.The scheme of the application can realize the automatic saving of server log data, facilitate the timely positioning of server problems, and improve the reliability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, storage medium, and product for automatically saving server logs. Background Technology

[0002] Servers are products with extremely high reliability requirements. Accurate fault location is a very important part of server use and maintenance. Server problem location is usually achieved by reading log information and judging the error information in the log records.

[0003] In existing technology, after the Baseboard Management Controller (BMC) collects the server's log information, it can send the log data to the terminal via a serial port. When the log information needs to be saved, the collected log information needs to be saved on the terminal through methods such as manual saving, thus storing the log information on the terminal device and realizing the recording and saving of server logs.

[0004] Therefore, existing technologies cannot automatically save the server log information after it is collected, which makes it impossible to reliably save the server logs obtained by the BMC. This may result in the partial loss of server log information, and server failures may not be detected and troubleshooted in a timely manner, leading to low system reliability. Summary of the Invention

[0005] This invention provides a method, apparatus, device, storage medium, and product for automatically saving server logs, which solves the defect of manually saving server log data in the prior art, realizes the automatic saving of server log data, facilitates timely location of server problems, and improves system reliability.

[0006] This invention provides a method for automatically saving server logs, comprising: running a first shell script for initialization processing, the initialization processing including: initializing an automatic saving program and starting an automatic log saving process; obtaining the process resources and configuration information of the automatic log saving process; collecting server log data through a target serial port, wherein the target serial port is obtained by opening the LAN serial port function of the intelligent platform management interface protocol and redirecting the system's serial port information to the serial port of the baseboard management controller; recording the server log data into a text file and temporarily saving the text file to a target folder; archiving the text file to a storage device; and releasing the process resources occupied by the automatic log saving process.

[0007] According to a method for automatically saving server logs provided by the present invention, after initializing the automatic saving program and starting the automatic log saving process, the method further includes: creating a log collection thread, a log saving thread, and a log archiving thread under the automatic log saving process; initializing the log collection thread, the log saving thread, and the log archiving thread; acquiring the thread resources required by the log collection thread, the log saving thread, and the log archiving thread, and establishing a mutex lock.

[0008] According to a method for automatically saving server logs provided by the present invention, the step of collecting server log data through a target serial port includes: starting the log collection thread, obtaining the encoding of the target serial port; reading the data in the serial port device corresponding to the encoding of the target serial port to obtain the server log data, and temporarily saving the server log data in a string array; calculating the string length of the string array. The step of recording the server log data as a text file and temporarily saving the text file to a target folder includes: starting the log saving thread, creating a text file in the target folder, and determining the maximum string length that the text file can save; determining whether the string length of the string array exceeds the maximum string length that the text file can save; if it exceeds, creating a supplementary text file in the target folder; locking the files in the target folder; writing the string array into the files in the target folder, and unlocking the files in the target folder after writing is complete. The step of archiving and saving the text file to the storage includes: starting the log archiving thread, locking the files under the target file; generating an archive file name based on the number of archive files already saved in the storage and the current time; creating an archive file in the storage using the archive file name, and storing the files under the target file into the archive file.

[0009] According to a method for automatically saving server logs provided by the present invention, after storing the files under the target file into the archive file, the method further includes: recording the address of the archive file and the configuration information.

[0010] According to a method for automatically saving server logs provided by the present invention, before running the first shell script for initialization, the method further includes: if remote synchronization of server logs is not required, running a second shell script to create the target folder under the Linux system; otherwise, running a third shell script to create the target folder and the synchronization folder under the Linux system, and mounting the target folder and the synchronization folder; when remote synchronization of server logs is required, the step of archiving and saving the text file to the storage specifically includes: the remote device obtaining the text file from the synchronization folder and archiving and saving the text file to the storage.

[0011] According to a method for automatically saving server logs provided by the present invention, after initializing the automatic saving program and starting the automatic log saving process, the method further includes: saving the process identifier of the automatic log saving process and registering the automatic log saving process in the process monitoring of the Linux system.

[0012] This invention also provides a server log automatic saving device, comprising: an initialization module for running a first shell script to perform initialization processing, the initialization processing including: initializing an automatic saving program and starting the log automatic saving process; obtaining the process resources and configuration information of the log automatic saving process; a log collection module for collecting server log data through a target serial port, wherein the target serial port is obtained by opening the LAN serial port function of the intelligent platform management interface protocol and redirecting the system's serial port information to the serial port of the baseboard management controller; a log saving module for recording the server log data as a text file and temporarily saving the text file to a target folder; a log archiving module for archiving and saving the text file to a storage device; and a resource management module for releasing the process resources occupied by the log automatic saving process.

[0013] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the server log automatic saving method as described above.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the server log automatic saving method as described above.

[0015] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the server log automatic saving method as described above.

[0016] The server log automatic saving method, apparatus, device, storage medium, and product provided by this invention perform initialization processing by running a first shell script. The initialization process includes: initializing the automatic saving program and starting the automatic log saving process; obtaining the process resources and configuration information of the automatic log saving process; collecting server log data through a target serial port, wherein the target serial port is obtained by redirecting the system's serial port information to the serial port of the baseboard management controller by opening the local area network serial port function of the intelligent platform management interface protocol; recording the server log data into a text file and temporarily saving the text file to a target folder; archiving the text file to storage; and releasing the process resources occupied by the automatic log saving process. In this invention, by automatically saving server log data through the BMC and automatically archiving the saved server log data, comprehensive and complete server log data can be obtained and saved, facilitating timely location of server problems and improving system reliability. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is one of the flowcharts illustrating the automatic saving method for server logs provided by this invention.

[0019] Figure 2 This is the second flowchart of the server log automatic saving method provided by the present invention.

[0020] Figure 3 This is a schematic diagram of the automatic server log saving device provided by the present invention.

[0021] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0023] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0024] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities and do not necessarily imply a specific order or sequence, unless otherwise indicated. It should be understood that such terms can be used interchangeably where appropriate, for example, in situations where implementation can proceed in an order other than those given in the embodiments illustrated or described in this application.

[0025] Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover but not exclude inclusion. For example, a product or device that includes a series of components is not necessarily limited to those explicitly listed, but may include other components not explicitly listed or inherent to such product or device. As used in this application, the term "module" means any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing the functions associated with that element.

[0026] The term "Baseboard Management Controller (BMC)" used in the embodiments of this application refers to a dedicated microcontroller independent of the server operating system and main processor, which is integrated on the motherboard of servers, network devices, and other complex electronic systems. The BMC is primarily responsible for monitoring and managing the status of system hardware and providing remote management and control functions. The main functions of the BMC include: hardware monitoring, remote management, fault alarms, remote control, and compatibility with the Intelligent Platform Management Interface (IPMI). Specifically, hardware monitoring refers to monitoring key parameters such as system temperature, voltage, fan speed, and power status. Remote management allows administrators to access and manage devices anytime, anywhere via a network interface. Fault alarms allow the BMC to send warning notifications to the administrator when system anomalies are detected. Remote control supports remote power on / off, restart, operating system reinstallation, firmware updates, and other operations. IPMI compatibility means the BMC supports the IPMI protocol for remote monitoring and management of system hardware health.

[0027] In practice, servers are products with extremely high reliability requirements. Accurate fault location is a very important part of server use and maintenance. Server problem location is usually achieved by reading log information and judging the error information in the log records.

[0028] In existing technology, after the BMC collects the server's log information, it can send the log data to the terminal via a serial port. When the log information needs to be saved, the collected log information needs to be saved on the terminal through manual saving or other methods, thus storing the log information on the terminal device and achieving the recording and saving of server logs. This method of saving server logs has the following drawbacks: on the one hand, the terminal can only collect real-time logs, and logs generated when the terminal is not open cannot be obtained; on the other hand, the files saved on the terminal are easily lost due to terminal migration or other reasons; and furthermore, it generally requires manual operation, resulting in poor efficiency and accuracy in saving server logs.

[0029] Understandably, existing technologies cannot automatically save the server log information collected, resulting in unstable saving of the server logs obtained by the BMC, which may lead to partial loss of server log information, failure of server faults to be detected and troubleshooted in a timely manner, and low system reliability.

[0030] To address the aforementioned technical problems, this invention proposes the following technical concept: By using an automatic saving program, server log data can be collected, saved, and archived, thereby ensuring that server log data can be saved stably and completely. When a server malfunctions, the saved server log data can be used to locate the server problem in a timely manner, thereby improving the reliability of the system.

[0031] The technical solution of this application and how it solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The following description, in conjunction with... Figure 1 and Figure 2 The present invention describes a method for automatically saving server logs.

[0032] In practical applications, the entity executing this automatic server log saving method can be an automatic server log saving device. There are various ways to implement such a device. For example, it can be implemented through a computer program, such as application software; or, for example, a chip. It can also be implemented as a medium storing the relevant computer program, such as a USB flash drive or cloud storage; or, it can be implemented through a physical device that integrates or installs the relevant computer program, such as a server.

[0033] Figure 1 This is one of the flowcharts illustrating the automatic server log saving method provided by the present invention, such as... Figure 1 As shown, the method includes the following steps: 101 to 105.

[0034] Step 101: Run the first shell script to perform initialization processing, which includes: initializing the auto-save program, starting the log auto-save process, and obtaining the process resource usage and configuration information of the log auto-save process.

[0035] The automatic log saving process is the process corresponding to the initialization and saving program. The resources consumed by the automatic log saving process refer to the various system resources required to run the automatic log saving process, including but not limited to address space, global variables, semaphores, CPU resources, input / output (I / O) devices, memory, network resources, etc.

[0036] The configuration information for the automatic log saving process refers to the constraints on its operation. For example, this configuration includes the execution environment, the target folder identifier, and the target serial port number. The target folder is a pre-created folder on the Linux system used to store server log data, ensuring that the collected server log data is correctly stored in the corresponding storage. The target serial port refers to the serial port from which server log data is to be collected. In practice, during the initialization phase, a target serial port number is specified or generated for different BMC platforms. It can be understood that the target serial port number determines the target serial port, ensuring that server log data can be collected through that port subsequently.

[0037] In practice, shell scripts are scripting languages ​​used to write batch processing tasks, primarily for executing commands and controlling system operations within the Linux operating system. Shell scripts can call and execute Linux commands to achieve specific functions, such as batch renaming files. Furthermore, shell scripts can use conditional statements and loop control; they can use if statements to evaluate conditions and execute specific Linux commands, and use loop control structures to repeatedly execute certain Linux commands. Shell scripts can also define variables and functions to extend their functionality, simplifying and optimizing the script writing and maintenance process.

[0038] This invention is based on the Linux operating system used by BMC, and implements server log saving and archiving functions by writing and executing an auto-save program under the Linux system. Specifically, the program designed in this invention includes two types: shell scripts and application programs. In this embodiment, the auto-save program is initialized as an application program, used to collect, save, and archive server log data. The first shell script is used to initialize the auto-save program, start the log auto-save process, and obtain the resource usage and configuration information of the log auto-save process by interacting with the Linux system.

[0039] Optionally, in one example, after initializing the auto-save program and starting the log auto-save process, it is determined whether the log auto-save process has been started normally. If it has not been started normally, the first shell script is run again to perform initialization processing until the log auto-save process starts normally, thereby improving the accuracy and reliability of server log auto-saving.

[0040] Step 102: Collect server log data through the target serial port. The target serial port is obtained by enabling the LAN serial port function of the intelligent platform management interface protocol and redirecting the system's serial port information to the serial port of the baseboard management controller.

[0041] In practical applications, BMCs are generally equipped with Serial Over LAN (SOL) functionality. Remote hosts can enable SOL via the Intelligent Platform Management Interface (IPMI) protocol to send server log information to the BMC. The IPMI protocol is a comprehensive hardware management specification encompassing servers and other systems (such as storage devices, network and communication equipment). Through this specification, users can monitor the physical health characteristics of servers, such as temperature, voltage, fan status, and power supply status. SOL is a function within the IPMI protocol that provides remote access to a machine's serial port on a local area network. The primary goal of SOL is to redirect data from the local asynchronous serial controller interface to the remote end.

[0042] Specifically, by enabling the SOL function of the IPMI protocol, the system's serial port information is redirected to the BMC's serial port to obtain the target serial port. Furthermore, after the server logs are generated, server log data is collected through the target serial port.

[0043] Step 103: Record the server log data into a text file and temporarily save the text file to the target folder.

[0044] Step 104: Archive and save the text file to the storage.

[0045] Furthermore, after collecting the server log data, the server log data is temporarily saved to the target folder. In this embodiment, the server log data is recorded as a text file and temporarily saved to the target folder, facilitating the processing and archiving of the server log data before permanent storage for subsequent management. It is understood that the text file in the target folder will be erased after a system restart. To permanently save the server log data, the text file needs to be archived and permanently stored in the storage.

[0046] In this embodiment, the memory is not specifically limited. As an example, the memory can be the system's SPI flash memory, which can enable long-term storage of server log data.

[0047] In practical applications, text files can be archived and saved to storage in batches. For example, an archiving period can be set to merge multiple files collected by the target serial port within that period into a single log file, which is then archived and saved to storage. As another example, when server log data is large, the target folder may contain multiple text files; these files can be merged into a single log file, which is then archived and saved to storage.

[0048] Step 105: Release the resources occupied by the process that automatically saves logs.

[0049] Understandably, after archiving and saving text files to storage, the resources occupied by the log auto-saving process can be released in order to improve system efficiency.

[0050] In this embodiment, the BMC automatically saves server log data and automatically archives the saved server log data, which can obtain and save comprehensive and complete server log data, making it easier to locate server problems in a timely manner and improving the reliability of the system.

[0051] Based on the above description, the automatic log saving process needs to implement the functions of collecting, saving, and archiving server log data. Therefore, to further improve the efficiency of automatic server log saving, multiple threads can be created to implement the functions of collecting, saving, and archiving server log data. Specifically, in one possible implementation, after initializing the automatic saving program and starting the automatic log saving process, the automatic server log saving method further includes: creating a log collection thread, a log saving thread, and a log archiving thread under the automatic log saving process; initializing the log collection thread, the log saving thread, and the log archiving thread; acquiring the thread resources required by the log collection thread, the log saving thread, and the log archiving thread, and establishing a mutex lock.

[0052] Understandably, the log collection thread, log saving thread, and log archiving thread respectively implement the functions of collecting, saving, and archiving server log data. In this embodiment, under the automatic log saving process, log collection threads, log saving threads, and log archiving threads are created to implement the functions of collecting, saving, and archiving server log data, thereby improving the efficiency of automatic server log saving.

[0053] Specifically, threads within the same process share the process's address space and resources, such as memory, I / O, and CPU. This means that threads can directly access the process's resources without additional data copying, thus improving the efficiency of communication and resource sharing. For example, shared memory allows two or more processes to share a given memory area, which can be mapped into the address spaces of multiple processes. Information written to shared memory by one process can be read by other processes using this shared memory through simple memory read operations, achieving inter-process communication.

[0054] In practical applications, in a multithreaded environment, multiple threads may simultaneously attempt to access or modify the same resource (such as variables in memory, files, databases, etc.), which can lead to problems such as data inconsistency, dirty reads, data loss, or race conditions. To avoid these problems, mutexes allow only one thread to access or modify a specific resource at a time. Specifically, mutexes are used to protect shared resources, ensuring that only one thread can access the resource at any given time. When a thread attempts to acquire a mutex already held by another thread, it will be blocked until the lock is released.

[0055] In this embodiment, the thread resources required by the log collection thread, log saving thread, and log archiving thread are acquired, and a mutex lock is established to prevent multiple threads from trying to access or modify the same resource at the same time, thereby improving the reliability of automatic saving of server logs.

[0056] Specifically, for the process of collecting, saving, and archiving server log data, as an example, in one possible implementation, step 102 above includes: starting a log collection thread to obtain the encoding of the target serial port; reading the data in the serial port device corresponding to the encoding of the target serial port to obtain server log data, and temporarily storing the server log data in a string array; and calculating the string length of the string array.

[0057] Step 103 above includes: starting the log saving thread, creating a text file in the target folder, and determining the maximum string length that the text file can save; determining whether the string length of the string array exceeds the maximum string length that the text file can save; if it exceeds, creating a new supplementary text file in the target folder; locking the files in the target folder; writing the string array into the file in the target folder, and unlocking the files in the target folder after writing is complete.

[0058] Step 104 above includes: starting the log archiving thread and locking the files under the target file; generating an archive file name based on the number of archive files already saved in the storage and the current time; creating an archive file in the storage using the archive file name and storing the files under the target file into the archive file.

[0059] The target serial port encoding uniquely identifies the target serial port and can refer to the file identifier of a serial port device file registered under the Linux system. In practice, the target serial port can be determined based on its encoding, and data can be read from the serial port device corresponding to the target serial port encoding, i.e., data from the target serial port, to obtain the server log data. Further, the server log data is temporarily stored in a string array, and the string length is calculated for subsequent saving and archiving of the server log data.

[0060] In practical applications, the maximum string length that a text file can save can be preset. After starting the log saving thread, the maximum string length that a text file can save can be obtained. Furthermore, based on the string length of the string array and the maximum string length that a text file can save, it can be determined whether the string length of the string array exceeds the maximum string length that a text file can save.

[0061] Specifically, if the string length of the string array exceeds the maximum string length that the text file can save, a supplementary text file is added under the target file to ensure the complete preservation of server log data. File operation functions are used to open the files in the target folder, obtain the file identifiers of the text file and the supplementary text file, and lock the text file and the supplementary text file to prevent other processes from tampering with them. The string array is written to the text file and the supplementary text file, and the text file and the supplementary text file are unlocked after the writing is complete.

[0062] Correspondingly, if the length of the string array does not exceed the maximum string length that the text file can save, then the file in the target folder is opened using file operation functions, the file identifier of the text file is obtained, and the text file is locked to prevent other processes from tampering with it. The string array is written to the text file, and the text file is unlocked after the writing is complete.

[0063] Specifically, the log archiving thread is started, locking the files under the target file (i.e., locking the files to be archived) to prevent tampering with archived files. Further, the number of archived files already archived and the number of files to be archived in storage are determined. New archive filenames with the same format are generated in the previous order, and timestamp information is added based on the current time. For example, if there are two archived files already archived in storage, they are named "Archive File 1 + Timestamp 1" and "Archive File 2 + Timestamp 2," and there is one file to be archived, it is named "Archive File 3 + Timestamp 3," ensuring that the archive file path is unique and will not tamper with other archive files. Finally, the archive file is created in storage using the archive filename, and the files under the target file are stored in the archive file.

[0064] In this embodiment, the BMC automatically saves server log data and automatically archives the saved server log data, which can obtain and save comprehensive and complete server log data, making it easier to locate server problems in a timely manner and improving the reliability of the system.

[0065] In addition, in one possible implementation, after storing the files under the target file into the archive file, the above-mentioned automatic server log saving method further includes: recording the address of the archive file and configuration information.

[0066] In this embodiment, after storing the files under the target file into the archive file, the address and configuration information of the archive file are recorded. This facilitates timely acquisition of server log information when the server fails, making it easier to locate server problems and improving system reliability.

[0067] Based on the above description, the target folder is used to temporarily store server log data collected via the target serial port. Therefore, before running the first shell script for initialization, the target folder needs to be created in advance under the Linux system to ensure that the collected server log data can be correctly and stably stored in the storage. Furthermore, this invention supports automatic saving of server log data from remote terminals. For scenarios where remote synchronization of server logs is not required, as an example, in one possible implementation, before step 101, the automatic server log saving method further includes: if remote synchronization of server logs is not required, running a second shell script to create the target folder under the Linux system.

[0068] In this embodiment, the second shell script is run before the first shell script is run to perform initialization processing, and the target folder is created. This ensures that the server log data can be correctly and stably stored in the storage, thus improving the reliability of automatic saving of server logs.

[0069] Correspondingly, for scenarios requiring remote synchronization of server logs, as an example, in one possible implementation, Figure 2 This is the second flowchart of the server log automatic saving method provided by the present invention, as shown below. Figure 2 As shown, before step 101 above, the above-mentioned automatic server log saving method also includes step 201.

[0070] Step 201: If remote synchronization of server logs is required, run the third shell script to create a target folder and a synchronization folder under the Linux system, and mount the target folder and the synchronization folder.

[0071] Step 104 above includes: Step 202, the remote device obtains a text file in the synchronization folder and archives and saves the text file to the storage.

[0072] In practical applications, the content stored in the mounted target folder and the synchronized folder is consistent. That is, if the text file is stored in the target folder, the text file can be synchronously stored in the synchronized folder.

[0073] Specifically, during the initialization process, the remote synchronization function of the Linux system is enabled. Based on this, server log data is collected via the target serial port; the server log data is recorded as a text file and temporarily saved to the target folder, thus synchronizing the text file into the synchronization folder; the remote device retrieves the text file from the synchronization folder and archives it to its storage, enabling the remote device to save and archive server log data.

[0074] In this implementation, when remote synchronization of server logs is required, a third-party shell script is run to create a target folder and a synchronization folder on the Linux system, and then mounts both folders. Server log data is recorded as a text file, which is temporarily saved to the target folder. The remote device then retrieves the text file from the synchronization folder and archives it to its storage. This achieves automatic saving of server logs on the remote device, providing convenience and versatility for automatic server log saving.

[0075] In practical applications, to further improve the reliability of automatic server log saving, the automatic log saving process can be monitored in real time to ensure it is executing correctly. As an example, in one possible implementation, after initializing the automatic saving program and starting the automatic log saving process, the automatic server log saving method further includes: saving the process identifier of the automatic log saving process and registering the automatic log saving process in the Linux system's process monitoring.

[0076] In this embodiment, after initializing the auto-save program and starting the auto-save log process, the process identifier of the auto-save log process is saved, and the auto-save log process is registered in the process monitoring of the Linux system to realize real-time monitoring of the auto-save log process, ensure the normal execution of the auto-save log process, and improve the reliability of the server's auto-save logs.

[0077] Furthermore, in one possible implementation, prior to step 103, the automatic server log saving method further includes: filtering the server log data according to business needs to obtain the filtered server log data. Step 103 specifically includes: recording the filtered server log data as a text file and temporarily saving the text file to a target folder.

[0078] In the automatic server log saving method provided in this embodiment, initialization is performed by running a first shell script. The initialization process includes: initializing the automatic saving program and starting the automatic log saving process; obtaining the process resources and configuration information of the automatic log saving process; collecting server log data through a target serial port, wherein the target serial port is obtained by redirecting the system's serial port information to the serial port of the baseboard management controller by opening the LAN serial port function of the intelligent platform management interface protocol; recording the server log data into a text file and temporarily saving the text file to a target folder; archiving the text file to storage; and releasing the process resources occupied by the automatic log saving process. In this embodiment, by automatically saving server log data through the BMC and automatically archiving the saved server log data, comprehensive and complete server log data can be obtained and saved, facilitating timely location of server problems and improving system reliability.

[0079] The automatic server log saving device provided by the present invention is described below. The automatic server log saving device described below can be referred to in correspondence with the automatic server log saving method described above.

[0080] Figure 3 This is a schematic diagram of the server log automatic saving device provided by the present invention, as shown below. Figure 3 As shown, the server log automatic saving device includes: an initialization module 31, a log collection module 32, a log saving module 33, a log archiving module 34, and a resource management module 35.

[0081] The aforementioned initialization module 31 is used to run the first shell script for initialization processing, which includes: initializing the auto-save program, starting the log auto-save process, and obtaining the process resources and configuration information of the log auto-save process.

[0082] The automatic log saving process is the process corresponding to the initialization and saving program. The resources consumed by the automatic log saving process refer to the various system resources required to run the automatic log saving process, including but not limited to address space, global variables, semaphores, CPU resources, input / output (I / O) devices, memory, network resources, etc.

[0083] The configuration information for the automatic log saving process refers to the constraints on its operation. For example, this configuration includes the execution environment, the target folder identifier, and the target serial port number. The target folder is a pre-created folder on the Linux system used to store server log data, ensuring that the collected server log data is correctly stored in the corresponding storage. The target serial port refers to the serial port from which server log data is to be collected. In practice, during the initialization phase, a target serial port number is specified or generated for different BMC platforms. It can be understood that the target serial port number determines the target serial port, ensuring that server log data can be collected through that port subsequently.

[0084] In practice, shell scripts are scripting languages ​​used to write batch processing tasks, primarily for executing commands and controlling system operations within the Linux operating system. Shell scripts can call and execute Linux commands to achieve specific functions, such as batch renaming files. Furthermore, shell scripts can use conditional statements and loop control; they can use if statements to evaluate conditions and execute specific Linux commands, and use loop control structures to repeatedly execute certain Linux commands. Shell scripts can also define variables and functions to extend their functionality, simplifying and optimizing the script writing and maintenance process.

[0085] This invention is based on the Linux operating system used by BMC, and implements server log saving and archiving functions by writing and executing an auto-save program under the Linux system. Specifically, the program designed in this invention includes two types: shell scripts and application programs. In this embodiment, the auto-save program is initialized as an application program, used to collect, save, and archive server log data. The first shell script is used to initialize the auto-save program, start the log auto-save process, and obtain the resource usage and configuration information of the log auto-save process by interacting with the Linux system.

[0086] Optionally, in one example, after initializing the auto-save program and starting the log auto-save process, it is determined whether the log auto-save process has been started normally. If it has not been started normally, the first shell script is run again to perform initialization processing until the log auto-save process starts normally, thereby improving the accuracy and reliability of server log auto-saving.

[0087] The aforementioned log collection module 32 is used to collect server log data through a target serial port. The target serial port is obtained by redirecting the system's serial port information to the serial port of the baseboard management controller by opening the local area network serial port function of the intelligent platform management interface protocol.

[0088] In practical applications, BMCs are generally equipped with Serial Over LAN (SOL) functionality. Remote hosts can enable SOL via the Intelligent Platform Management Interface (IPMI) protocol to send server log information to the BMC. The IPMI protocol is a comprehensive hardware management specification encompassing servers and other systems (such as storage devices, network and communication equipment). Through this specification, users can monitor the physical health characteristics of servers, such as temperature, voltage, fan status, and power supply status. SOL is a function within the IPMI protocol that provides remote access to a machine's serial port on a local area network. The primary goal of SOL is to redirect data from the local asynchronous serial controller interface to the remote end.

[0089] Specifically, by enabling the SOL function of the IPMI protocol, the system's serial port information is redirected to the BMC's serial port to obtain the target serial port. Furthermore, after the server logs are generated, the log collection module 32 collects the server log data through the target serial port.

[0090] The log saving module 33 is used to record server log data as a text file and temporarily save the text file to the target folder.

[0091] The log archiving module 34 is used to archive and save text files to storage.

[0092] Furthermore, after collecting the server log data, the log storage module 33 temporarily saves the server log data to the target folder. In this embodiment, the server log data is recorded as a text file and temporarily saved to the target folder for easy processing and archiving, and then permanently stored in the storage for subsequent management. It is understood that the text file in the target folder will be erased after a system restart. To permanently save the server log data, the text file needs to be archived; the log archiving module 34 permanently saves the text file to the storage.

[0093] In this embodiment, the memory is not specifically limited. As an example, the memory can be the system's SPI flash memory, which can enable long-term storage of server log data.

[0094] In practical applications, text files can be archived and saved to storage in batches. For example, an archiving period can be set to merge multiple files collected by the target serial port within that period into a single log file, which is then archived and saved to storage. As another example, when server log data is large, the target folder may contain multiple text files; these files can be merged into a single log file, which is then archived and saved to storage.

[0095] Resource management module 35 is used to release the resources occupied by the process of automatically saving logs.

[0096] Understandably, after the text file is archived and saved to storage, in order to improve system efficiency, the resource management module 35 can release the resources occupied by the log auto-saving process.

[0097] In this embodiment, the BMC automatically saves server log data and automatically archives the saved server log data, which can obtain and save comprehensive and complete server log data, making it easier to locate server problems in a timely manner and improving the reliability of the system.

[0098] Based on the above description, the automatic log saving process needs to implement the functions of collecting, saving, and archiving server log data. Therefore, to further improve the efficiency of automatic server log saving, multiple threads can be created to implement the functions of collecting, saving, and archiving server log data. Specifically, in one possible implementation, the initialization module 31 is also used to: create a log collection thread, a log saving thread, and a log archiving thread under the automatic log saving process; initialize the log collection thread, the log saving thread, and the log archiving thread; acquire the thread resources required by the log collection thread, the log saving thread, and the log archiving thread, and establish a mutex lock.

[0099] Understandably, the log collection thread, log saving thread, and log archiving thread respectively implement the functions of collecting, saving, and archiving server log data. In this embodiment, the initialization module 31 creates the log collection thread, log saving thread, and log archiving thread under the automatic log saving process to implement the functions of collecting, saving, and archiving server log data, thereby improving the efficiency of automatic server log saving.

[0100] Specifically, threads within the same process share the process's address space and resources, such as memory, I / O, and CPU. This means that threads can directly access the process's resources without additional data copying, thus improving the efficiency of communication and resource sharing. For example, shared memory allows two or more processes to share a given memory area, which can be mapped into the address spaces of multiple processes. Information written to shared memory by one process can be read by other processes using this shared memory through simple memory read operations, achieving inter-process communication.

[0101] In practical applications, in a multithreaded environment, multiple threads may simultaneously attempt to access or modify the same resource (such as variables in memory, files, databases, etc.), which can lead to problems such as data inconsistency, dirty reads, data loss, or race conditions. To avoid these problems, mutexes allow only one thread to access or modify a specific resource at a time. Specifically, mutexes are used to protect shared resources, ensuring that only one thread can access the resource at any given time. When a thread attempts to acquire a mutex already held by another thread, it will be blocked until the lock is released.

[0102] In this embodiment, the thread resources required by the log collection thread, log saving thread, and log archiving thread are acquired, and a mutex lock is established to prevent multiple threads from trying to access or modify the same resource at the same time, thereby improving the reliability of automatic saving of server logs.

[0103] Specifically, regarding the process of collecting, saving, and archiving server log data, as an example, in one possible implementation, the log collection module 32 described above is specifically used to: start a log collection thread, obtain the encoding of the target serial port; read the data in the serial port device corresponding to the encoding of the target serial port to obtain server log data, and temporarily store the server log data in a string array; and calculate the string length of the string array.

[0104] The log saving module 33 described above is specifically used for: starting the log saving thread, creating a text file in the target folder, and determining the maximum string length that the text file can save; determining whether the string length of the string array exceeds the maximum string length that the text file can save; if it exceeds, creating a new supplementary text file in the target folder; locking the file in the target folder; writing the string array to the file in the target folder, and unlocking the file in the target folder after the writing is completed.

[0105] The aforementioned log archiving module 34 is specifically used for: starting the log archiving thread and locking the files under the target file; generating an archive file name based on the number of archive files already saved in the storage and the current time; creating an archive file in the storage using the archive file name and storing the files under the target file into the archive file.

[0106] The target serial port encoding uniquely identifies the target serial port and can refer to the file identifier of a serial port device file registered under the Linux system. In practice, the target serial port can be determined based on its encoding, and data can be read from the serial port device corresponding to the target serial port encoding, i.e., data from the target serial port, to obtain the server log data. Further, the server log data is temporarily stored in a string array, and the string length is calculated for subsequent saving and archiving of the server log data.

[0107] In practical applications, the maximum string length that a text file can save can be preset. After starting the log saving thread, the maximum string length that a text file can save can be obtained. Furthermore, based on the string length of the string array and the maximum string length that a text file can save, it can be determined whether the string length of the string array exceeds the maximum string length that a text file can save.

[0108] Specifically, if the string length of the string array exceeds the maximum string length that the text file can save, a supplementary text file is added under the target file to ensure the complete preservation of server log data. File operation functions are used to open the files in the target folder, obtain the file identifiers of the text file and the supplementary text file, and lock the text file and the supplementary text file to prevent other processes from tampering with them. The string array is written to the text file and the supplementary text file, and the text file and the supplementary text file are unlocked after the writing is complete.

[0109] Correspondingly, if the length of the string array does not exceed the maximum string length that the text file can save, then the file in the target folder is opened using file operation functions, the file identifier of the text file is obtained, and the text file is locked to prevent other processes from tampering with it. The string array is written to the text file, and the text file is unlocked after the writing is complete.

[0110] Specifically, the log archiving thread is started, locking the files under the target file (i.e., locking the files to be archived) to prevent tampering with archived files. Further, the number of archived files already archived and the number of files to be archived in storage are determined. New archive filenames with the same format are generated in the previous order, and timestamp information is added based on the current time. For example, if there are two archived files already archived in storage, they are named "Archive File 1 + Timestamp 1" and "Archive File 2 + Timestamp 2," and there is one file to be archived, it is named "Archive File 3 + Timestamp 3," ensuring that the archive file path is unique and will not tamper with other archive files. Finally, the archive file is created in storage using the archive filename, and the files under the target file are stored in the archive file.

[0111] In this embodiment, the BMC automatically saves server log data and automatically archives the saved server log data, which can obtain and save comprehensive and complete server log data, making it easier to locate server problems in a timely manner and improving the reliability of the system.

[0112] In addition, in one possible implementation, the above-mentioned automatic server log saving device further includes a recording module for recording the address of the archived file and configuration information.

[0113] In this embodiment, after storing the files under the target file into the archive file, the address and configuration information of the archive file are recorded. This facilitates timely acquisition of server log information when the server fails, making it easier to locate server problems and improving system reliability.

[0114] Based on the above description, the target folder is used to temporarily store server log data collected via the target serial port. Therefore, before running the first shell script for initialization, the target folder needs to be created in advance under the Linux system to ensure that the collected server log data can be correctly and stably stored in the storage. Furthermore, this invention supports automatic saving of server log data from remote terminals. For scenarios where remote synchronization of server logs is not required, as an example, in one possible implementation, the above-mentioned automatic server log saving device further includes: a creation module, used to run a second shell script to create the target folder under the Linux system if remote synchronization of server logs is not required.

[0115] In this embodiment, the second shell script is run before the first shell script is run to perform initialization processing, and the target folder is created. This ensures that the server log data can be correctly and stably stored in the storage, thus improving the reliability of automatic saving of server logs.

[0116] Correspondingly, for scenarios requiring remote synchronization of server logs, as an example, in one possible implementation, the above-mentioned creation module is also used to: if remote synchronization of server logs is required, run a third shell script to create a target folder and a synchronization folder under the Linux system, and mount the target folder and the synchronization folder.

[0117] The aforementioned log archiving module 34 is specifically used for: the remote device to obtain a text file in the synchronization folder and archive and save the text file to the storage.

[0118] In practical applications, the content stored in the mounted target folder and the synchronized folder is consistent. That is, if the text file is stored in the target folder, the text file can be synchronously stored in the synchronized folder.

[0119] Specifically, during the initialization process, the remote synchronization function of the Linux system is enabled. Based on this, server log data is collected via the target serial port; the server log data is recorded as a text file and temporarily saved to the target folder, thus synchronizing the text file into the synchronization folder; the remote device retrieves the text file from the synchronization folder and archives it to its storage, enabling the remote device to save and archive server log data.

[0120] In this implementation, when remote synchronization of server logs is required, a third-party shell script is run to create a target folder and a synchronization folder on the Linux system, and then mounts both folders. Server log data is recorded as a text file, which is temporarily saved to the target folder. The remote device then retrieves the text file from the synchronization folder and archives it to its storage. This achieves automatic saving of server logs on the remote device, providing convenience and versatility for automatic server log saving.

[0121] In practical applications, to further improve the reliability of automatic server log saving, the automatic log saving process can be monitored in real time to ensure it is executing correctly. As an example, in one possible implementation, the aforementioned automatic server log saving device further includes a process monitoring module, used to store the process identifier of the automatic log saving process and register the automatic log saving process in the Linux system's process monitoring.

[0122] In this embodiment, after initializing the auto-save program and starting the auto-save log process, the process identifier of the auto-save log process is saved, and the auto-save log process is registered in the process monitoring of the Linux system to realize real-time monitoring of the auto-save log process, ensure the normal execution of the auto-save log process, and improve the reliability of the server's auto-save logs.

[0123] Furthermore, in one possible implementation, the aforementioned automatic server log saving device further includes a filtering module, used to filter server log data according to business needs, and obtain the filtered server log data. Specifically, the log saving module 33 is used to record the filtered server log data as a text file and temporarily save the text file to a target folder.

[0124] In the server log auto-saving device provided by this invention, the initialization module performs initialization processing by running a first shell script. The initialization process includes: initializing the auto-saving program, starting the log auto-saving process, and obtaining the process resources and configuration information of the log auto-saving process. The log collection module collects server log data through a target serial port, which is obtained by redirecting the system's serial port information to the serial port of the baseboard management controller by opening the LAN serial port function of the intelligent platform management interface protocol. The log saving module records the server log data as a text file and temporarily saves the text file to a target folder. The log archiving module archives the text file to a storage device; the resource management module releases the process resources occupied by the log auto-saving process. In this invention, by automatically saving server log data through the BMC and automatically archiving the saved server log data, comprehensive and complete server log data can be obtained and saved, facilitating timely location of server problems and improving system reliability.

[0125] Figure 4 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440. The processor 410, communication interface 420, and memory 430 communicate with each other via the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute an automatic server log saving method. This method includes: running a first shell script for initialization processing, which includes: initializing the automatic saving program and starting the automatic log saving process; obtaining the process resources and configuration information of the automatic log saving process; collecting server log data through a target serial port, wherein the target serial port is obtained by opening the LAN serial port function of the intelligent platform management interface protocol and redirecting the system's serial port information to the serial port of the baseboard management controller; recording the server log data into a text file and temporarily saving the text file to a target folder; archiving the text file to the memory; and releasing the process resources occupied by the automatic log saving process.

[0126] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0127] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the server log automatic saving method provided by the above methods. The method includes: running a first shell script for initialization processing, the initialization processing including: initializing the automatic saving program and starting the log automatic saving process; obtaining the process resources and configuration information of the log automatic saving process; collecting server log data through a target serial port, wherein the target serial port is obtained by opening the local area network serial port function of the intelligent platform management interface protocol and redirecting the system's serial port information to the serial port of the baseboard management controller; recording the server log data as a text file and temporarily saving the text file to a target folder; archiving the text file to a memory; and releasing the process resources occupied by the log automatic saving process.

[0128] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the server log automatic saving method provided by the above methods. The method includes: running a first shell script for initialization processing, the initialization processing including: initializing the automatic saving program and starting the log automatic saving process; obtaining the process resources and configuration information of the log automatic saving process; collecting server log data through a target serial port, wherein the target serial port is obtained by opening the local area network serial port function of the intelligent platform management interface protocol and redirecting the system's serial port information to the serial port of the baseboard management controller; recording the server log data as a text file and temporarily saving the text file to a target folder; archiving the text file to a memory; and releasing the process resources occupied by the log automatic saving process.

[0129] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0130] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatically saving server logs, characterized in that, include: The first shell script is run to perform initialization processing, which includes: initializing the auto-save program, starting the log auto-save process; and obtaining the process resource usage and configuration information of the log auto-save process. Server log data is collected through a target serial port, wherein the target serial port is obtained by redirecting the system's serial port information to the serial port of the baseboard management controller by opening the local area network serial port function of the intelligent platform management interface protocol. Record the server log data into a text file and temporarily save the text file to the target folder; The text file is archived and saved to the storage device; Release the process resources occupied by the automatic log saving process; After initializing the auto-save program and starting the log auto-save process, the method further includes: Under the automatic log saving process, a log collection thread, a log saving thread, and a log archiving thread are created; the log collection thread, the log saving thread, and the log archiving thread are initialized; the thread resources required by the log collection thread, the log saving thread, and the log archiving thread are acquired, and a mutex lock is established; The process of collecting server log data via the target serial port includes: Start the log collection thread to obtain the encoding of the target serial port; read the data in the serial port device corresponding to the encoding of the target serial port to obtain the server log data, and temporarily store the server log data in a string array; calculate the string length of the string array; The step of recording the server log data into a text file and temporarily saving the text file to the target folder includes: Start the log saving thread, create a text file in the target folder, and determine the maximum string length that the text file can save; determine whether the string length of the string array exceeds the maximum string length that the text file can save; if it exceeds, create a new supplementary text file in the target folder; lock the files in the target folder; write the string array into the file in the target folder, and unlock the files in the target folder after writing is complete; The step of archiving and saving the text file to the storage device includes: Start the log archiving thread and lock the files under the target file; generate an archive file name based on the number of archive files already saved in the storage and the current time; create an archive file in the storage using the archive file name, and store the files under the target file into the archive file.

2. The method for automatically saving server logs according to claim 1, characterized in that, After storing the files under the target file into the archive file, the method further includes: Record the address of the archived file and the configuration information.

3. The method for automatically saving server logs according to claim 1, characterized in that, Before running the first shell script for initialization, the method further includes: If remote synchronization of server logs is not required, run the second shell script to create the target folder under the Linux system; otherwise, run the third shell script to create the target folder and the synchronization folder under the Linux system, and mount the target folder and the synchronization folder. When remote synchronization of server logs is required, the step of archiving and saving the text file to the storage specifically includes: the remote device obtaining the text file from the synchronization folder and archiving and saving the text file to the storage.

4. The method for automatically saving server logs according to any one of claims 1-3, characterized in that, After initializing the auto-save program and starting the log auto-save process, the method further includes: Save the process identifier of the auto-log saving process and register the auto-log saving process in the Linux system's process monitoring.

5. A server log automatic saving device, characterized in that, include: The initialization module is used to run the first shell script to perform initialization processing, which includes: initializing the auto-save program, starting the log auto-save process, and obtaining the process resource usage and configuration information of the log auto-save process. The log collection module is used to collect server log data through a target serial port, wherein the target serial port is obtained by redirecting the system's serial port information to the serial port of the baseboard management controller by opening the local area network serial port function of the intelligent platform management interface protocol. The log saving module is used to record the server log data as a text file and temporarily save the text file to the target folder; The log archiving module is used to archive and save the text files to the storage device; The resource management module is used to release the process resources occupied by the automatic log saving process; The initialization module is also used for: Under the automatic log saving process, a log collection thread, a log saving thread, and a log archiving thread are created; the log collection thread, the log saving thread, and the log archiving thread are initialized; the thread resources required by the log collection thread, the log saving thread, and the log archiving thread are acquired, and a mutex lock is established; The log collection module is specifically used for: Start the log collection thread to obtain the encoding of the target serial port; read the data in the serial port device corresponding to the encoding of the target serial port to obtain the server log data, and temporarily store the server log data in a string array; calculate the string length of the string array; The log saving module is specifically used for: Start the log saving thread, create a text file in the target folder, and determine the maximum string length that the text file can save; determine whether the string length of the string array exceeds the maximum string length that the text file can save; if it exceeds, create a new supplementary text file in the target folder; lock the files in the target folder; write the string array into the file in the target folder, and unlock the files in the target folder after writing is complete; The log archiving module is specifically used for: Start the log archiving thread and lock the files under the target file; generate an archive file name based on the number of archive files already saved in the storage and the current time; create an archive file in the storage using the archive file name, and store the files under the target file into the archive file.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the automatic server log saving method as described in any one of claims 1 to 4.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the automatic server log saving method as described in any one of claims 1 to 4.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the automatic server log saving method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Log collecting method and device

    CN108153654A

  • Multi-process browser process log collection method, device, and mobile terminal

    CN108255674A