Method for acquiring hard disk log, method for sending hard disk log, apparatus, device, and medium

By receiving the level signal output by the hard disk read and write status indication pin of the hard disk device and identifying the demodulated data of the target rectangular wave signal, the problem of the baseboard management controller being unable to access the hard disk device business data is solved, and out-of-band monitoring and status acquisition of the hard disk device are realized, thereby improving the reliability of hard disk storage.

WO2025200509A1PCT designated stage Publication Date: 2025-10-02INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/134109
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-03-29
Filing Date
2024-11-25
Publication Date
2025-10-02

AI Technical Summary

Technical Problem

In the prior art, the baseboard management controller cannot directly access the service data of the hard disk device, resulting in the inability to implement out-of-band monitoring and the inability to obtain the operating status of the hard disk device in a timely and accurate manner, which affects the reliability of the hard disk storage.

Method used

By receiving the level signal output by the hard disk read/write status indication pin of the hard disk device, identifying the demodulated data of the target rectangular wave signal, obtaining the hard disk log of the hard disk device, and connecting the baseboard management controller with the hard disk read/write status indication pin of the hard disk device, the hard disk log is obtained and monitored.

Benefits of technology

It realizes out-of-band monitoring of hard disk devices, can obtain the operating status of hard disk devices in a timely and accurate manner, and improves the reliability of hard disk storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024134109_02102025_PF_FP_ABST
    Figure CN2024134109_02102025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of hard disk monitoring, and discloses a method for acquiring a hard disk log, a method for sending a hard disk log, an apparatus, a device, and a medium, the method for acquiring is applicable to a baseboard management controller, and comprises: receiving a level signal outputted by a hard disk read / write state indication pin of a hard disk device, the level signal being obtained by modulating a hard disk read / write state and a hard disk log of the hard disk device; identifying pieces of demodulation data respectively corresponding to target square wave signals in the level signal; and, on the basis of the demodulation data, acquiring the hard disk log of the hard disk device. According to the present application, the hard disk read / write state indication pin of the hard disk device directly outputs the hard disk log to the baseboard management controller, so as to achieve out-of-band monitoring on the hard disk device, thus solving the problem of difficulty in achieving out-of-band hard disk monitoring caused by a lack of permissions for an out-of-band management system to access hard disk data in a traditional out-of-band hard disk monitoring solution. Hence, the range of hard disk devices on which the baseboard management controller can perform out-of-band monitoring is widened, and the difficulty in out-of-band monitoring on the hard disk device is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

A hard disk log acquisition method, sending method, device, equipment and medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to a Chinese patent application filed with the Patent Office of China on March 29, 2024, with application number 202410382055.7 and entitled “A method for obtaining, sending, device, equipment and medium for hard disk logs,” the entire contents of which are incorporated herein by reference. Technical Field

[0003] The present application relates to the field of hard disk monitoring technology, and in particular to a method for obtaining and sending hard disk logs, a device, equipment, and a medium. Background Art

[0004] The hard disk device is one of the most important storage devices in the computer. Therefore, the healthy operation of the hard disk device is one of the key factors to ensure the reliability of the device server.

[0005] In order to ensure accurate control of the operating status of the hard disk device, the device needs to monitor the hard disk device during operation to obtain the status information of the hard disk device. The main hard disk monitoring solutions are currently divided into in-band hard disk monitoring and out-of-band hard disk monitoring. In-band hard disk monitoring is to obtain the status information of the hard disk device after the monitoring software running on the central processing unit (CPU) communicates data with the hard disk device. This monitoring solution often has difficulty presenting the monitoring data to the operation and maintenance personnel. Out-of-band monitoring of hard disk devices is to monitor the status of the hard disk after obtaining the hard disk status information through the baseboard management controller (BMC). The monitoring results can be presented to the operation and maintenance personnel. It is the main monitoring method currently used. However, since the out-of-band management system does not have the authority to access the business data of the hard disk device, out-of-band monitoring of many hard disks cannot be achieved.

[0006] Therefore, how to increase the range of hard disk devices that can be monitored out-of-band by a baseboard management controller is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0007] The purpose of this application is to provide a hard disk log acquisition method, sending method, device, electronic device and computer-readable storage medium.

[0008] To solve the above technical problems, the present application provides a method for obtaining a hard disk log, which is applied to a baseboard management controller, comprising:

[0009] Receive the level signal output by the hard disk read / write status indication pin of the hard disk device; wherein the level signal is modulated by the hard disk read / write status and hard disk log of the hard disk device, and the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device;

[0010] identifying demodulated data corresponding to respective target rectangular wave signals in the level signal; wherein the width of the target rectangular wave signal is within a preset width range; and

[0011] Obtain the hard disk log of the hard disk device based on the demodulated data.

[0012] On the other hand, the target rectangular wave signal includes: a first target rectangular wave signal output when the hard disk read / write state is an idle state; and / or a second target rectangular wave signal output when the hard disk read / write state is an active state; wherein the width of the target rectangular wave signal is related to the hard disk log.

[0013] On the other hand, the target rectangular wave signal includes a first target rectangular wave signal, which is a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into a constant high-level signal, wherein the width of the preset low-level rectangular wave is a preset width that is smaller than the lower boundary of the preset width range.

[0014] On the other hand, the target rectangular wave signal also includes a second target rectangular wave signal, which includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log, wherein the widths of the first target rectangular wave signal and the second target rectangular wave signal are both within the same preset width range.

[0015] On the other hand, the target rectangular wave signal includes a first target rectangular wave signal and a second target rectangular wave signal, the preset width range includes a first width range and a second width range, and the first width range and the second width range do not intersect;

[0016] The first target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log with a width within a first width range; and

[0017] The second target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log whose width is within a second width range.

[0018] On the other hand, identifying demodulated data corresponding to each target rectangular wave signal in the level signal includes:

[0019] Identify the demodulated data and the hard disk read / write status of the hard disk device according to the level signal; and

[0020] According to the hard disk read and write status, the hard disk read and write status indicator light is controlled to turn on and off.

[0021] On the other hand, receiving the level signal output by the hard disk read / write status indication pin of the hard disk device includes:

[0022] The level signal output by the hard disk read / write status indication pin of the hard disk device is received through the general input / output port pin; wherein the general input / output port pin of the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

[0023] In another aspect, the method further comprises:

[0024] In response to determining that the current moment is in the preset negotiation time period, sending a reverse transmission request signal to the hard disk read / write status indication pin; and

[0025] In response to determining to receive the permission signal returned by the hard disk read / write status indication pin, a hard disk log command is sent to the hard disk read / write status indication pin; wherein the hard disk log command includes a data packet retransmission command and / or a log retransmission command.

[0026] On the other hand, based on the demodulated data, the hard disk log of the hard disk device is obtained, including:

[0027] Determine a valid data packet according to the demodulated data; wherein the valid data packet includes a continuous preset number of demodulated data, and the demodulated data at the first preset packet position in the valid data packet is the preset data packet identification data; and

[0028] Obtain the hard disk log of the hard disk device based on the valid data packet.

[0029] On the other hand, the demodulated data at the second preset packet position in the valid data packet is type identification data, wherein the type identification data is any preset identification, and the preset identification includes a log data identification and an index identification.

[0030] On the other hand, the preset number is n, and the valid data packet includes the first demodulated data to the nth demodulated data corresponding to the n target rectangular wave signals received continuously, wherein,

[0031] The first demodulated data is the preset data packet identification data;

[0032] The second demodulated data is type identification data;

[0033] The third demodulated data to the mth demodulated data are hard disk log data; and

[0034] The m+1th demodulated data to the nth demodulated data are data packet verification data; wherein, n is a positive integer greater than or equal to 4, m is a positive integer greater than or equal to 3, and n is greater than m.

[0035] In another aspect, determining a valid data packet based on the demodulated data includes:

[0036] Determine whether the first demodulated data among the n consecutive demodulated data most recently obtained is the preset data packet identification data;

[0037] In response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is not the preset data packet identification data, executing the step of identifying the demodulated data corresponding to each target rectangular wave signal in the level signal;

[0038] In response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is the preset data packet identification data, determining whether the second demodulated data among the n demodulated data is the preset identification;

[0039] In response to determining that the second demodulated data among the n demodulated data is not a preset identifier, determining that a data packet corresponding to the first demodulated data has a transmission error;

[0040] In response to determining that the second demodulated data among the n demodulated data is the preset identifier, performing verification using the m+1th demodulated data to the nth demodulated data among the n demodulated data; and

[0041] In response to determining that verification is successful using the m+1th to nth demodulated data among the n demodulated data, the n demodulated data are determined as valid data packets.

[0042] On the other hand, each hard disk log includes a log sequence number item and a log content item; wherein the log sequence number item includes the hard disk log data in a first number of valid data packets, and the log content item includes the hard disk log data in a second number of valid data packets.

[0043] On the other hand, the first number and the second number are both greater than or equal to 2, the hard disk log data corresponding to the log sequence number item includes a preset log sequence number index and log sequence number data, and the hard disk log data corresponding to the log content item includes a preset data item index and log content data corresponding to each log content item.

[0044] On the other hand, the first number and the second number are both 4, each hard disk log includes 1 log sequence number item and 4 log content items, and obtaining the hard disk log of the hard disk device according to the valid data packet includes:

[0045] Determine whether the hard disk log data in the first valid data packet among the 20 consecutive valid data packets obtained most recently is the preset log sequence number index;

[0046] In response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets most recently obtained before is not indexed by the preset log sequence number, executing the step of determining the valid data packet according to the demodulated data;

[0047] In response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets most recently obtained is the preset log sequence number index, determining whether the hard disk log data in the fifth valid data packet, the ninth valid data packet, the thirteenth valid data packet, and the seventeenth valid data packet among the 20 valid data packets are all the corresponding preset data item indexes;

[0048] In response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet, and the 17th valid data packet among the 20 valid data packets are not all the preset data item indexes corresponding to them, determining that the hard disk log transmission error corresponds to the first valid data packet; or

[0049] In response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet and the 17th valid data packet among the 20 valid data packets are their respective corresponding preset data item indexes, the hard disk log data in the 2nd valid data packet to the 4th valid data packet among the 20 valid data packets are used to splice together to obtain the log sequence number of the hard disk log, and the hard disk log data in the 6th valid data packet to the 8th valid data packet, the 10th valid data packet to the 12th valid data packet, the 14th valid data packet to the 16th valid data packet and the 18th valid data packet to the 20th valid data packet among the 20 valid data packets are used to splice together to obtain the log content of the hard disk log.

[0050] The present application also provides a hard disk log acquisition device, which is applied to a baseboard management controller, including:

[0051] A signal receiving module is used to receive a level signal output by a hard disk read / write status indication pin of a hard disk device; wherein the level signal is modulated by the hard disk read / write status and hard disk log of the hard disk device;

[0052] a width modulation module, configured to identify demodulated data corresponding to respective target rectangular wave signals in the level signal; wherein the width of the target rectangular wave signal is within a preset width range; and

[0053] The data parsing module is used to obtain the hard disk log of the hard disk device according to the demodulated data.

[0054] This application also provides a method for sending a hard disk log, which is applied to a hard disk device, including:

[0055] Get the hard disk log to be transferred and the hard disk read and write status;

[0056] According to the hard disk log to be transmitted, the original signal corresponding to the hard disk read and write status is modulated to obtain the corresponding level signal; and

[0057] The level signal is sent to the baseboard management controller via the hard disk read / write status indication pin; wherein the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

[0058] The present application also provides a hard disk log sending device, which is applied to a hard disk device, including:

[0059] The acquisition module is used to obtain the hard disk logs to be transmitted and the hard disk read and write status;

[0060] A signal modulation module is used to modulate the original signal corresponding to the hard disk read and write status according to the hard disk log to be transmitted to obtain a corresponding level signal; and

[0061] The log sending module is used to send a level signal to the baseboard management controller through the hard disk read and write status indication pin; wherein the baseboard management controller is connected to the hard disk read and write status indication pin of the hard disk device.

[0062] The present application also provides an electronic device, comprising:

[0063] one or more processors; and

[0064] A memory associated with one or more processors, the memory being used to store computer-readable instructions, which, when read and executed by one or more processors, implement the steps of the above-mentioned hard disk log acquisition method or the above-mentioned hard disk log sending method.

[0065] In addition, the present application also provides a non-transitory computer-readable storage medium, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, they implement the steps of the hard disk log acquisition method or the hard disk log sending method as described above.

[0066] A method for obtaining a hard disk log provided in the present application is applied to a baseboard management controller, comprising: receiving a level signal output by a hard disk read / write status indication pin of a hard disk device; wherein the level signal is modulated by the hard disk read / write status and the hard disk log of the hard disk device, and the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device; identifying demodulated data corresponding to each target rectangular wave signal in the level signal; wherein the width of the target rectangular wave signal is within a preset width range; and obtaining the hard disk log of the hard disk device based on the demodulated data. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0068] FIG1 is a schematic structural diagram of a hard disk monitoring system provided in an embodiment of the present application;

[0069] FIG2 is a schematic diagram of the structure of another hard disk monitoring system provided in an embodiment of the present application;

[0070] FIG3 is a schematic structural diagram of another hard disk monitoring system provided in an embodiment of the present application;

[0071] FIG4 is a flow chart of a method for obtaining a hard disk log according to an embodiment of the present application;

[0072] FIG5 is a schematic diagram of an out-of-band monitoring system provided in an embodiment of the present application;

[0073] FIG6 is a schematic diagram of a modulation method of a level signal provided in an embodiment of the present application;

[0074] FIG7 is a diagram showing the corresponding relationship between each preset width value and demodulated data within a preset width range provided by an embodiment of the present application;

[0075] FIG8 is a flowchart of another method for obtaining a hard disk log provided in an embodiment of the present application;

[0076] FIG9 is a schematic diagram of the format of a valid data packet provided in an embodiment of the present application;

[0077] FIG10 is a schematic diagram of a data format of a hard disk log provided in an embodiment of the present application;

[0078] FIG11 is a structural block diagram of a device for obtaining a hard disk log provided in an embodiment of the present application;

[0079] FIG12 is a flow chart of a method for sending a hard disk log according to an embodiment of the present application;

[0080] FIG13 is a structural block diagram of a hard disk log sending device provided in an embodiment of the present application;

[0081] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0082] FIG15 is a schematic structural diagram of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0083] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0084] As an important component of the server, hard disk devices are important targets for out-of-band monitoring and management. According to the type of communication interface, they are mainly divided into Serial Attached SCSI (SAS) / Serial Advanced Technology Attachment (SATA) interface hard disks and Non-Volatile Memory Host Controller Interface Specification (NVMHCIS or NVM Express, NVMe) interface hard disks. Among them, the SAS interface is compatible with the SATA interface. According to the type of storage medium, hard disk devices are mainly divided into mechanical hard disk drives (HDD) and solid-state drives (SSD). Among them, mechanical hard disks mainly have SAS or SATA interfaces. Solid-state drives include SAS, SATA, and NVMe interface hard disks.

[0085] If the baseboard management controller wants to obtain the hard disk log and realize out-of-band monitoring and management, it can access the hard disk expansion card through the integrated circuit bus (Inter-Integrated Circuit, IIC or I2C) for the hard disk device (such as SAS interface and SATA interface hard disk) connected to the hard disk expansion card. The baseboard management controller runs the monitoring software to send a transparent transmission command to the hard disk expansion card. The hard disk expansion card can forward the transparent transmission command to the hard disk device. After the hard disk device responds to the transparent transmission command, it sends the corresponding hard disk log data to the hard disk expansion card, and the hard disk expansion card forwards the hard disk log data to the baseboard management controller. In addition, the NVMe interface hard disk can be directly connected to the central processing unit through a high-speed serial computer expansion bus. The high-speed serial computer expansion bus between the hard disk device and the central processing unit can provide an integrated circuit bus to the baseboard management controller to realize the function of the hard disk expansion card to forward commands and hard disk log data to the baseboard management controller. Only then can out-of-band monitoring of the hard disk device be realized.

[0086] It can be seen that in the current server monitoring architecture, the business data of the equipment cannot be displayed to the outside world for confidentiality reasons. That is, the operation and maintenance personnel do not have the authority to access the in-band data to obtain the hard disk logs that can be read by the central processing unit. The baseboard management controller used to implement out-of-band monitoring is also unable to directly access the hard disk data, resulting in the limitation of the out-of-band monitoring function of the hard disk device. It makes it impossible for the out-of-band monitoring party to obtain the operating status of the hard disk device in a timely and accurate manner, thereby threatening the reliability of the hard disk storage.

[0087] Since there is no data path between the baseboard management controller and the hard disk device without the integrated circuit bus interface, out-of-band monitoring of the hard disk device requires the use of a hard disk expansion card that supports receiving transparent commands through the integrated circuit bus interface or a high-speed serial computer expansion bus that provides an integrated circuit bus interface. For hard disk devices that do not meet this condition, such as hard disk devices under the advanced host controller interface controller, out-of-band monitoring cannot be achieved.

[0088] Figure 1 is a schematic diagram of the structure of a hard disk monitoring system provided in an embodiment of the present application. Figure 2 is a schematic diagram of the structure of another hard disk monitoring system provided in an embodiment of the present application. Figure 3 is a schematic diagram of the structure of yet another hard disk monitoring system provided in an embodiment of the present application.

[0089] To this end, it is necessary to find an out-of-band hard disk monitoring solution that can adapt to more hard disk connection methods. As shown in Figure 1, an embodiment of the present application provides a hard disk monitoring system, which may include a baseboard management controller and a hard disk device. The pins of the baseboard management controller are connected to the hard disk read and write status indication pins of the hard disk device. The hard disk device is used to modulate the hard disk read and write status corresponding to the hard disk log and the hard disk read and write status indication pin to obtain a level signal, and output the level signal through the hard disk read and write status indication pin. The baseboard management controller is used to demodulate the first signal to obtain a hard disk log, so as to use the hard disk log to monitor the hard disk device.

[0090] It should be noted that, in the embodiment of the present application, the baseboard management controller can use its pins to directly connect to the hard disk read and write status indication pins of the hard disk device.

[0091] Hard drive pins are primarily categorized into three types: data pins, power pins, and hard drive status pins. The data pins of a hard drive connect to the in-band system, while the power pins are used to connect power and ground signals. Therefore, the baseboard management controller can only directly access the hard drive status pins.

[0092] The hard disk status pins of the hard disk device mainly include the hard disk status indication pin, the hard disk production debugging pin and the hard disk idle pin.

[0093] Among them, the hard disk status indication pin includes the hard disk in-place status indication pin, the hard disk read / write status indication pin, etc. The hard disk status indication pin is a pin used by the hard disk device to output the hard disk status indication signal. For example, the hard disk in-place status indication pin is used to output the hard disk in-place status signal, and the hard disk read / write status indication pin is used to output the hard disk read / write status signal. When the hard disk device is connected to the hard disk backplane, there are two main ways to connect the hard disk status indication pin. One is to connect to the baseboard management controller to inform the baseboard management controller of the corresponding hard disk status data, and the other is to connect to the control circuit on the hard disk backplane to control the status of the corresponding controlled component, so that the user can know the corresponding hard disk status. For example, a hard disk status indicator light is provided on the hard disk backplane to indicate the operating status of the hard disk. For example, when the hard disk is in the read / write state, the hard disk read / write state indicator pin can be controlled to output a square wave signal to the amplifying drive circuit of the hard disk read / write state indicator to control the hard disk read / write state indicator to light up. When the hard disk device is not in the read / write state (i.e., in the idle state), the hard disk read / write state indicator pin can be controlled to output a constant level signal (e.g., a constant high level signal) to turn off the hard disk read / write state indicator to indicate that it is in the idle state. The user can know whether the hard disk device is in the read / write state by observing the on and off of the hard disk read / write state indicator. The hard disk device's status display based on the hard disk in-position state indicator pin is similar.

[0094] Hard drive production debug pins are located near the SAS or SATA interface on hard drives. These pins are typically used during the production debug phase. In actual use, they can be used to output boot information during the hard drive initialization phase.

[0095] NVMe hard drives, in addition to the aforementioned drive status indicator pins, also include a hard drive idle pin. Currently, NVMe hard drives primarily use three connector types: M.2, U.2, and CEM. The M.2 NVMe interface uses different key types for connecting different devices, with Key B and Key M being used for connecting solid-state drives. When an M.2 NVMe interface is connected to a SATA solid-state drive, the definition of its P10 pin is the same as that of P11 on SAS or SATA interfaces: both are drive read / write status indicator pins. When an M.2 NVMe interface is connected to an NVMe hard drive, its P10 pin is defined as an indicator light control pin. The U.2 NVMe interface is compatible with SAS and SATA interfaces, and its P11 pin also serves as a drive read / write status indicator pin. Pin P32 on the A side of the CEM NVMe interface is a reserved pin and serves as a drive status pin in addition to the drive data pins. Multiple reserved pins exist on x8 (eight-lane) interfaces and above.

[0096] The hard disk read / write status indication pin in the above-mentioned hard disk status pin is not a pin used by the hard disk device to output data, and there is no risk of leaking user data stored in the hard disk device. Currently, after the hard disk device is inserted into the hard disk backplane, the hard disk read / write status indication pin has the authority to directly connect to the baseboard management controller.

[0097] In an embodiment of the present application, the hard disk device uses a hard disk read / write status indication pin to transmit a hard disk log. Since the hard disk read / write status indication pin is usually connected to the general-purpose input / output (GPIO) pin of the baseboard management controller in the baseboard management controller, this hardware architecture can be directly adopted without making changes to the hardware architecture of the server, which is simple and convenient to implement.

[0098] In some implementations of the embodiments of the present application, for a serially connected small computer system interface or serial advanced technology attachment interface hard disk (hard disk with SAS or SATA interface), as shown in Figure 2, the hard disk with SAS or SATA interface can be connected to a hard disk expansion card or directly connected to a hard disk backplane. In an in-band system, the central processing unit accesses the hard disk expansion card or directly accesses the data pins of the hard disk device with SAS or SATA interface through a high-speed serial computer expansion bus to achieve data interaction with the hard disk device. In an out-of-band system, in response to determining that the hard disk expansion card has an integrated circuit bus connected to a baseboard management controller, the baseboard management controller can access the hard disk expansion card through the integrated circuit bus and forward commands or hard disk log data to the hard disk through the hard disk expansion card. In addition, the baseboard management controller can also be connected to the hard disk read and write status indication pin of the hard disk device through its pins (such as GPIO pins).

[0099] In addition, the baseboard management controller can also be connected to an electrically erasable programmable read-only memory (EEPROM), sensors, and complex programmable logic devices (CPLDs) through an integrated circuit bus. The EEPROM is used to store firmware or register values ​​for server components. Sensors are located on the server backplane or server motherboard to collect physical status data such as temperature and wind speed of server components. Complex programmable logic devices are used to share the performance pressure of the baseboard management controller and provide more pins for connecting sensors or other components.

[0100] When a baseboard management controller connects multiple components via an integrated circuit bus, the baseboard management controller can access the corresponding component by its address. It can also access the same component by accessing the addresses of different registers within that component. For example, the baseboard management controller can control the firmware update of a complex programmable logic device by accessing the device's firmware update address.

[0101] In some implementations of the embodiments of the present application, for a non-volatile memory host controller interface hard disk (NVMe interface hard disk), as shown in Figure 3, the NVMe interface hard disk can also be connected to a hard disk expansion card or directly connected to a hard disk backplane. In an in-band system, the central processing unit uses a high-speed serial computer expansion bus protocol to interact with the NVMe interface hard disk to transmit data (transmit instructions, obtain hard disk data, etc.) through a switch. The central processing unit can also use the virtual pin port (Virtual Pin Port, VPP) of NVMe to connect multiple hard disk backplanes through a multi-way bidirectional conversion switch. The hard disk backplane uses a general-purpose input / output port (General-purpose input / output, GPIO) to obtain or control hard disk status information with the NVMe interface hard disk, such as controlling the hard disk locator light and the fault light. The connection method of the baseboard management controller and the NVMe interface hard disk is the same as that of the hard disk device with SAS or SATA interface. Unlike hard disk devices with SAS or SATA interfaces, the baseboard management controller can be connected to the integrated circuit bus interface of the NVMe interface hard disk through the integrated circuit bus. When one integrated circuit bus of the baseboard management controller is connected to multiple NVMe interface hard disks, a multi-way bidirectional conversion switch can be set to select the NVMe interface hard disk connected to the baseboard management controller, thereby realizing the interaction between the baseboard management controller and the NVMe interface hard disk through the integrated circuit bus.

[0102] Accordingly, the GPIO pin of the baseboard management controller can be connected to the hard disk read / write status indication pin of the hard disk device through a multi-way bidirectional conversion switch, so as to use the multi-way bidirectional conversion switch to select the hard disk device connected to the GPIO pin of the baseboard management controller.

[0103] Based on the above hard disk monitoring system embodiment, the present application embodiment provides a method for obtaining hard disk logs. Referring to FIG4 , the method is applied to a baseboard management controller and may include:

[0104] Step 101: Receive a level signal outputted by a hard disk read / write status indication pin of a hard disk device, wherein the level signal is modulated by the hard disk read / write status and hard disk log of the hard disk device, and a baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

[0105] It is understandable that, in one or more embodiments, the hard disk read and write status indication pin of the hard disk device can be a pin in the hard disk device for transmitting the hard disk read and write status, that is, the hard disk read and write status indication pin can output the current hard disk read and write status of the hard disk device, such as an active state in which data reading and writing is in progress or an idle state in which data reading and writing is not in progress. In one or more embodiments, the level signal output by the hard disk read and write status indication pin of the hard disk device can be a rectangular wave signal composed of a high level and a low level. In one or more embodiments, the level signal output by the hard disk read and write status indication pin can be modulated by the hard disk read and write status and the hard disk log of the hard disk device, so that when the hard disk device outputs the hard disk read and write status through the hard disk read and write status indication pin, it can simultaneously output the hard disk log.

[0106] In one or more embodiments, the hard disk type of the hard disk device can be set by the designer, for example, the hard disk device can be a mechanical hard disk or a solid-state hard disk. The hard disk read / write status indication pin of the hard disk device can be connected to the baseboard management controller via a signal line, so that the baseboard management controller can monitor and obtain corresponding hard disk logs based on the level signal output by the hard disk read / write status indication pin. This embodiment does not impose any restrictions on this.

[0107] Correspondingly, in one or more embodiments, the hard disk log output by the hard disk device via the hard disk read / write status indication pin may be a log of status information of the hard disk device operation, such as an error log of the hard disk operation (such as a read error log and a write error log). In one or more embodiments, the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device via a signal line, so that the baseboard management controller can directly receive the level signal output by the hard disk read / write status indication pin of the hard disk device, thereby obtaining the hard disk log transmitted by the hard disk device and realizing out-of-band monitoring of the hard disk device.

[0108] Among them, one or more embodiments do not limit the connection method between the baseboard management controller and the hard disk read and write status indication pin of the hard disk device. For example, the baseboard management controller is connected to the hard disk read and write status indication pin of the hard disk device through a GPIO (General-purpose input / output) pin, that is, the baseboard management controller can receive the level signal output by the hard disk read and write status indication pin of the hard disk device through the GPIO pin to multiplex the pulse demodulation function of the GPIO pin of the baseboard management controller, facilitate the corresponding demodulation analysis of the hard disk log, and do not require changes to the hardware architecture of the server, and can be implemented simply and conveniently. The baseboard management controller can also be connected to the hard disk read and write status indication pin of the hard disk device through other pins. The baseboard management controller can receive the level signal output by the hard disk read and write status indication pin of the hard disk device. This embodiment does not impose any restrictions on this.

[0109] Step 102: Identify demodulated data corresponding to target rectangular wave signals in the level signal, wherein the width of the target rectangular wave signal is within a preset width range.

[0110] It should be noted that in one or more embodiments, the target rectangular wave signal can be a rectangular wave signal within a preset width range output by the hard disk read / write status indicator pin, i.e., the rectangular wave signal required for transmitting the hard disk log. In other words, the hard disk device can convert the hard disk log to be transmitted into a corresponding rectangular wave signal within the preset width range (i.e., the target rectangular wave signal), and output it to the baseboard management controller via the hard disk read / write status indicator pin, thereby achieving transmission of the hard disk log.

[0111] Accordingly, in some embodiments, the target rectangular wave signal may include a first target rectangular wave signal output when the hard disk read / write state is an idle state, that is, the hard disk device can output a rectangular wave signal within a preset width range corresponding to the hard disk log through the hard disk read / write state indication pin when the hard disk device is in an idle state where no data is being read or written. In other embodiments, the target rectangular wave signal may also include a second target rectangular wave signal output when the hard disk read / write state is an active state, that is, the hard disk device can output a rectangular wave signal within a preset width range corresponding to the hard disk log through the hard disk read / write state indication pin when the hard disk device is in an active state where data is being read or written. In other embodiments, the target rectangular wave signal may also include a first target rectangular wave signal and a second target rectangular wave signal, that is, the hard disk device can output a rectangular wave signal within a preset width range corresponding to the hard disk log through the hard disk read / write state indication pin when the hard disk device is in an idle state and an active state.

[0112] Among them, the setting of the target rectangular wave signal can be set by the designer according to the practical scenario and user needs. For example, in order to reduce the modification and calculation amount on the hard disk device side, the level signal output by the hard disk read / write status indication pin can carry the level signals corresponding to the hard disk read / write status and the hard disk log in a time-sharing manner. In other words, the hard disk device can insert the level signal corresponding to the hard disk log (i.e., the rectangular wave signal) during the process of the hard disk read / write status indication pin outputting the level signal corresponding to the hard disk read / write status. For example, after the hard disk device obtains the hard disk log to be transmitted and converts the hard disk log into the corresponding rectangular wave signal, it pauses the level signal corresponding to the hard disk read / write status output through the hard disk read / write status indication pin and outputs the corresponding rectangular wave signal converted by the hard disk log. After the hard disk log is converted into the corresponding rectangular wave signal and output is completed, the output of the level signal corresponding to the hard disk read / write status is resumed. Among them, the level signal corresponding to the hard disk read / write status can be included between the respective corresponding rectangular wave signals of two adjacent hard disk log conversions to improve the timeliness of the hard disk read / write status transmission.

[0113] In other embodiments, the level signal output by the hard disk read / write status indication pin can simultaneously carry the level signals corresponding to the hard disk read / write status and the hard disk log, so as to improve the transmission efficiency of the hard disk log and the timeliness of the hard disk read / write status transmission. For example, since the conventional hard disk read / write status indication pin usually outputs a constant high level signal in the idle state, it outputs a square wave of a fixed period in the active state. Therefore, when the target rectangular wave signal can include the first target rectangular wave signal output in the idle state, in order to facilitate the modulation of the level signal, as shown in Figure 6, the modulation of the level signal corresponding to the hard disk read / write status and the hard disk log can be achieved by inserting an extremely narrow low level (i.e., a low level with an extremely short time) into the constant high level signal, that is, the first target rectangular wave signal can be a high level rectangular wave obtained by inserting a preset low level rectangular wave into the constant high level signal, and the width of the preset low level rectangular wave is a preset width less than the lower boundary of the preset width range. The preset low level rectangular wave can be a rectangular wave composed of a lower rising edge, a low level for a preset time, and a rising edge, and the high level rectangular wave can be a rectangular wave composed of a rising edge, a high level for a certain time, and a falling edge.

[0114] Correspondingly, in other embodiments, when the target rectangular wave signal includes the first target rectangular wave signal output in the idle state, the modulation of the level signal corresponding to the hard disk read and write state and the hard disk log can also be achieved by inserting a low-level rectangular wave of a preset width range corresponding to the hard disk log into the constant high-level signal, that is, the first target rectangular wave signal can be a low-level rectangular wave within a preset width range inserted into the constant high-level signal. The low-level rectangular wave can be a rectangular wave consisting of a lower rising edge, a low level lasting a certain time, and a rising edge. In order to improve the transmission efficiency of the hard disk log output in the idle state, when the target rectangular wave signal includes the first target rectangular wave signal output in the idle state, the original constant high-level signal can also be replaced with a high-level rectangular wave and a low-level rectangular wave of a preset width range corresponding to the hard disk log, that is, the first target rectangular wave signal can be a high-level rectangular wave and a low-level rectangular wave within a preset width range. This embodiment does not impose any restrictions on this.

[0115] Accordingly, when the target rectangular wave signal may include a second target rectangular wave signal output in an active state, in order to facilitate the modulation of the level signal, the original fixed-period square wave in the active state may be pulse-width modulated to achieve modulation of the level signal corresponding to the hard disk read / write state and the hard disk log, that is, the second target rectangular wave signal may include a low-level rectangular wave and / or a high-level rectangular wave with a width within a preset width range. For example, the widths of the continuous low-level rectangular wave and the high-level rectangular wave in the original fixed-period square wave may be modulated so that the second target rectangular wave signal includes a low-level rectangular wave and a high-level rectangular wave.

[0116] Furthermore, in the case where the target rectangular wave signal may include a first target rectangular wave signal output by the hard disk device in an idle state and a second target rectangular wave signal output in an active state, the voltage amplitude of the high-level rectangular wave in the first target rectangular wave signal is different from that of the high-level rectangular wave in the second target rectangular wave signal and / or the voltage amplitude of the low-level rectangular wave in the first target rectangular wave signal is different from that of the low-level rectangular wave in the second target rectangular wave signal. In other words, the hard disk device may adjust the amplitude of the high level and / or low level output by the hard disk read / write status indication pin in the idle state and / or active state, so that the baseboard management controller can identify the current hard disk read / write status of the hard disk device by detecting the amplitude of the target rectangular wave signal through the adjustment of the voltage amplitude.

[0117] It is understandable that the preset width range in one or more embodiments can be the range of the width of the level signal corresponding to the hard disk log, that is, the preset range of the width that can be converted into the corresponding demodulated data. For the number of preset width ranges in one or more embodiments, it can be set by the designer according to the practical scenario and user needs. For example, the number of preset width ranges can be 1, that is, the baseboard management controller can use a fixed preset width range to identify the demodulated data corresponding to the first target rectangular wave signal and / or the second target rectangular wave signal. For example, when the target rectangular wave signal includes a first target rectangular wave signal and a second target rectangular wave signal, the first target rectangular wave signal can be a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into a constant high-level signal, and the second target rectangular wave signal can include a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log. The baseboard management controller can use a preset width range to identify the target rectangular wave signal (i.e., the first target rectangular wave signal and the second target rectangular wave signal) in the level signal output by the hard disk read and write status indication pin, and determine the demodulated data corresponding to each target rectangular wave signal. And the recognition of the hard disk read and write status of the hard disk device during the hard disk log transmission process can be achieved by detecting the preset low-level rectangular wave.

[0118] Accordingly, in some embodiments, the number of preset width ranges can also be two, that is, the preset width ranges include a first width range and a second width range, and the first width range and the second width range do not intersect. By setting the first width range and the second width range, the hard disk device can transmit the level signal corresponding to the hard disk log (i.e., the target rectangular wave signal) through modulated continuous high-level rectangular waves and low-level rectangular waves in both the idle state and the active state, thereby improving the transmission efficiency of the hard disk log. In other words, the target rectangular wave signal includes a first target rectangular wave signal and a second target rectangular wave signal. The first target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log within the first width range. The second target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log within the second width range. The baseboard management controller can use the first width range to identify the first target rectangular wave signal in the level signal output by the hard disk read / write status indication pin and determine the demodulated data corresponding to each first target rectangular wave signal. The baseboard management controller can use the second width range to identify the second target rectangular wave signal in the level signal output by the hard disk read / write status indication pin and determine the demodulated data corresponding to each second target rectangular wave signal. In addition, the hard disk read and write status of the hard disk device during the hard disk log transmission process can be identified by detecting the width of the level signal output by the hard disk read and write status indication pin. For example, when it is detected that the widths of a continuous target number (such as 3) of rectangular waves are all within a first width range, the hard disk read and write status is determined to be an idle state; when it is detected that the widths of a continuous target number of rectangular waves are all within a second width range, the hard disk read and write status is determined to be an active state.

[0119] Wherein, for the setting of the range value of preset width range in one or more embodiments, it can be set by the designer according to practical scenario and user demand, such as when the hard disk read and write status indicator pin of the hard disk device transmits the hard disk log in hexadecimal, the preset width range can include the preset width value corresponding to the numerical value of hexadecimal (1-F). Accordingly, when transmitting the hard disk log in other systems (such as decimal or thirty binary), the preset width range can include the preset width value corresponding to the numerical value of other systems, such as the preset width range can also include the preset width value corresponding to the numerical value of thirty binary. Further, in order to facilitate the transmission identification of the data packet (i.e., valid data packet) corresponding to the hard disk log, the preset width range can also include the preset width value corresponding to the preset data packet identification data. As shown in Figure 7, the preset width range can include 17 preset width values ​​(times) of 42-58ms, i.e., 16 preset width values ​​of 42-49ms and 51-58ms corresponding to the hexadecimal numerical value (demodulated data) and 50ms corresponding to the preset data packet identification data (such as null value NULL).

[0120] It is understood that one or more embodiments illustrate the process of obtaining a hard disk log corresponding to a level signal output by a baseboard management controller from a hard disk device's hard disk read / write status indication pin as an example. Accordingly, the baseboard management controller can also identify the hard disk device's hard disk read / write status based on the level signal output by the hard disk device's hard disk read / write status indication pin. For example, in step 102, the baseboard management controller can identify, based on the level signal output by the hard disk device's hard disk read / write status indication pin, the demodulated data corresponding to each target rectangular wave signal in the level signal and the hard disk device's hard disk read / write status.

[0121] Correspondingly, the baseboard management controller can also control the lighting and extinguishing of the hard disk read and write status indicator light according to the identified hard disk read and write status, so as to utilize the baseboard management controller to identify the hard disk read and write status to realize the separate control of the hard disk read and write status indicator light, without using the level signal output by the hard disk read and write status indication pin to directly control the hard disk read and write status indicator light, and avoid the situation where the hard disk read and write status display mode (such as constant light and flashing) of the hard disk read and write status indicator light is different from the original display mode due to the modulation and addition of the hard disk log in the level signal output by the hard disk read and write status indication pin.

[0122] Step 103: Obtain the hard disk log of the hard disk device according to the demodulated data.

[0123] In one or more embodiments, the baseboard management controller can parse the demodulated data corresponding to each target rectangular wave signal in the identified level signal, obtain the hard disk log of the hard disk device, and realize the acquisition of the hard disk log output by the hard disk device through the hard disk read and write status indication pin.

[0124] Correspondingly, the method of obtaining the hard disk log of the hard disk device based on the demodulated data in this step can be set by the designer according to the practical scenario and user needs. For example, when the hard disk log is transmitted in the form of a data packet, the baseboard management controller can determine the valid data packet based on the demodulated data in this step. Obtain the hard disk log of the hard disk device based on the valid data packet. The valid data packet includes a continuous preset number of demodulated data, and the demodulated data at the first preset position in the valid data packet is the preset data packet identification data, so that the identification of the valid data packet is achieved by setting the preset data packet identification data. In other words, the baseboard management controller can determine the valid data packet corresponding to the hard disk log based on the demodulated data received and identified in sequence. The hard disk log data in the valid data packet is spliced ​​to form the hard disk log of the hard disk device.

[0125] Furthermore, in one or more embodiments, after obtaining the hard disk log of the hard disk device, the baseboard management controller may store the hard disk log in a database. The hard disk log in the database is used to update the hard disk log display image in the web interface at a preset time interval. The preset time interval is greater than or equal to a preset hard disk log transmission period. As shown in FIG5 , after receiving the level signal output by the hard disk read / write status indication pin of the hard disk device via a GPIO pin, the baseboard management controller may use a width modulation module to identify the demodulated data corresponding to each target rectangular wave signal in the level signal, and use a data parsing module to obtain the hard disk log of the hard disk device based on the demodulated data. The data storage module may then be used to store the hard disk log in the database, and the data display module may be used to display the hard disk log in the database on a web interface. The database may be constructed in the BMC's memory to store the obtained hard disk log and related information (such as a timestamp of the reception time). The database may be used to store the latest hard disk logs up to a preset capacity threshold (e.g., 2000 entries). Accordingly, a timer may be set within the data display module to enable the data display module to read the hard disk log in the database at a preset time interval and update the hard disk log display image in the web interface.

[0126] In one or more embodiments, the data display module may include a Redfish (an open industry standard specification released by the Distributed Management Task Force) interface to implement the function of reading the hard disk log in the database through the Redfish interface. That is, the baseboard management controller can read the hard disk log in the database through the Redfish interface at a preset time interval and update the hard disk log display image in the web interface.

[0127] Correspondingly, the content of the hard disk log display image displayed by the baseboard management controller in the web interface in one or more embodiments can be customized by the designer or user. For example, the baseboard management controller can display the hard disk log in the form of a curve graph in the web interface to dynamically provide feedback on the health status of the hard disk device. The hard disk logs of the same hard disk device can be displayed on the same screen of the web interface, and related hard disk logs can be plotted on the same image to facilitate user comparison and analysis.

[0128] In one or more embodiments, the present application implements out-of-band monitoring of a hard disk device by connecting a baseboard management controller to the hard disk read / write status indicator pin of the hard disk device, and directly outputting a hard disk log to the baseboard management controller via the hard disk read / write status indicator pin of the hard disk device. This solves the problem in traditional hard disk out-of-band monitoring solutions where the out-of-band management system lacks permission to access hard disk data, making out-of-band monitoring of the hard disk device difficult to implement, and increases the range of hard disk devices that can be monitored out-of-band by the baseboard management controller. Furthermore, by modulating the level signal output by the hard disk read / write status indicator pin, a hard disk log output function is added to the original hard disk read / write status output function. The baseboard management controller demodulates and processes the modulated level signal to obtain a hard disk log. This allows the hard disk device's existing hard disk read / write status indicator pin to be utilized without affecting its original function to transmit the hard disk log, thereby reducing the difficulty of out-of-band monitoring of the hard disk device.

[0129] Based on the above embodiment, please refer to Figure 8, which is a flow chart of another method for obtaining a hard disk log provided by an embodiment of the present application. This method is applied to a baseboard management controller and may include:

[0130] Step 201: Receive a level signal outputted by a hard disk read / write status indication pin of a hard disk device, wherein the level signal is modulated by the hard disk read / write status and hard disk log of the hard disk device, and a baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

[0131] In one or more embodiments, this step is similar to step 101 and will not be described again here.

[0132] Step 202: Identify the hard disk read / write state of the hard disk device and the demodulated data corresponding to the target rectangular wave signal in the level signal according to the level signal.

[0133] It can be understood that in this step, the baseboard management controller can identify the current hard disk read and write status (such as idle state or active state) of the hard disk device and the demodulated data obtained by demodulating the rectangular wave signal (i.e., the target rectangular wave signal) corresponding to the hard disk log based on the level signal output by the hard disk read and write status indication pin of the hard disk device.

[0134] Correspondingly, in one or more embodiments, the target rectangular wave signal may include a first target rectangular wave signal output when the hard disk read / write state is an idle state and a second target rectangular wave signal output when the hard disk read / write state is an active state, that is, the hard disk device can output a level signal (i.e., a target rectangular wave signal) corresponding to the hard disk log through the hard disk read / write state indication pin in both the idle state and the active state. The first target rectangular wave signal is a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into a constant high-level signal, and the width of the preset low-level rectangular wave is a preset width smaller than the lower boundary of the preset width range, that is, the hard disk device can configure the first target rectangular wave signal (i.e., a high-level rectangular wave) corresponding to the hard disk log by inserting a narrower low-level rectangular wave into the constant high-level signal in the idle state. The second target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log, that is, the hard disk device can modulate the width of the original fixed-period square wave in the active state to obtain the second target rectangular wave signal (i.e., a high-level rectangular wave and a low-level rectangular wave) corresponding to the hard disk log. The widths of the first target rectangular wave signal and the second target rectangular wave signal are both within the same preset width range. The first target rectangular wave signal and the second target rectangular wave signal can be demodulated using the correspondence between the preset width values ​​and the demodulation data within the same preset width range (the correspondence shown in Figure 7), which facilitates the modulation and demodulation of the level signal.

[0135] Accordingly, in this step, the baseboard management controller can identify the hard disk read and write state of the hard disk device by detecting the width of the received level signal. For example, when it is detected that the duration (i.e., width) of the preset low-level rectangular wave or high level is greater than the constant high-level width threshold (i.e., a constant high-level signal is detected), it is determined that the hard disk read and write state of the hard disk device is an idle state. When it is not detected that the duration of the preset low-level rectangular wave and the high level is greater than the constant high-level width threshold, it is determined that the hard disk read and write state of the hard disk device is an active state.

[0136] Step 203: According to the identified hard disk read / write status, the hard disk read / write status indicator light is controlled to turn on and off accordingly.

[0137] It should be noted that, in one or more embodiments, the baseboard management controller can control the lighting and extinguishing of the hard disk read / write status indicator light according to the current hard disk read / write status of the identified hard disk device, so as to realize the separate control of the hard disk read / write status indicator light. Among them, the hard disk read / write status indicator light can be an indicator light set on the device (such as a server) where the baseboard management controller is located to indicate the hard disk read / write status of the hard disk device. For example, when the hard disk read / write status is active, the hard disk read / write status indicator light can flash at a preset frequency. When the hard disk read / write status is idle, the hard disk read / write status indicator light can be always on.

[0138] Correspondingly, for one or more embodiments, the baseboard management controller controls the lighting and extinguishing of the hard disk read and write status indicator light according to the identified hard disk read and write status, which can be set by the designer. For example, the baseboard management controller can be directly connected to the state control circuit of the hard disk read and write status indicator light. According to the identified hard disk read and write status, the state control circuit drives the hard disk read and write status indicator light to light up and go out. The state control circuit may include an amplifying drive circuit. Due to the limited number of pins of the baseboard management controller, the baseboard management controller can control the state control circuit of the hard disk read and write status indicator light through a complex programmable logic device (CPLD) to drive the hard disk read and write status indicator light to light up and go out. That is, the baseboard management controller can be connected to the hard disk read and write status indicator light through the complex programmable logic device and the state control circuit in sequence.

[0139] Step 204: Determine a valid data packet based on the demodulated data, wherein the valid data packet includes a continuous preset number of demodulated data, and the demodulated data at the first preset packet position in the valid data packet is the preset data packet identification data.

[0140] It is understandable that, in one or more embodiments, the valid data packet may be a data packet for transmitting hard disk log data in a hard disk log. In one or more embodiments, the valid data packet may include a continuous preset number of demodulated data, that is, the demodulated data corresponding to the preset number of target rectangular wave signals sequentially output by the identified hard disk read and write status indication pins. In one or more embodiments, the preset number may be the number of demodulated data in the valid data packet. One or more embodiments do not limit the numerical value of the preset number. As shown in FIG9 , the preset number may be 9, that is, the valid data packet may be composed of demodulated data corresponding to 9 target rectangular wave signals received sequentially. The preset number may be other numerical values, such as 10 or 8.

[0141] Among them, the content setting of the valid data packet in one or more embodiments can be set by the designer according to the practical scenario and user needs. For example, the valid data packet can include not only the hard disk log data, but also the preset data packet identification data of the first preset packet position in the valid data packet. By setting the preset data packet identification data, the baseboard management controller can correctly identify the complete valid data packet. For example, the first preset packet position can be the starting position of the data packet, that is, the baseboard management controller can determine the continuous preset number of demodulated data starting with the preset data packet identification data as a valid data packet. The first preset packet position can be the starting position or other positions in the preset number of positions in the data packet, such as the end position of the data packet, that is, the baseboard management controller can determine the continuous preset number of demodulated data ending with the preset data packet identification data as a valid data packet.

[0142] Accordingly, the valid data packet may further include type identification data at a second preset intra-packet position within the valid data packet, used to identify the type of data within the data packet (i.e., hard disk log data). The type identification data is any preset identification, and the preset identification includes a log data identification and an index identification, so as to identify whether the hard disk log data within the valid data packet is the actual data of the hard disk log or an index value for splicing the hard disk log by setting the type identification data at the second preset intra-packet position within the valid data packet. Correspondingly, the valid data packet may further include data packet verification data, so as to use the data packet verification data for verification to detect whether the valid data packet is correct.

[0143] For example, when the preset number is n, the valid data packet includes the 1st to nth demodulated data corresponding to the n consecutively received target rectangular wave signals, the 1st demodulated data is the preset data packet identification data, the 2nd demodulated data is the type identification data, the 3rd to mth demodulated data are the hard disk log data, and the m+1th to nth demodulated data are the data packet verification data. Wherein, n is a positive integer greater than or equal to 4, m is a positive integer greater than or equal to 3, and n is greater than m. Accordingly, when the hard disk read and write status indication pin of the hard disk device transmits the hard disk log in hexadecimal (i.e., half a byte), as shown in FIG9 and Table 1, n can be 9 and m can be 6.

[0144] Table 1 shows a valid data packet format

[0145] That is, when the packet verification data in a valid data packet is configured using a checksum verification method, the three hexadecimal (i.e., 12-bit) packet verification data can be used to verify the four hexadecimal (i.e., 12-bit) hard disk log data to achieve verification of the valid data packet. Accordingly, the packet verification data in a valid data packet can also be configured using other verification methods, and this embodiment does not impose any limitation on this.

[0146] Accordingly, in this step, the baseboard management controller can determine whether the first demodulated data among the n consecutive demodulated data most recently acquired is the preset data packet identification data. In response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is not the preset data packet identification data, the process proceeds to step 202 to continue identifying the demodulated data corresponding to the target rectangular wave signal in the level signal. In response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is the preset data packet identification data, the process determines whether the second demodulated data among the n demodulated data is the preset identification data. In response to determining that the second demodulated data among the n demodulated data is not the preset identification data, the process determines that a data packet corresponding to the first demodulated data has been transmitted in error. In response to determining that the second demodulated data among the n demodulated data is the preset identification data, the process performs a verification using the m+1th to nth demodulated data among the n demodulated data. In response to determining that the verification is successful, the n demodulated data are determined to be valid data packets. In response to determining that the verification fails, it is determined that the data packet corresponding to the first demodulated data has a transmission error. Thus, the accuracy of the identified valid data packet can be ensured by detecting the preset identifier and verifying the data packet verification data.

[0147] Step 205: Obtain the hard disk log of the hard disk device according to the valid data packet.

[0148] It is understood that the method by which the baseboard management controller obtains the hard disk log of the hard disk device based on valid data packets in one or more embodiments can be set by the designer according to practical scenarios and user needs. For example, each hard disk log includes a log sequence number item and a log content item. The log sequence number item includes the hard disk log data in the first number of valid data packets, and the log content item includes the hard disk log data in the second number of valid data packets. For example, each hard disk log can be obtained by processing the hard disk log data in the first number + the second number of consecutive valid data packets.

[0149] For example, as shown in FIG10 , the first quantity and the second quantity can both be 4, and the data format of each hard disk log sent by the hard disk device can be composed of 1 log sequence number item (sequence number) and 4 log content items (data items 0-3), that is, composed of the hard disk log data in 20 consecutive valid data packets. The hard disk log data in the first valid data packet in the valid data packet of the log sequence number item can be a preset log sequence number index (0x8), such as a preset value or the encoding corresponding to the hard disk log data of other valid data packets (the subsequent three valid data packets) in the log sequence number item. The hard disk log data in the first valid data packet in the valid data packet of each log content item can be the corresponding preset log sequence number index (0xA, 0xB, 0xC and 0xD), pointing to the four log content items respectively. For example, if the preset log sequence number index corresponding to the four log content items is 0x7766554433221100, the data contents of items 0xA, 0xB, 0xC, and 0xD can be 0x1100, 0x3322, 0x5544, and 0x7766, respectively.

[0150] Accordingly, in this step, the baseboard management controller can determine whether the hard disk log data in the first valid data packet among the 20 consecutive valid data packets that are currently most recently obtained is indexed by the preset log sequence number. In response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets that are currently most recently obtained is not indexed by the preset log sequence number, step 203 is entered to continue obtaining new valid data packets. In response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets that are currently most recently obtained is indexed by the preset log sequence number, it is determined whether the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet, and the 17th valid data packet among the 20 valid data packets are all indexed by their respective corresponding preset data items. In response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet, and the 17th valid data packet among the 20 valid data packets are not all indexed by their respective corresponding preset data items, it is determined that a hard disk log transmission error occurs corresponding to the first valid data packet. In response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet and the 17th valid data packet among the 20 valid data packets are their respective corresponding preset data item indexes, the hard disk log data in the 2nd valid data packet to the 4th valid data packet among the 20 valid data packets are used to splice together to obtain the log sequence number of the hard disk log, and the hard disk log data in the 6th valid data packet to the 8th valid data packet, the 10th valid data packet to the 12th valid data packet, the 14th valid data packet to the 16th valid data packet and the 18th valid data packet to the 20th valid data packet among the 20 valid data packets are used to splice together to obtain the log content of the hard disk log.

[0151] Furthermore, in one or more embodiments, the baseboard management controller may also feed back information about the valid data packet or hard disk log that has been determined to have a transmission error (such as the receiving time or log sequence number) to the hard disk device, so that the hard disk device can resend the valid data packet or hard disk log that has been previously transmitted with an error through the hard disk read / write status indication pin. For example, the baseboard management controller may send a reverse transmission request signal to the hard disk read / write status indication pin when the current moment is in a preset negotiation time period, and send a hard disk log command to the hard disk read / write status indication pin when receiving a permission signal returned by the hard disk read / write status indication pin. The hard disk log command includes a data packet retransmission command and / or a log retransmission command. The preset negotiation time period may be a time period agreed upon by the baseboard management controller and the hard disk device.

[0152] For example, in response to determining that the baseboard management controller and the hard disk device have agreed not to transmit the level signal corresponding to the hard disk log in the preset negotiation time period, the baseboard management controller needs to feedback the hard disk log command, then when the current moment is in the preset negotiation time period, it can send a reverse transmission request to the hard disk read and write status indication pin, such as a 30-millisecond reverse transmission request flag. After the hard disk device recognizes the reverse transmission request and determines that it is currently in the negotiation time period, it feeds back a permission signal allowing reverse transmission to the baseboard management controller. After receiving the permission signal, the baseboard management controller reversely transmits the hard disk log command to the hard disk device through the hard disk read and write status indication pin. The hard disk executes the hard disk log command and can promptly reissue erroneous or lost hard disk logs and valid data packets.

[0153] In one or more embodiments, the embodiments of the present application can identify the hard disk read / write status of the hard disk device and the demodulated data corresponding to the target rectangular wave signal in the level signal based on the level signal, thereby identifying the hard disk read / write status of the hard disk device while identifying the demodulated data corresponding to the hard disk log, thereby ensuring timely identification of the hard disk read / write status during the hard disk log transmission process. In addition, by controlling the lighting and extinguishing of the hard disk read / write status indicator light according to the identified hard disk read / write status, the hard disk read / write status indicator light can be independently controlled, making it convenient for users to view the hard disk read / write status indicator light.

[0154] Corresponding to the above method embodiment, the embodiment of the present application further provides a hard disk log acquisition device. The hard disk log acquisition device described below and the hard disk log acquisition method described above can refer to each other.

[0155] Please refer to Figure 11, which is a structural block diagram of a hard disk log acquisition device provided in an embodiment of the present application. The device is applied to a baseboard management controller and may include: a signal receiving module 10, for receiving a level signal output by a hard disk read / write status indication pin of a hard disk device, wherein the level signal is modulated by the hard disk read / write status and the hard disk log of the hard disk device. A width modulation module 20, for identifying the demodulated data corresponding to each target rectangular wave signal in the level signal, wherein the width of the target rectangular wave signal is within a preset width range. A data parsing module 30, for acquiring the hard disk log of the hard disk device based on the demodulated data.

[0156] In some embodiments, the target rectangular wave signal includes a first target rectangular wave signal output when the hard disk read / write state is idle and / or a second target rectangular wave signal output when the hard disk read / write state is active. The width of the target rectangular wave signal is related to the hard disk log.

[0157] In some embodiments, the target rectangular wave signal includes a first target rectangular wave signal, which is a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into a constant high-level signal, and the width of the preset low-level rectangular wave is a preset width that is smaller than the lower boundary of the preset width range.

[0158] In some embodiments, the target rectangular wave signal also includes a second target rectangular wave signal, the second target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log, and the widths of the first target rectangular wave signal and the second target rectangular wave signal are both within the same preset width range.

[0159] In some embodiments, the target rectangular wave signal includes a first target rectangular wave signal and a second target rectangular wave signal, the preset width range includes a first width range and a second width range, and the first width range and the second width range do not intersect.

[0160] The first target rectangular wave signal includes a high level rectangular wave and a low level rectangular wave corresponding to a hard disk log within a first width range. The second target rectangular wave signal includes a high level rectangular wave and a low level rectangular wave corresponding to a hard disk log within a second width range.

[0161] In some embodiments, the bandwidth adjustment module 20 may include: an identification submodule for identifying the demodulated data and the hard disk read / write status of the hard disk device based on the level signal; and an indicator light control submodule for controlling the lighting and extinguishing of the hard disk read / write status indicator light according to the hard disk read / write status.

[0162] In some embodiments, the signal receiving module 10 can be used to receive the level signal output by the hard disk read / write status indication pin of the hard disk device through the general input / output port pin, wherein the general input / output port pin of the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

[0163] In some embodiments, the device may further include: a feedback control module configured to send a reverse transmission request signal to the hard disk read / write status indication pin when the current moment is within a preset negotiation time period, and to send a hard disk log command to the hard disk read / write status indication pin upon receiving a permission signal returned by the hard disk read / write status indication pin. The hard disk log command includes a data packet retransmission command and / or a log retransmission command.

[0164] In some embodiments, the data parsing module 30 may include: a data packet determination submodule for determining a valid data packet based on the demodulated data, wherein the valid data packet includes a continuous preset number of demodulated data, and the demodulated data at the first preset packet position within the valid data packet is the preset data packet identification data; and a log acquisition submodule for acquiring a hard disk log of the hard disk device based on the valid data packet.

[0165] In some embodiments, the demodulated data at the second preset packet position in the valid data packet is type identification data, and the type identification data is any preset identification, including a log data identification and an index identification.

[0166] In some embodiments, the preset number is n, and the valid data packet includes the first to nth demodulated data corresponding to the n consecutively received target rectangular wave signals, the first demodulated data being the preset data packet identification data, the second demodulated data being the type identification data, the third to mth demodulated data being the hard disk log data, and the m+1th to nth demodulated data being the data packet verification data. Where n is a positive integer greater than or equal to 4, m is a positive integer greater than or equal to 3, and n is greater than m.

[0167] In some embodiments, the data packet determination submodule may include: a first judgment unit, configured to determine whether the first demodulated data among the n consecutive demodulated data most recently acquired is preset data packet identification data. In response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is not preset data packet identification data, a start signal is sent to the width adjustment module 20. A second judgment unit, configured to determine whether the second demodulated data among the n demodulated data is the preset identifier, in response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is preset data packet identification data. A data packet error determination unit, configured to determine that a data packet corresponding to the first demodulated data has a transmission error, in response to determining that the second demodulated data among the n demodulated data is not the preset identifier. A verification unit, configured to perform verification using the m+1th to nth demodulated data among the n demodulated data, in response to determining that the second demodulated data among the n demodulated data is the preset identifier. In response to determining that the verification is successful, the n demodulated data are determined to be valid data packets.

[0168] In some embodiments, each hard disk log includes a log sequence number item and a log content item, wherein the log sequence number item includes the hard disk log data in a first number of valid data packets, and the log content item includes the hard disk log data in a second number of valid data packets.

[0169] In some embodiments, the first number and the second number are both greater than or equal to 2, the hard disk log data corresponding to the log sequence number item includes a preset log sequence number index and log sequence number data, and the hard disk log data corresponding to the log content item includes a preset data item index and log content data corresponding to each log content item.

[0170] In some embodiments, the first quantity and the second quantity are both 4, each hard disk log includes 1 log sequence number item and 4 log content items, and the log acquisition submodule may include: a third judgment unit, which is used to judge whether the hard disk log data in the first valid data packet among the 20 consecutive valid data packets that are currently most recently obtained is a preset log sequence number index. In response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets that are currently most recently obtained is not a preset log sequence number index, a start signal is sent to the data packet determination submodule. A fourth judgment unit is used to judge whether the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet and the 17th valid data packet among the 20 valid data packets are their respective corresponding preset data item indexes in response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets that are currently most recently obtained is a preset log sequence number index. A log error determination unit is used to determine that the hard disk log data corresponding to the first valid data packet is an error in the hard disk log transmission in response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet and the 17th valid data packet among the 20 valid data packets are not the respective corresponding preset data item indexes.

[0171] A log splicing unit is used to, in response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet and the 17th valid data packet among the 20 valid data packets are their respective corresponding preset data item indexes, then use the hard disk log data in the 2nd valid data packet to the 4th valid data packet among the 20 valid data packets to splice the log sequence number of the hard disk log, and use the hard disk log data in the 6th valid data packet to the 8th valid data packet, the 10th valid data packet to the 12th valid data packet, the 14th valid data packet to the 16th valid data packet and the 18th valid data packet to the 20th valid data packet among the 20 valid data packets to splice the log content of the hard disk log.

[0172] Corresponding to the above method embodiment, the embodiment of the present application also provides a method for sending a hard disk log. The hard disk log sending method described below and the hard disk log acquisition method described above can refer to each other.

[0173] Please refer to Figure 12, which is a flow chart of a method for sending a hard disk log provided by an embodiment of the present application. The method is applied to a hard disk device and may include:

[0174] Step 301: Obtain the hard disk log to be transmitted and the hard disk read and write status.

[0175] In one or more embodiments, the hard disk log to be transmitted may be a hard disk log that needs to be transmitted to the baseboard management controller.

[0176] Step 302: According to the hard disk log to be transmitted, the original signal corresponding to the hard disk read and write status is modulated to obtain a corresponding level signal.

[0177] It is understood that in one or more embodiments, the hard disk device can modulate the original signal corresponding to the hard disk read / write status (such as a constant level signal and / or a fixed-period square wave) based on the acquired hard disk log to be transmitted to obtain a corresponding level signal. In other words, the level signal output by the hard disk read / write status indication pin of the hard disk device can be modulated by the hard disk read / write status of the hard disk device and the hard disk log to be transmitted.

[0178] Accordingly, corresponding to the embodiments of the above-mentioned hard disk log acquisition method, in one or more embodiments, the hard disk device can modulate the original signal corresponding to the idle state and / or active state according to the hard disk log to be transmitted to obtain a corresponding level signal, wherein the level signal includes a target rectangular wave signal whose width is within a preset width range.

[0179] In one or more embodiments, the modulation method of the level signal corresponding to the hard disk log in one or more embodiments can be set in a manner corresponding to the demodulation process of the level signal and the hard disk log acquisition process in the embodiment of the above-mentioned hard disk log acquisition method, which will not be repeated here.

[0180] Step 303: Sending a level signal to a baseboard management controller via the hard disk read / write status indication pin, wherein the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

[0181] In one or more embodiments, out-of-band monitoring of a hard disk device is achieved by connecting a baseboard management controller to the hard disk read / write status indicator pin of the hard disk device, and directly outputting a hard disk log to the baseboard management controller via the hard disk read / write status indicator pin of the hard disk device. This solves the problem in traditional hard disk out-of-band monitoring solutions where the out-of-band management system lacks permission to access hard disk data, making out-of-band monitoring of the hard disk device difficult to achieve, and increases the range of hard disk devices that can be monitored out-of-band by the baseboard management controller. Furthermore, by modulating the level signal output by the hard disk read / write status indicator pin, a hard disk log output function is added to the baseboard management controller's existing hard disk read / write status output function, allowing the baseboard management controller to obtain a hard disk log after demodulating and processing the modulated level signal. This allows the hard disk log to be transmitted while utilizing the hard disk device's existing hard disk read / write status indicator pin without affecting its original function, thereby reducing the difficulty of out-of-band monitoring of the hard disk device.

[0182] Corresponding to the above method embodiment, the embodiment of the present application further provides a hard disk log sending device. The hard disk log sending device described below and the hard disk log sending method described above can refer to each other.

[0183] Please refer to Figure 13, which is a structural block diagram of a hard disk log sending device provided in an embodiment of the present application. The device is applied to a hard disk device and may include: an acquisition module 40 for acquiring the hard disk log to be transmitted and the hard disk read and write status. A signal modulation module 50 for modulating the original signal corresponding to the hard disk read and write status according to the hard disk log to be transmitted to obtain a corresponding level signal. A log sending module 60 for sending the level signal to the baseboard management controller through the hard disk read and write status indication pin, wherein the baseboard management controller is connected to the hard disk read and write status indication pin of the hard disk device.

[0184] Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device. The electronic device described below and the hard disk log acquisition method and hard disk log sending method described above can refer to each other.

[0185] Please refer to Figure 14, which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include: one or more processors D2; and a memory D1 associated with the one or more processors, the memory being configured to store computer-readable instructions. When the computer-readable instructions are read and executed by the one or more processors, the computer-readable instructions implement the steps of the hard disk log acquisition method or hard disk log transmission method provided in the above-mentioned method embodiment.

[0186] In one or more embodiments, please refer to Figure 15, which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (for example, one or more processors) and memory 332, one or more storage media 330 (for example, one or more mass storage devices) storing application programs 342 or data 344. Among them, the memory 332 and the storage medium 330 can be short-term storage or persistent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the device. Furthermore, the central processing unit 322 can be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the electronic device 310.

[0187] The electronic device 310 may further include one or more power supplies 326, one or more wired or wireless network interfaces 350, one or more input / output interfaces 358, and / or one or more operating systems 341, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0188] The electronic device 310 may be a baseboard management controller or a hard disk device.

[0189] The steps in the hard disk log acquisition method or hard disk log sending method described above can be implemented by the structure of an electronic device.

[0190] Corresponding to the above method embodiment, the embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium described below and the hard disk log acquisition method and hard disk log sending method described above can be referenced to each other.

[0191] A non-transitory computer-readable storage medium stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the steps of the hard disk log acquisition method or the hard disk log sending method of the above method embodiment are implemented.

[0192] The computer-readable storage medium may be any readable storage medium that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0193] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. The devices, electronic devices, and computer-readable storage media disclosed in the embodiments are described briefly because they correspond to the methods disclosed in the embodiments. For relevant details, refer to the description of the methods.

[0194] The above describes in detail the hard disk log acquisition method, sending method, device, electronic device, and computer-readable storage medium provided by this application. This article uses individual examples to illustrate the principles and implementation methods of this application. The description of the above examples is only used to help understand the method and core ideas of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to this application, and these improvements and modifications also fall within the scope of protection of this application.

Claims

1. A method for obtaining a hard disk log, characterized in that: Applied to a baseboard management controller, the method for obtaining a hard disk log includes: Receive a level signal output by a hard disk read / write status indication pin of a hard disk device; wherein the level signal is modulated by the hard disk read / write status and hard disk log of the hard disk device, and the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device; Identifying demodulated data corresponding to respective target rectangular wave signals in the level signal; wherein the width of the target rectangular wave signal is within a preset width range; and A hard disk log of the hard disk device is obtained according to the demodulated data.

2. The method for obtaining a hard disk log according to claim 1, wherein: The target rectangular wave signal includes: The first target rectangular wave signal output when the hard disk read / write state is an idle state; and / or A second target rectangular wave signal is output when the hard disk read / write state is an active state; wherein the width of the target rectangular wave signal is related to the hard disk log.

3. The method for obtaining a hard disk log according to claim 2, wherein: The target rectangular wave signal includes the first target rectangular wave signal, The first target rectangular wave signal is a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into a constant high-level signal, wherein the width of the preset low-level rectangular wave is a preset width smaller than the lower boundary of the preset width range.

4. The method for obtaining a hard disk log according to claim 3, wherein: The target rectangular wave signal also includes the second target rectangular wave signal, The second target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log, wherein the widths of the first target rectangular wave signal and the second target rectangular wave signal are both within the same preset width range.

5. The method for obtaining a hard disk log according to claim 2, wherein: The target rectangular wave signal includes the first target rectangular wave signal and the second target rectangular wave signal, the preset width range includes a first width range and a second width range, and the first width range and the second width range do not intersect; The first target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log whose width is within the first width range; and The second target rectangular wave signal includes a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log whose width is within the second width range.

6. The method for obtaining a hard disk log according to claim 1, wherein: The identifying demodulated data corresponding to each target rectangular wave signal in the level signal includes: Identifying the demodulated data and the hard disk read / write status of the hard disk device according to the level signal; and According to the hard disk read and write status, the hard disk read and write status indicator light is controlled to light up and go out accordingly.

7. The method for obtaining a hard disk log according to claim 1, wherein: The receiving the level signal output by the hard disk read / write status indication pin of the hard disk device includes: The level signal output by the hard disk read / write status indication pin of the hard disk device is received through the general input / output port pin; wherein the general input / output port pin of the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

8. The method for obtaining a hard disk log according to claim 1, wherein: Also includes: In response to determining that the current moment is in a preset negotiation time period, sending a reverse transmission request signal to the hard disk read / write status indication pin; as well as In response to determining to receive the permission signal returned by the hard disk read / write status indication pin, a hard disk log command is sent to the hard disk read / write status indication pin; wherein the hard disk log command includes a data packet retransmission command and / or a log retransmission command.

9. The method for obtaining a hard disk log according to any one of claims 1 to 8, characterized in that: The step of obtaining a hard disk log of the hard disk device according to the demodulated data includes: Determining a valid data packet according to the demodulated data; wherein the valid data packet includes a continuous preset number of the demodulated data, and the demodulated data at the first preset packet position in the valid data packet is the preset data packet identification data; and According to the valid data packet, a hard disk log of the hard disk device is obtained.

10. The method for obtaining a hard disk log according to claim 9, wherein: The demodulated data at the second preset packet position in the valid data packet is type identification data, wherein the type identification data is any preset identification, and the preset identification includes a log data identification and an index identification.

11. The method for obtaining a hard disk log according to claim 10, wherein: The preset number is n, and the valid data packet includes the first demodulated data to the nth demodulated data corresponding to the n target rectangular wave signals received continuously, wherein, The first demodulated data is the preset data packet identification data; The second demodulated data is the type identification data; The third demodulated data to the mth demodulated data are hard disk log data; and The m+1th demodulated data to the nth demodulated data are data packet verification data; wherein, n is a positive integer greater than or equal to 4, m is a positive integer greater than or equal to 3, and n is greater than m.

12. The method for obtaining a hard disk log according to claim 11, wherein: Determining a valid data packet according to the demodulated data includes: Determine whether the first demodulated data among the n consecutive demodulated data most recently obtained is the preset data packet identification data; In response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is not the preset data packet identification data, performing the step of identifying the demodulated data corresponding to each target rectangular wave signal in the level signal; In response to determining that the first demodulated data among the n consecutive demodulated data most recently acquired is the preset data packet identification data, determining whether the second demodulated data among the n demodulated data is the preset identification data; In response to determining that the second demodulated data among the n demodulated data is not the preset identifier, determining that a data packet corresponding to the first demodulated data is transmitted in error; In response to determining that the second demodulated data among the n demodulated data is the preset identifier, performing verification using the m+1th demodulated data to the nth demodulated data among the n demodulated data; and In response to determining that verification is successful using the m+1th to nth demodulated data among the n demodulated data, the n demodulated data are determined to be valid data packets.

13. The method for obtaining a hard disk log according to claim 9, wherein: Each of the hard disk logs includes a log sequence number item and a log content item; wherein the log sequence number item includes the hard disk log data in a first number of valid data packets, and the log content item includes the hard disk log data in a second number of valid data packets.

14. The method for obtaining a hard disk log according to claim 13, wherein: The first number and the second number are both greater than or equal to 2, The hard disk log data corresponding to the log sequence number item includes a preset log sequence number index and log sequence number data, and The hard disk log data corresponding to the log content items include preset data item indexes and log content data corresponding to each log content item.

15. The method for obtaining a hard disk log according to claim 14, wherein: The first number and the second number are both 4, each hard disk log includes 1 log sequence number item and 4 log content items, and obtaining the hard disk log of the hard disk device according to the valid data packet includes: Determine whether the hard disk log data in the first valid data packet among the 20 consecutive valid data packets most recently obtained is the preset log sequence number index; In response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets most recently obtained is not indexed by the preset log sequence number, executing the step of determining the valid data packet according to the demodulated data; In response to determining that the hard disk log data in the first valid data packet among the 20 consecutive valid data packets most recently obtained is the preset log sequence number index, determining whether the hard disk log data in the fifth valid data packet, the ninth valid data packet, the thirteenth valid data packet, and the seventeenth valid data packet among the 20 valid data packets are all the corresponding preset data item indexes; In response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet, and the 17th valid data packet among the 20 valid data packets are not all the corresponding preset data item indexes, determining that the hard disk log transmission error corresponds to the first valid data packet; or In response to determining that the hard disk log data in the 5th valid data packet, the 9th valid data packet, the 13th valid data packet and the 17th valid data packet among the 20 valid data packets are their respective corresponding preset data item indexes, the hard disk log data in the 2nd valid data packet to the 4th valid data packet among the 20 valid data packets are used to splice and obtain the log sequence number of the hard disk log, and the hard disk log data in the 6th valid data packet to the 8th valid data packet, the 10th valid data packet to the 12th valid data packet, the 14th valid data packet to the 16th valid data packet and the 18th valid data packet to the 20th valid data packet among the 20 valid data packets are used to splice and obtain the log content of the hard disk log.

16. A device for obtaining a hard disk log, characterized in that: Applicable to baseboard management controllers, including: A signal receiving module, configured to receive a level signal outputted by a hard disk read / write status indication pin of a hard disk device; wherein the level signal is modulated by the hard disk read / write status and hard disk log of the hard disk device; a width adjustment module, configured to identify demodulated data corresponding to respective target rectangular wave signals in the level signal; wherein the width of the target rectangular wave signal is within a preset width range; and The data parsing module is used to obtain the hard disk log of the hard disk device according to the demodulated data.

17. A method for sending a hard disk log, characterized in that: Applicable to hard disk devices, including: Get the hard disk log to be transferred and the hard disk read and write status; According to the hard disk log to be transmitted, the original signal corresponding to the hard disk read and write status is modulated to obtain a corresponding level signal; and The level signal is sent to a baseboard management controller via the hard disk read / write status indication pin; wherein the baseboard management controller is connected to the hard disk read / write status indication pin of the hard disk device.

18. A device for sending hard disk logs, characterized in that: Applicable to hard disk devices, including: The acquisition module is used to obtain the hard disk logs to be transmitted and the hard disk read and write status; A signal modulation module, configured to modulate the original signal corresponding to the hard disk read / write status according to the hard disk log to be transmitted, to obtain a corresponding level signal; and The log sending module is used to send the level signal to the baseboard management controller through the hard disk read and write status indication pin; wherein the baseboard management controller is connected to the hard disk read and write status indication pin of the hard disk device.

19. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store computer-readable instructions, which, when read and executed by the one or more processors, implement the steps of the hard disk log acquisition method according to any one of claims 1 to 15 or the hard disk log sending method according to claim 17.

20. A non-transitory computer-readable storage medium, characterized in that The non-transitory computer-readable storage medium stores computer-readable instructions, which, when executed by one or more processors, implement the steps of the hard disk log acquisition method according to any one of claims 1 to 15 or the hard disk log sending method according to claim 17.

Citation Information

Patent Citations

  • Server and hard disk health monitoring system thereof

    CN109117342A

  • System and method for capturing hard disk fault logs

    CN112732524A

  • Solid state disk and log acquisition method

    CN116578236A

  • Hard disk indicator light control method and device, electronic equipment and storage medium

    CN117076179A

  • Hard disk log obtaining method and device, hard disk log sending method and device, equipment and medium

    CN117971608A