A log collection method, device, apparatus and storage medium

By enabling real-time monitoring and fault log collection of server hard drives through the BMC web management page, generating detailed information status reports, the problems of hard drive anomaly log monitoring and data protection are solved, the hard drive password recovery process is simplified, and the efficiency of hard drive fault analysis and data protection is improved.

CN115543744BActive Publication Date: 2026-03-31INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing technologies cannot effectively monitor and collect abnormal logs of server hard drives, cannot perform data backup and recovery, and the formatting operation is complicated and cumbersome when the hard drive password is forgotten after encryption, and cannot erase the hard drive data with the set password.

Method used

The BMC web management page enables real-time monitoring of server component information, generation of detailed status reports, data transfer to backup storage pool, blocking and analysis of fault logs, and provides password recovery and clearing functions.

Benefits of technology

It enables real-time monitoring and log collection of hard drive failures, supports data protection and recovery, simplifies the password recovery process, and improves testing efficiency and hard drive data security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115543744B_ABST
    Figure CN115543744B_ABST
Patent Text Reader

Abstract

The application discloses a log collection method and device, equipment and storage medium, and relates to the technical field of computers, and comprises the following steps: searching and collecting information of a target component in a server through a BMC web management page, generating a dynamic component detailed information state report, and displaying the component detailed information state report on the BMC web management page; when it is monitored that data in the target component changes, transmitting current data in the target component to a backup data storage pool; when it is detected that the target component fails, locking data in the backup data storage pool and generating and printing fault log information of the target component in a fault log option of the component detailed information state report. The application can realize real-time monitoring of the component through the BMC web and the backup data storage pool, collect logs of abnormal conditions of the component according to the component state, is favorable for realizing fault analysis and elimination of the component, and can better protect data of the component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a log collection method, apparatus, device, and storage medium. Background Technology

[0002] The BMC (Baseboard Management Controller) is primarily used to monitor the health status of various server components (CPU (Central Processing Unit), memory, hard drive, fans, chassis, etc.), including temperature and voltage. It also adjusts fan speeds in real-time based on temperature data from various monitoring points to prevent overheating and control overall power consumption. If any board component malfunctions, it promptly reports the information to the upper-level network management system using various common protocols such as SNMP (Simple Network Management Protocol), SMTP (Simple Mail Transfer Protocol), and Redfish, enabling maintenance personnel to address the issue promptly and ensure uninterrupted service.

[0003] Functionally, the BMC (Block Controller) is primarily used to collect various information from a single server and provide it to upper-layer network management software. Currently, there are two main processing methods: one is through various interfaces provided by the BMC for upper-layer network management to query, such as web, command-line, and other human-machine interfaces, or SNMP, IPMI (Intelligent Platform Management Interface), and RESTful interfaces; the other is proactive reporting. When a fault is detected, the BMC can report it to the server of the upper-layer network management software via SNMP trap messages, SMTP email messages, Redfish HTTP JSON messages, etc., so that maintenance personnel can promptly identify and handle the fault. Generally, the messages reported by the BMC software will clearly indicate the specific component experiencing the fault and provide handling suggestions.

[0004] Some critical components of a server, such as hard drives, play a vital role in storage and server operation, making the security and reliability of their data extremely important. However, hard drives often face issues such as boot failures, being undetectable, unexplained loss of system files, inability to start normally, and system crashes with black screens. In these situations, real-time monitoring of the hard drive, collection and analysis of its anomaly logs, and data protection become crucial. Currently, however, systems can only monitor hard drive power consumption and cannot collect specific error logs, nor can they perform data backup and recovery. Furthermore, while disk encryption can protect information and prevent unauthorized access to internal data, users often forget their passwords after encryption. This necessitates formatting the hard drive under a specific operating system, a complex and cumbersome process that limits its effectiveness. It cannot format a password-protected hard drive; it can only format the entire drive, erasing all its contents. Summary of the Invention

[0005] In view of this, the purpose of this application is to provide a log collection method, apparatus, device and storage medium that can monitor components in real time and collect logs of abnormal conditions based on the component status, which is beneficial for component fault analysis and troubleshooting, and can better protect component data.

[0006] The specific plan is as follows:

[0007] Firstly, this application discloses a log collection method, including:

[0008] The BMC web management page is used to retrieve and collect information about the target components used to store data in the server, generate a dynamic component details status report, and display the component details status report in real time on the BMC web management page.

[0009] When a change is detected in the data of the target component, the current data in the target component is transferred to the backup data storage pool;

[0010] When a fault is detected in the target component, the data in the backup data storage pool is blocked, and the fault log information of the target component is generated and printed in the fault log option of the component detailed information status report. This allows testers to download the fault log option from the BMC web management page and analyze the fault log information in the fault log option.

[0011] Optionally, the step of retrieving and collecting information about the target component used for data storage on the server through the BMC web management page, and generating a dynamic component detail status report, includes:

[0012] By using the BMC web management page and based on the general input / output ports, information about the hard drives in the server is retrieved and collected, generating a dynamic component details status report.

[0013] Optionally, transferring the current data from the target component to a backup data storage pool includes:

[0014] The current data in the target component is transmitted to the backup data storage pool via the baseboard management controller based on the characteristic information and status information of the target component.

[0015] Optionally, after generating and printing the fault log information of the target component in the fault log option of the component detailed information status report, the method further includes:

[0016] Once the fault in the target firmware is detected and eliminated, the data in the target component is compared with the data in the backup data storage pool to obtain the comparison result.

[0017] If the comparison result shows that the data in the target component is consistent with the data in the backup data storage pool, then the data in the backup data storage pool is unlocked so that the data in the target component can continue to be backed up synchronously.

[0018] If the comparison result indicates that the data in the target component and the data in the backup data storage pool are inconsistent, then the data in the target component is deleted, and the data in the unlocked backup data storage pool is copied to the target component.

[0019] Optionally, after deleting the data in the target component and copying the unlocked data from the backup data storage pool to the target component, the method further includes:

[0020] The baseboard management controller monitors the number of times the user enters an incorrect password for the target component. If the number of incorrect passwords exceeds a preset number, the target component's status is set to "forgot password," and the target component's data is blocked.

[0021] In the BMC web management page, select the blocked target component and import the .key certificate generated when setting the password for the target component in the setup interface;

[0022] The user's identity is verified using the .key certificate. If the verification is successful, three options are generated on the BMC web management page: restore initial value, clear password, and change password. The user can then select these options to perform the corresponding operations of restoring the target component to its initial state, clearing the password of the target component, and changing the password of the target component.

[0023] Optionally, the operations of restoring the target component to its initial state, clearing the password of the target component, and changing the password of the target component by having the user select the options include:

[0024] If the user selects the option to restore the initial value, the data in the target component and the backup data storage pool that were blocked by the baseboard management controller will be deleted, the target component will be restored to its initial state, and the password status of the target component will be displayed as "no password set" on the BMC web management page.

[0025] If the user selects the option to clear the password, the data in the target component that was blocked by the baseboard management controller will be unlocked, the password of the target component will be cleared, and the password status of the target component will be displayed as "no password set" on the BMC web management page.

[0026] If the user selects the option to change the password, the data in the target component that was blocked by the baseboard management controller is unlocked, the password of the target component is deleted, a prompt message is generated to prompt the user to reset the password, and after obtaining the new password set by the user, the password status of the target component is displayed as "password set" on the BMC web management page, and a new .key certificate is generated for user identity verification.

[0027] Optionally, after performing the operations of restoring the target component to its initial state, clearing the password of the target component, and changing the password of the target component by having the user select the options, the method further includes:

[0028] The baseboard management controller determines whether the target component has been successfully restored to its initial value, whether the password of the target component has been successfully cleared, and whether the password of the target component has been successfully changed, and obtains the determination result.

[0029] If the judgment result is successful, a success message will be displayed on the BMC web management page, and the information of the target component will be re-retrieved and collected to generate a new dynamic component detailed information status report, which will be displayed in real time on the BMC web management page.

[0030] If the judgment result is a failure, a message indicating that the operation failed will be displayed on the BMC web management page.

[0031] Secondly, this application discloses a log collection device, comprising:

[0032] The retrieval and collection module is used to retrieve and collect information about target components stored on the server through the BMC web management page, and generate a dynamic component details status report.

[0033] The display module is used to display detailed information and status reports of the component in real time on the BMC web management page.

[0034] The data transmission module is used to transmit the current data in the target component to the backup data storage pool when a change in the data in the target component is detected.

[0035] The blocking module is used to block the data in the backup data storage pool when a failure is detected in the target component;

[0036] The log generation and printing module is used to generate and print the fault log information of the target component in the fault log option of the component detailed information status report, so that testers can download the fault log option from the BMC web management page and analyze the fault log information in the fault log option.

[0037] Thirdly, this application discloses an electronic device, including a processor and a memory; wherein the processor implements the aforementioned log collection method when executing a computer program stored in the memory.

[0038] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned log collection method.

[0039] As can be seen, this application first retrieves and collects information about the target component used for data storage on the server through the BMC web management page, generating a dynamic component details status report, which is then displayed in real time on the BMC web management page. When a change in data within the target component is detected, the current data in the target component is transferred to a backup data storage pool. When a fault is detected in the target component, the data in the backup data storage pool is blocked, and the fault log information of the target component is generated and printed in the fault log option of the component details status report. This allows testers to download the fault log option from the BMC web management page and analyze the fault log information within it. This application enables real-time monitoring of components through the BMC web and backup data storage pool, and collects logs of abnormal conditions based on the component status, which is beneficial for component fault analysis and troubleshooting, while also providing better protection for component data. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of this application 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 only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0041] Figure 1 This is a flowchart of a log collection method disclosed in this application;

[0042] Figure 2 This is a flowchart of a specific log collection method disclosed in this application;

[0043] Figure 3 This is a schematic diagram of the structure of a log collection device disclosed in this application;

[0044] Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0046] This application discloses a log collection method, see [link to relevant documentation] Figure 1 As shown, the method includes:

[0047] Step S11: Retrieve and collect information about the target component used to store data in the server through the BMC web management page, generate a dynamic component detailed information status report, and display the component detailed information status report in real time on the BMC web management page.

[0048] It should be noted that in this embodiment, a BMC web management page needs to be created first to integrate dynamic monitoring, fault location, and data recovery of target components used for data storage on the server. Through this BMC web management page, the target components can be monitored in real time, their fault serial port logs can be collected, the data recorded in the target components can be recovered, and the passwords of the target components can be cleared, retrieved, or changed online. After the BMC web management page is created, the user logs in to the BMC web management page, then opens the management interface of the target component. Next, the information of the currently inserted target component is retrieved and collected through the BMC web management page, generating a dynamic component details status report, which is then displayed in real time on the BMC web management page. The target components include, but are not limited to, hard drives, SSDs (Solid State Drives), HDDs (Hard Disk Drives), and RAID (Redundant Arrays of Independent Disks) cards. The detailed component status report includes, but is not limited to, the target component's model, speed, current usage status, current server location, and whether a password has been set. It should be noted that the data in the detailed component status report will change in real time according to specific circumstances and will be displayed on the BMCweb management page mentioned above.

[0049] Step S12: When a change in the data in the target component is detected, the current data in the target component is transferred to the backup data storage pool.

[0050] In this embodiment, after the component details status report is displayed in real time on the BMC web management page, when a change in the data in the target component is detected, if the target component is operated accordingly or new data is added to the target component, the current data in the target component is further transferred to a pre-created backup data storage pool.

[0051] In one specific implementation, the step of transferring the current data from the target component to the backup data storage pool may specifically include: transferring the current data from the target component to the backup data storage pool via a baseboard management controller based on the characteristic information and status information of the target component. For example, the BMC (Baseboard Management Controller) automatically transfers data such as the model, usage status, and server location of each hard drive to the backup data storage pool, while simultaneously synchronizing the data in the backup data storage pool with the data on the hard drives.

[0052] Step S13: When a fault is detected in the target component, the data in the backup data storage pool is blocked, and the fault log information of the target component is generated and printed in the fault log option of the component detailed information status report, so that testers can download the fault log option from the BMC web management page and analyze the fault log information in the fault log option.

[0053] In this embodiment, after the current data in the target component is transmitted to the backup data storage pool, the switch for synchronizing the target component is turned on. When a fault is detected in the target component, the data in the backup data storage pool will be temporarily blocked. That is, the data in the target component will be temporarily unable to be synchronized to the backup data storage pool. At this time, the hardware and software fault logs of the target component are automatically generated and printed in the fault log option according to the status of the target component and the time sequence. Testers can download and export the fault log option through the BMC web management page and then analyze the fault log information contained in the fault log option.

[0054] Furthermore, after generating and printing the fault log information of the target component in the fault log option of the component detailed information status report, the process may further include: after detecting that the fault of the target firmware has been eliminated, comparing the data in the target component with the data in the backup data storage pool to obtain a comparison result; if the comparison result shows that the data in the target component and the data in the backup data storage pool are consistent, then unlocking the data in the backup data storage pool to continue synchronously backing up the data in the target component; if the comparison result shows that the data in the target component and the data in the backup data storage pool are inconsistent, then deleting the data in the target component and copying the unlocked data in the backup data storage pool to the target component. In this embodiment, after detecting that the fault of the target firmware has been eliminated, comparing the data in the target component with the data in the backup data storage pool, if the comparison result shows that the two data are consistent, the data in the backup data storage pool will be unlocked, and synchronous backup of the data in the target component will continue; if the comparison result shows that the two data are inconsistent, then deleting the data in the target component, then unlocking the data in the backup data storage pool and copying it to the target component, thereby realizing the recovery of the data in the target component.

[0055] As can be seen, this embodiment first retrieves and collects information about the target component used for data storage on the server through the BMC web management page, generating a dynamic component details status report. This report is then displayed in real-time on the BMC web management page. When a change in data within the target component is detected, the current data is transferred to a backup data storage pool. When a fault is detected in the target component, the data in the backup data storage pool is blocked, and the fault log information of the target component is generated and printed in the fault log option of the component details status report. This allows testers to download the fault log option from the BMC web management page and analyze the fault log information. This embodiment, through the BMC web and backup data storage pool, enables real-time monitoring of components and collects logs of abnormal conditions based on component status. This facilitates component fault analysis and troubleshooting, while also providing better protection for component data.

[0056] This application discloses a specific log collection method. See [link to relevant documentation] Figure 2 As shown, the method includes:

[0057] Step S21: Retrieve and collect information about the hard disk in the server through the BMC web management page and based on the general input / output port, generate a dynamic component detailed information status report, and display the component detailed information status report in real time on the BMC web management page.

[0058] In this embodiment, information about the hard drive in the server is first retrieved and collected through a pre-created BMC web management page and a general-purpose input / output port (GPIO) to generate a dynamic component details status report. This report is then displayed in real-time on the BMC web management page. The component details status report includes, but is not limited to, information such as the hard drive's model, speed, current usage status, current server location, and whether a password has been set for the hard drive.

[0059] Step S22: When a change in the data in the hard disk is detected, the current data in the hard disk is transferred to the backup data storage pool. The current data in the hard disk is transferred to the backup data storage pool through the baseboard management controller based on the characteristic information and status information of the hard disk.

[0060] In this embodiment, after the detailed information status report of the component is displayed in real time on the BMC web management page, when it is detected that data is stored on the hard drive or there is a corresponding operation, the baseboard management controller will automatically transfer the data in the hard drive to the backup data storage pool according to the model, usage, and server location of each hard drive.

[0061] Step S23: When a hard disk failure is detected, the data in the backup data storage pool is blocked, and the hard disk failure log information is generated and printed in the failure log option of the component details status report, so that testers can download the failure log option from the BMC web management page and analyze the failure log information in the failure log option.

[0062] Step S24: After the hard drive failure is detected and resolved, the data in the hard drive is compared with the data in the backup data storage pool to obtain the comparison result.

[0063] Step S25: If the comparison result shows that the data in the hard disk is consistent with the data in the backup data storage pool, then unlock the data in the backup data storage pool so as to continue to synchronize and back up the data in the hard disk.

[0064] Step S26: If the comparison result shows that the data in the hard disk and the data in the backup data storage pool are inconsistent, then delete the data in the hard disk and copy the unlocked data in the backup data storage pool to the hard disk.

[0065] Step S27: The baseboard management controller monitors the number of times the user enters the wrong password for the hard drive. If the number of wrong passwords exceeds a preset number, the hard drive is set to the "forgot password" status and the data on the hard drive is blocked.

[0066] In this embodiment, after the data in the backup data storage pool is copied to the hard drive after being unlocked, the baseboard management controller can also monitor the number of times the user enters the wrong password for the hard drive. If the number of wrong passwords exceeds the preset number, the baseboard management controller will automatically detect the anomaly, set the status of the hard drive to "forgot password", and block the data in the hard drive to prevent the hard drive data from being forcibly destroyed.

[0067] Step S28: Select the blocked hard drive on the BMC web management page and import the .key certificate generated when setting the password for the hard drive in the setup interface.

[0068] Furthermore, on the BMC web management page, select the blocked hard drive and import the .key certificate generated when setting the password for the hard drive in the setup interface. It should be noted that when the user sets the hard drive password in the setup interface, the BMC web management page simultaneously generates a .key certificate for later identity verification. This .key certificate is automatically backed up and saved on the BMC web management page, and the status in the component details report will automatically update to display "Password set". Additionally, after the hard drive password is set, the user can export and save the certificate file. Since different hard drive passwords correspond to different certificate files, the certificate file can indicate the corresponding hard drive model, location, etc., for better user identification.

[0069] Step S29: Verify the user's identity using the .key certificate. If the verification is successful, generate three options on the BMC web management page: Restore Initial Value, Clear Password, and Change Password. This allows the user to select the option to perform the corresponding operations of restoring the hard drive to its initial state, clearing the hard drive's password, and changing the hard drive's password.

[0070] In this embodiment, after importing the .key certificate generated when setting the password of the hard drive in the setup interface, the user's identity can be verified using the .key certificate. If the verification is successful, three options will appear on the BMC web management page: restore initial value, clear password, and change password. When the user selects any of the three options, the corresponding operation will be performed. For example, if the user selects the restore initial value option, the hard drive will be restored to its initial state; if the user selects the clear password option, the password of the hard drive will be cleared; and if the user selects the change password option, the password of the hard drive will be changed.

[0071] Specifically, the operations of restoring the hard drive to its initial state, clearing the hard drive's password, and changing the hard drive's password by having the user select the options can include: if the user selects the option to restore the initial value, then the data in the hard drive and the backup data storage pool that were blocked by the baseboard management controller are deleted, the hard drive is restored to its initial state, and the password status of the hard drive is displayed as "no password set" on the BMC web management page; if the user selects the option to clear the password, then the data in the hard drive that was blocked by the baseboard management controller is unlocked, the password of the hard drive is cleared, and the password status of the hard drive is displayed as "no password set" on the BMC web management page; if the user selects the option to change the password, then the data in the hard drive that was blocked by the baseboard management controller is unlocked, the password of the hard drive is deleted, a prompt message prompting the user to reset the password is generated, and after obtaining the new password set by the user, the password status of the hard drive is displayed as "password set" on the BMC web management page, and a new .key certificate for user identity verification is generated. In other words, if the user selects the option to restore initial values, the data blocked by the baseboard management controller will be deleted, and the data in the backup data storage pool will also be deleted accordingly. The hard drive will then be restored to its initial state. Additionally, the BMC web management page will display the hard drive password status as "No password set," and the corresponding hard drive memory and other parameters will be restored to their initial state. If the user selects the option to clear the password, the data blocked by the baseboard management controller will be automatically unlocked, the hard drive password will be cleared, and the data on the hard drive will be restored to its state before it was locked. The BMC web management page will then display the hard drive password status as "No password set," and other parameters such as hard drive memory and data will be displayed the same as before the password was cleared. If the user selects the option to change the password, the data blocked by the baseboard management controller will be automatically unlocked, and the hard drive password will be reset after the password status is cleared. After the user sets the new password, the BMC web management page will indicate the hard drive status as "Password set" and generate a new .key certificate file.

[0072] Furthermore, after the user selects the options to perform the corresponding operations of restoring the hard drive to its initial state, clearing the hard drive password, and changing the hard drive password, the process further includes: the baseboard management controller determining whether the hard drive has been successfully restored to its initial state, whether the hard drive password has been successfully cleared, and whether the hard drive password has been successfully changed, and obtaining the determination result; if the determination result is successful, a success message is displayed on the BMC web management page, and the hard drive information is re-retrieved and collected to generate a new dynamic component detailed information status report, which is then displayed in real time on the BMC web management page; if the determination result is unsuccessful, an operation failure message is displayed on the BMC web management page. For example, after performing the operations of restoring the hard drive to its initial state, clearing the hard drive password, and changing the hard drive password, the baseboard management controller determines whether the above operations were successfully performed. If successful, relevant information about the hard drive operation is displayed on the BMC web management page, such as the hard drive successfully restored to its initial state, the hard drive password successfully cleared, and the hard drive password successfully changed; if unsuccessful, the hard drive was not successfully restored to its initial state, the hard drive password clearing failed, and the hard drive password changing failed. It should be noted that the newly modified hard drive will be retrieved again, and a new component details status report will be generated on the BMC web management page. This report will display the dynamic series information of the hard drive in the same detail as the initial component details status report.

[0073] For more detailed processing procedures of steps S23 to S26, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0074] As can be seen, this embodiment adds functions such as real-time hard drive monitoring, collection of hard drive fault serial port logs, hard drive data recovery, and online clearing, retrieval, and modification of hard drive passwords to the BMC web management page. The BMC web management page monitors and displays the current status and condition of the hard drive in real time. If a hard drive failure is detected, its error logs are collected and output on the BMC web management page, and the contents of the hard drive are backed up for later data recovery. When a hard drive has a password set, the BMC web management page integrates these operations: clearing the password, restoring the initial value, or changing the password. Testers can directly select the corresponding options through the BMC web management page to perform these operations, thereby optimizing the testing process, making it more convenient and efficient, facilitating hard drive fault analysis and troubleshooting, and better protecting hard drive data. Furthermore, this solution can also be extended to batch hard drive formatting operations. This application embodiment enables rapid hard drive location and identification by displaying detailed hard drive location and password status information on the BMC web management page. Dynamic monitoring of the hard drive facilitates fault analysis and troubleshooting. Furthermore, the ability to clear the hard drive password after forgetting it protects the hard drive data, thus overcoming the limitation that only formatting the hard drive is possible after forgetting the password. This also solves the time-consuming and laborious limitation of hard drive formatting, saves testing resources, and removes the restriction that hard drive formatting can only be performed within a specific system, thereby optimizing the testing method.

[0075] Accordingly, this application also discloses a log collection device, see [link to relevant documentation]. Figure 3 As shown, the device includes:

[0076] The retrieval and collection module 11 is used to retrieve and collect information of target components stored in the server through the BMC web management page, and generate a dynamic component detailed information status report.

[0077] Display module 12 is used to display the detailed information and status report of the component in real time on the BMC web management page;

[0078] The data transmission module 13 is used to transmit the current data in the target component to the backup data storage pool when a change in the data in the target component is detected.

[0079] The blocking module 14 is used to block the data in the backup data storage pool when a failure is detected in the target component;

[0080] The log generation and printing module 15 is used to generate and print the fault log information of the target component in the fault log option of the component detailed information status report, so that testers can download the fault log option from the BMC web management page and analyze the fault log information in the fault log option.

[0081] The specific workflow of each of the above modules can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.

[0082] As can be seen, in this embodiment, information about the target component used for data storage on the server is first retrieved and collected through the BMC web management page, generating a dynamic component details status report. This report is then displayed in real-time on the BMC web management page. When a change in data within the target component is detected, the current data is transferred to a backup data storage pool. When a fault is detected in the target component, the data in the backup data storage pool is blocked, and the fault log information of the target component is generated and printed in the fault log option of the component details status report. This allows testers to download the fault log option from the BMC web management page and analyze the fault log information. This embodiment enables real-time monitoring of components through the BMC web and backup data storage pool, and collects logs of abnormal conditions based on component status. This facilitates component fault analysis and troubleshooting, while also providing better protection for component data.

[0083] In some specific embodiments, the retrieval and acquisition module 11 may specifically include:

[0084] The information retrieval and collection unit is used to retrieve and collect information from the hard drive in the server through the BMC web management page and based on the general input / output port, and generate a dynamic component detailed information status report.

[0085] In some specific embodiments, the data transmission module 13 may specifically include:

[0086] The data transmission unit is used to transmit the current data of the target component to the backup data storage pool through the baseboard management controller and based on the characteristic information and status information of the target component.

[0087] In some specific embodiments, after the log generation and printing module 15, it may further include:

[0088] The data comparison unit is used to compare the data in the target component with the data in the backup data storage pool after the fault of the target firmware is detected to be eliminated, and to obtain the comparison result.

[0089] A data unlocking unit is used to unlock the data in the backup data storage pool if the comparison result shows that the data in the target component is consistent with the data in the backup data storage pool, so as to continue to synchronously back up the data in the target component;

[0090] The first data deletion unit is used to delete the data in the target component if the comparison result shows that the data in the target component is inconsistent with the data in the backup data storage pool;

[0091] A data replication unit is used to copy the data from the unlocked backup data storage pool to the target component.

[0092] In some specific embodiments, after the data copying unit, there may also be:

[0093] The incorrect password count monitoring unit is used to monitor the number of incorrect passwords entered by the user into the target component through the baseboard management controller;

[0094] The forget password setting unit is used to set the state of the target component to forget password if the number of incorrect password attempts is detected to exceed a preset number.

[0095] A data blocking unit is used to block the data of the target component;

[0096] The target component selection unit is used to select the blocked target component in the BMC web management page;

[0097] The certificate import unit is used to import the .key certificate generated when setting the password of the target component in the setup interface;

[0098] An identity verification unit is used to verify the user's identity using the .key certificate;

[0099] The option generation unit is used to generate three options on the BMC web management page if the verification is successful: restore initial value, clear password, and change password. This allows the user to select the option to perform the corresponding operations of restoring the target component to its initial state, clearing the password of the target component, and changing the password of the target component.

[0100] In some specific embodiments, the option generation unit may specifically include:

[0101] The second data deletion unit is used to delete the data in the target component and the backup data storage pool that are blocked by the baseboard management controller if the user selects the option to restore the initial value.

[0102] An initial state recovery unit is used to restore the target component to its initial state;

[0103] The first display unit is used to display on the BMC web management page that the password status of the target component is "no password set".

[0104] The first data unlocking and password clearing unit is used to unlock the data in the target component that is blocked by the baseboard management controller and clear the password of the target component if the user selects the option to clear the password.

[0105] The second display unit is used to display on the BMC web management page that the password status of the target component is "no password set".

[0106] The second data unlocking and password clearing unit is used to unlock the data in the target component that is blocked by the baseboard management controller and delete the password of the target component if the user selects the option to change the password.

[0107] The prompt message generation unit is used to generate a prompt message to prompt the user to reset their password;

[0108] The password status display unit is used to display the password status of the target component as "password set" on the BMC web management page after obtaining the new password set by the user.

[0109] The new certificate unit is used to generate a new .key certificate for verifying the identity of the user.

[0110] In some specific embodiments, the option generation unit may further include:

[0111] The judgment unit is used to determine, through the baseboard management controller, whether the target component has been successfully restored to its initial value, whether the password of the target component has been successfully cleared, and whether the password of the target component has been successfully changed, and to obtain the judgment result;

[0112] A success message display unit is used to display a success message on the BMC web management page if the judgment result is successful.

[0113] The retrieval and acquisition unit is used to re-retrieve and acquire information about the target component and generate a new dynamic component detailed information status report.

[0114] A status report display unit is used to display a real-time status report of detailed information about the new component on the BMC web management page.

[0115] The failure message display unit is used to display a failure message on the BMC web management page if the judgment result is failure.

[0116] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0117] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the log collection method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0118] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0119] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0120] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the log collection method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0121] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed log collection method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0122] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0123] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0124] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0125] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0126] The above provides a detailed description of a log collection method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A log collection method characterized by, The application relates to a method for generating a dynamic component detailed information state report. When the data in the target component changes, the current data in the target component is transmitted to a backup data storage pool. When the target component fails, the data in the backup data storage pool is locked, and the failure log information of the target component is generated and printed in a failure log option of the component detailed information state report, so that a tester can export the failure log option from the BMC web management page by downloading and analyze the failure log information in the failure log option. After the failure log information of the target component is generated and printed in the failure log option of the component detailed information state report, the data in the target component and the data in the backup data storage pool are compared to obtain a comparison result; if the comparison result shows that the data in the target component is consistent with the data in the backup data storage pool, the data in the backup data storage pool is unlocked to continue synchronously backing up the data in the target component; if the comparison result shows that the data in the target component is inconsistent with the data in the backup data storage pool, the data in the target component is deleted, and the unlocked data in the backup data storage pool is copied to the target component. After the data in the target component is deleted and the unlocked data in the backup data storage pool is copied to the target component, the number of incorrect passwords input by a user for the target component is monitored through a baseboard management controller; if the number of incorrect passwords exceeds a preset number, the state of the target component is set as forgotten password, and the data of the target component is locked; the locked target component is selected in the BMC web management page, and a.key certificate generated when a password of the target component is set in a setup interface is imported; the identity of the user is verified by using the.key certificate; if the verification is successful, three options of restoring initial value, clearing password and changing password are generated in the BMC web management page, so that the target component can be restored to an initial state, the password of the target component can be cleared and the password of the target component can be changed by selecting the options. The method comprises the following steps:

2. The log collection method of claim 1, wherein, The information of a hard disk in a server is searched and collected through a BMC web management page and based on a general input / output port, and a dynamic component detailed information state report is generated. ​ 3. The log collection method of claim 1, wherein, The operation of transmitting the current data in the target component to the backup data storage pool includes: The operation of transmitting the current data in the target component to the backup data storage pool by the baseboard management controller based on the feature information and the state information of the target component.

4. The log collection method of claim 3, wherein, The operation of recovering the target component to the initial state, clearing the password of the target component and changing the password of the target component by the user selecting the options includes: If the user selects the option of recovering the initial value, the data in the target component and the backup data storage pool blocked by the baseboard management controller is deleted, the target component is recovered to the initial state, and the password state of the target component is displayed as no password set on the BMC web management page; If the user selects the option of clearing the password, the data in the target component blocked by the baseboard management controller is unlocked, the password of the target component is cleared, and the password state of the target component is displayed as no password set on the BMC web management page; If the user selects the option of changing the password, the data in the target component blocked by the baseboard management controller is unlocked, the password of the target component is deleted, a prompt information prompting the user to reset the password is generated, and after obtaining the new password set by the user, the password state of the target component is displayed as the password is set on the BMC web management page and a new.key certificate for identity verification of the user is generated.

5. The log collection method of claim 4, wherein, After the operation of recovering the target component to the initial state, clearing the password of the target component and changing the password of the target component by the user selecting the options, the operation further includes: The baseboard management controller judges whether the target component is successfully recovered to the initial value, whether the password of the target component is successfully cleared and whether the password of the target component is successfully changed, and obtains a judgment result; If the judgment result is successful, prompt information of successful operation is displayed on the BMC web management page, the information of the target component is re-searched and collected, a new dynamic component detailed information state report is generated, and the dynamic component detailed information state report is displayed on the BMC web management page in real time; If the judgment result is failed, prompt information of failed operation is displayed on the BMC web management page.

6. A log collection apparatus characterized by comprising: It includes: The searching and collecting module is used for searching and collecting the information of the target component for storing data in the server through the BMC web management page, and generating a dynamic component detailed information state report; The display module is used for displaying the component detailed information state report on the BMC web management page in real time; The data transmission module is used for transmitting the current data in the target component to the backup data storage pool when it is monitored that the data in the target component changes; The blocking module is used for blocking the data in the backup data storage pool when it is detected that the target component fails. The log generation and printing module is configured to generate the failure log information of the target component and print the failure log information in a failure log option of the component detailed information status report, so that the tester can export the failure log option from the BMC web management page s by downloading and analyze the failure log information in the failure log option. The device is further configured to compare the data in the target component with the data in the backup data storage pool when it is monitored that the failure of the target component is eliminated, to obtain a comparison result; if the comparison result indicates that the data in the target component is consistent with the data in the backup data storage pool, the data in the backup data storage pool is unlocked to continue to synchronize and backup the data in the target component; if the comparison result indicates that the data in the target component is inconsistent with the data in the backup data storage pool, the data in the target component is deleted and the unlocked data in the backup data storage pool is copied to the target component; The device is further configured to monitor the number of incorrect passwords input by a user for the target component through a baseboard management controller, and if it is monitored that the number of incorrect passwords exceeds a preset number, set the state of the target component as forgotten password and lock the data of the target component; select the locked target component in the BMC web management page and import a.key certificate generated when setting the password of the target component in a setup interface; verify the identity of the user by using the.key certificate, and if the verification is successful, generate three options of restoring initial value, clearing password and changing password in the BMC web management page, so that the user can select the options to perform corresponding operations of restoring the target component to the initial state, clearing the password of the target component and changing the password of the target component.

7. An electronic device, comprising: A device includes a processor and a memory; wherein the processor implements the log collection method of any one of claims 1 to 5 when executing the computer program saved in the memory.

8. A computer-readable storage medium, characterized in that, A computer program for storing; wherein the computer program is executed by a processor to implement the log collection method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Data processing method based on integrated chip, computer equipment and storage medium

    CN110580420A

  • Server maintenance method, system and device and computer readable storage medium

    CN111143181A