CN117971608B - Method, device, equipment and medium for acquiring and sending hard disk logs - Google Patents

Method, device, equipment and medium for acquiring and sending hard disk logs Download PDF

Info

Publication number
CN117971608B
CN117971608B CN202410382055.7A CN202410382055A CN117971608B CN 117971608 B CN117971608 B CN 117971608B CN 202410382055 A CN202410382055 A CN 202410382055A CN 117971608 B CN117971608 B CN 117971608B
Authority
CN
China
Prior art keywords
hard disk
log
data
preset
rectangular wave
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410382055.7A
Other languages
Chinese (zh)
Other versions
CN117971608A (en
Inventor
林金芸
王云
李金锋
朱保彬
王兴隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202410382055.7A priority Critical patent/CN117971608B/en
Publication of CN117971608A publication Critical patent/CN117971608A/en
Application granted granted Critical
Publication of CN117971608B publication Critical patent/CN117971608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a device, equipment and a medium for acquiring a hard disk log, which relate to the technical field of hard disk monitoring, wherein the method for acquiring the hard disk log is applied to a substrate management controller and comprises the following steps: receiving a level signal output by a hard disk read-write state indication pin of a hard disk device; the level signal is obtained by modulating a hard disk read-write state and a hard disk log of the hard disk device; identifying demodulation data corresponding to each target rectangular wave signal in the level signals; obtaining a hard disk log of the hard disk device according to the demodulated data; the invention realizes the out-of-band monitoring of the hard disk device by directly outputting the hard disk log to the baseboard management controller through the hard disk read-write state indication pin of the hard disk device, solves the problem that the out-of-band monitoring of the hard disk is difficult to realize because the out-of-band management system has no authority to access hard disk data in the traditional out-of-band monitoring scheme of the hard disk, improves the range of the hard disk device which can be monitored out of band of the baseboard management controller, and reduces the out-of-band monitoring difficulty of the hard disk device.

Description

Method, device, equipment and medium for acquiring and sending hard disk logs
Technical Field
The present invention relates to the field of hard disk monitoring technologies, and in particular, to a method, a device, equipment, and a medium for obtaining a hard disk log.
Background
The hard disk device is one of the most dominant storage devices of a computer, and thus, healthy operation of the hard disk device is one of the key factors for guaranteeing the reliability of a device server.
In order to ensure accurate control of the operation state of the hard disk device, the device needs to monitor in the operation process of the hard disk device to acquire the state information of the hard disk device. The main hard disk monitoring schemes at present are divided into hard disk in-band monitoring and hard disk out-of-band monitoring. In-band monitoring of a hard disk, namely, after data communication is carried out between monitoring software running on a central processing unit (Central Processing Unit, CPU) and the hard disk equipment, state information of the hard disk equipment is obtained, and the monitoring scheme is often difficult to present monitoring data to operation and maintenance personnel. The out-of-band monitoring of the hard disk device is to acquire the state information of the hard disk through a baseboard management controller (Baseboard Management Controller, BMC) and then monitor the state of the hard disk, and the monitoring result can be presented to operation and maintenance personnel, so that the method is the monitoring method mainly adopted at present. But because the out-of-band management system has no authority to access the service data of the hard disk device, out-of-band monitoring of a plurality of hard disks cannot be realized.
Therefore, how to improve the range of the hard disk device capable of out-of-band monitoring of the baseboard management controller is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a method for acquiring a hard disk log, a method for sending the hard disk log, an electronic device and a computer readable storage medium, so as to improve the range of hard disk equipment which can be monitored out of band of a baseboard management controller.
In order to solve the above technical problems, the present invention provides a method for obtaining a hard disk log, which is applied to a baseboard management controller, and includes:
receiving a level signal output by a hard disk read-write state indication pin of a hard disk device; the level signal is modulated by a hard disk read-write state and a hard disk log of the hard disk device, and the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device;
Identifying demodulation data corresponding to each target rectangular wave signal in the level signals; the width of the target rectangular wave signal is within a preset width range;
and acquiring a hard disk log of the hard disk device according to the demodulated data.
In another aspect, 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; the width of the target rectangular wave signal is related to the hard disk log.
In another aspect, 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, and a width of the preset low-level rectangular wave is a preset width smaller than a lower boundary of the preset width range.
In another aspect, the target rectangular wave signal further 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, and widths of the first target rectangular wave signal and the second target rectangular wave signal are both within a same preset width range.
In another aspect, 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 comprises a high-level rectangular wave and a low-level rectangular wave which are corresponding to the hard disk log and have the width within the first width range; the second target rectangular wave signal comprises a high-level rectangular wave and a low-level rectangular wave which are corresponding to the hard disk log and have widths within the second width range.
In another aspect, the identifying the demodulation data corresponding to each of the target rectangular wave signals in the level signal includes:
identifying the demodulation data and the hard disk read-write state of the hard disk device according to the level signal;
and correspondingly controlling the on and off of the hard disk read-write state indicator lamp according to the hard disk read-write state.
In another aspect, the receiving the level signal output by the hard disk read-write state indication pin of the hard disk device includes:
receiving a level signal output by a hard disk read-write state indication pin of the hard disk device through a general input/output port pin; and the universal input/output port pin of the baseboard management controller is connected with the hard disk read-write state indication pin of the hard disk device.
In another aspect, the method further comprises:
when the current moment is in a preset negotiation time period, a reverse transmission request signal is sent to the hard disk read-write state indication pin, and when an permission signal returned by the hard disk read-write state indication pin is received, a hard disk log command is sent to the hard disk read-write state indication pin; the hard disk log command comprises a data packet retransmission command and/or a log retransmission command.
In another aspect, the obtaining the hard disk log of the hard disk device according to the demodulated data includes:
Determining a valid data packet according to the demodulation data; the effective data packet comprises a continuous preset number of demodulation data, and the demodulation data at the position in a first preset packet in the effective data packet is preset data packet identification data;
And obtaining the hard disk log of the hard disk device according to the effective data packet.
In another aspect, the demodulation data of the position in the second preset packet in the valid data packet is type identification data, the type identification data is any preset identification, and the preset identification comprises a log data identification and an index identification.
In another aspect, the preset number is n, the valid data packet includes 1 st to nth demodulation data corresponding to n target rectangular wave signals continuously received, the 1 st demodulation data is the preset data packet identification data, the 2 nd demodulation data is the type identification data, the 3 rd to mth demodulation data is hard disk log data, and the m+1st to nth demodulation data is data packet check 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.
In another aspect, the determining valid data packets from the demodulated data includes:
Judging whether the 1 st demodulation data in the n continuous demodulation data which are acquired at present is the preset data packet identification data or not;
if the data packet is not the preset data packet identification data, executing the step of identifying the demodulation data corresponding to each target rectangular wave signal in the level signal;
If the data packet is the preset data packet identification data, judging whether the 2 nd demodulation data in the n demodulation data is the preset identification;
if the data packet transmission error is not the preset identification, determining the data packet transmission error corresponding to the 1 st demodulation data;
if the preset identification is the preset identification, checking by using the (m+1) th demodulation data to the (n) th demodulation data in the n demodulation data; and if the verification is successful, determining the n demodulation data as valid data packets.
In another aspect, each of the hard disk logs includes a log sequence number item and a log content item; the log sequence number item comprises hard disk log data in a first number of valid data packets, and the log content item comprises hard disk log data in a second number of valid data packets.
In another aspect, 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.
In another aspect, the first number and the second number are both 4, each hard disk log includes 1 log serial number item and 4 log content items, and the obtaining the hard disk log of the hard disk device according to the valid data packet includes:
judging whether the hard disk log data in the 1 st effective data packet in the 20 continuous effective data packets which are acquired currently is the preset log sequence number index or not;
If the data packet is not the index of the preset log sequence number, executing the step of determining the effective data packet according to the demodulation data;
If the data is the preset data packet identification data, judging whether the hard disk log data in the 5 th effective data packet, the 9 th effective data packet, the 13 th effective data packet and the 17 th effective data packet in the 20 effective data packets are all corresponding preset data item indexes;
if the non-uniformity is the corresponding preset data item index, determining a hard disk log transmission error corresponding to the first effective data packet;
And if the indexes are the corresponding preset data item indexes, the log sequence numbers of the hard disk logs are obtained by splicing the hard disk log data in the 2 nd to 4 th effective data packets in the 20 effective data packets, and the log contents of the hard disk logs are obtained by splicing the hard disk log data in the 6 th to 8 th effective data packets, the 10 th to 12 th effective data packets, the 14 th to 16 th effective data packets and the 18 th to 20 th effective data packets in the 20 effective data packets.
The invention also provides a device for acquiring the hard disk log, which is applied to the baseboard management controller and comprises the following steps:
The signal receiving module is used for receiving a level signal output by a hard disk read-write state indication pin of the hard disk device; the level signal is obtained by modulating a hard disk read-write state and a hard disk log of the hard disk device;
The width modulation module is used for identifying demodulation data corresponding to each target rectangular wave signal in the level signals; the width of the target rectangular wave signal is within a preset width range;
and the data analysis module is used for acquiring the hard disk log of the hard disk device according to the demodulated data.
The invention also provides a method for sending the hard disk log, which is applied to the hard disk device and comprises the following steps:
Acquiring a hard disk log to be transmitted and a hard disk read-write state;
modulating an original signal corresponding to the read-write state of the hard disk according to the hard disk log to be transmitted to obtain a corresponding level signal;
Transmitting the level signal to a baseboard management controller through the hard disk read-write state indication pin; the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device.
The invention also provides a device for sending the hard disk log, which is applied to the hard disk device and comprises:
the acquisition module is used for acquiring the hard disk log to be transmitted and the hard disk read-write state;
the signal modulation module is used for modulating an original signal corresponding to the hard disk read-write state according to the hard disk log to be transmitted to obtain a corresponding level signal;
The log sending module is used for sending the level signal to the baseboard management controller through the hard disk read-write state indication pin; the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device.
The invention also provides an electronic device, comprising:
A memory for storing a computer program;
And a processor, configured to execute the computer program, where the computer program when executed by the processor implements the steps of the method for obtaining the hard disk log or the method for sending the hard disk log.
Furthermore, the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method for acquiring a hard disk log as described above or the method for transmitting a hard disk log as described above.
The invention provides a method for acquiring a hard disk log, which is applied to a baseboard management controller and comprises the following steps: receiving a level signal output by a hard disk read-write state indication pin of a hard disk device; the level signal is obtained by modulating a hard disk read-write state and a hard disk log of the hard disk device, and the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device; identifying demodulation data corresponding to each target rectangular wave signal in the level signals; the width of the target rectangular wave signal is within a preset width range; and obtaining a hard disk log of the hard disk device according to the demodulated data.
The invention realizes the out-of-band monitoring of the hard disk device by connecting the substrate management controller with the hard disk read-write state indication pin of the hard disk device and directly outputting the hard disk log to the substrate management controller by the hard disk read-write state indication pin of the hard disk device, solves the problem that the out-of-band monitoring of the hard disk device is difficult to realize due to the fact that an out-of-band management system has no permission to access hard disk data in the traditional out-of-band monitoring scheme of the hard disk, and improves the out-of-band monitoring hard disk device range of the substrate management controller; and the hard disk log output function is added on the basis of the original hard disk read-write state output function by modulating the level signal output by the hard disk read-write state indication pin, and the hard disk log can be obtained after the modulated level signal is demodulated and processed by the baseboard management controller, so that the transmission of the hard disk log can be realized by utilizing the existing hard disk read-write state indication pin of the hard disk device without affecting the original function of the hard disk device, and the out-of-band monitoring difficulty of the hard disk device is reduced. In addition, the invention also provides a device for acquiring the hard disk log, a sending method, a device, electronic equipment and a computer readable storage medium, which have the same beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a first embodiment of a hard disk monitoring system according to the present invention;
FIG. 2 is a schematic diagram of a second embodiment of a hard disk monitoring system according to the present invention;
FIG. 3 is a schematic structural diagram of a third monitoring system for a hard disk according to an embodiment of the present invention;
fig. 4 is a flowchart of a method for obtaining a hard disk log according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an out-of-band monitoring system according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a modulation method of a level signal according to an embodiment of the present invention;
Fig. 7 is a diagram showing a correspondence relationship between each preset width value and demodulation data within a preset width range according to an embodiment of the present invention;
FIG. 8 is a flowchart of another method for obtaining a hard disk log according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a valid data packet format according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a data format of a hard disk log according to an embodiment of the present invention;
fig. 11 is a block diagram of a device for obtaining a hard disk log according to an embodiment of the present invention;
Fig. 12 is a flowchart of a method for sending a hard disk log according to an embodiment of the present invention;
fig. 13 is a block diagram of a hard disk log sending device according to an embodiment of the present invention;
Fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 15 is a schematic diagram of a specific structure of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The hard disk device is an important component of the server and is an important object of out-of-band monitoring management. According to the type of communication interface, the serial connection small computer system interface (SERIAL ATTACHED SCSI, hereinafter abbreviated as SAS)/serial advanced technology attachment (SERIAL ADVANCED Technology Attachment, hereinafter abbreviated as SATA) interface hard disk and the nonvolatile memory host controller interface (Non Volatile Memory Host Controller Interface Specification, NVMHCIS or NVM Express, hereinafter abbreviated as NVMe) interface hard disk are mainly classified. Wherein the SAS interface is compatible with the SATA interface. Hard disk devices are mainly classified into mechanical hard disks (HARD DISK DRIVE, HDD) and Solid state disks (Solid STATE DISK or Solid STATE DRIVE, SSD) according to the type of storage medium. The mechanical hard disk is mainly an SAS interface or an SATA interface. The solid state disk comprises a SAS interface, a SATA interface and an NVMe interface hard disk.
If the baseboard management controller wants to obtain the hard disk log and realize out-of-band monitoring management, the hard disk expansion card can be accessed through an integrated circuit bus (Inter-INTEGRATED CIRCUIT, IIC or I2C) aiming at the hard disk device (such as an SAS interface and an SATA interface hard disk) connected to the hard disk expansion card, the baseboard management controller runs monitoring software to send a transmission command to the hard disk expansion card, the hard disk expansion card can forward the transmission command to the hard disk device, the hard disk device responds to the transmission command and then sends 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 with the central processor through the high-speed serial computer expansion bus, and one path of integrated circuit bus can be provided to the baseboard management controller through the high-speed serial computer expansion bus between the hard disk device and the central processor, so that the functions of forwarding commands and hard disk log data for the baseboard management controller, such as a hard disk expansion card, can be realized, and the out-of-band monitoring of the hard disk device can be realized.
It can be seen that in the current server monitoring architecture, service data of the device cannot be displayed to the outside due to confidentiality, that is, an operation and maintenance person does not have permission to access in-band data to obtain a hard disk log which can be read by a central processor, and a baseboard management controller for implementing out-of-band monitoring cannot directly access the hard disk data, so that the out-of-band monitoring function of the hard disk device is limited, so that the out-of-band monitoring party cannot timely and accurately obtain the operation state of the hard disk device, and further the storage reliability of the hard disk is threatened.
Since there is no data path between the baseboard management controller and the hard disk device without passing through the integrated circuit bus interface, the out-of-band monitoring of the hard disk device can only be realized by means of a hard disk expansion card supporting the receipt of a pass-through command through the integrated circuit bus interface or by means of a high-speed serial computer expansion bus providing the integrated circuit bus interface, and the out-of-band monitoring of the hard disk device without the condition, such as the hard disk device under the advanced host controller interface controller, can not be realized.
FIG. 1 is a schematic diagram of a first embodiment of a hard disk monitoring system according to the present invention; FIG. 2 is a schematic diagram of a second embodiment of a hard disk monitoring system according to the present invention; fig. 3 is a schematic structural diagram of a third hard disk monitoring system according to an embodiment of the present invention.
In this regard, it is necessary to find an out-of-band monitoring scheme for hard disks that can accommodate more hard disk connections. As shown in fig. 1, an embodiment of the present invention provides a hard disk monitoring system, which may include a baseboard management controller and a hard disk device.
The pins of the substrate management controller are connected with the hard disk read-write state indication pins of the hard disk device;
the hard disk device is used for modulating the hard disk read-write state corresponding to the hard disk log and the hard disk read-write state indication pin to obtain a level signal, and outputting the level signal through the hard disk read-write state indication pin;
The baseboard management controller is used for demodulating the first signal to obtain a hard disk log so as to monitor the hard disk device by using the hard disk log.
It should be noted that, in the embodiment of the present invention, the baseboard management controller may be directly connected to the hard disk read/write status indication pin of the hard disk device by using the pin thereof.
Pins of a hard disk device are mainly classified into three types: data pins, power pins, and hard disk status pins. The data pin of the hard disk device is connected with the in-band system, and the power pin of the hard disk device is used for connecting a power supply and a ground signal. Therefore, the baseboard management controller has direct access to only the hard disk status pins of the hard disk device.
The hard disk state pins of the hard disk device mainly comprise a hard disk state indication pin, a hard disk production debugging pin and a hard disk idle pin.
The hard disk state indication pins comprise hard disk bit state indication pins, hard disk read-write state indication pins and the like. The hard disk state indication pin is a pin of the hard disk device for outputting a hard disk state indication signal, for example, the hard disk in-place state indication pin is used for outputting a hard disk in-place state signal, and the hard disk read-write state indication pin is used for outputting a hard disk read-write state signal. When the hard disk device is connected to the hard disk back plate, the hard disk state indication pin mainly has two connection modes, one is connected to the baseboard management controller to inform the baseboard management controller of corresponding hard disk state data, and the other is connected to a control circuit on the hard disk back plate to control states of corresponding controlled elements so as to enable a user to learn corresponding hard disk states. For example, a hard disk status indicator is provided on the hard disk backboard to indicate the hard disk operation status. If the hard disk is in the read-write state, the hard disk read-write state indication pin can be controlled to output square wave signals to the amplifying driving circuit of the hard disk read-write state indication lamp so as to control the hard disk read-write state indication lamp to be on, and if the hard disk device is not in the read-write state (i.e. idle state), the hard disk read-write state indication pin is controlled to output a constant level signal (such as a constant high level signal) so as to enable the hard disk read-write state indication lamp to be off so as to indicate that the hard disk device is in the idle state, so that a user can know whether the hard disk device is in the read-write state or not by watching the on-off of the hard disk read-write state indication lamp. The hard disk device shows the same based on the state of the hard disk bit state indication pin.
The hard disk production debugging pins are mainly pins (debug pins) of the hard disk device of the SAS or SATA interface beside the SAS or SATA interface, and are usually used in a production debugging stage of the hard disk device, and in actual use of the hard disk device, the production debugging pins can be used for outputting guide information in a hard disk initialization stage.
And the NVMe interface hard disk comprises a hard disk idle pin besides the hard disk state indication pin. At present, three connectors, namely an M.2 connector, a U.2 connector and a CEM connector, are mainly adopted for the NVMe interface hard disk. The NVMe interface of the M.2 connector is used for connecting different types of devices, wherein Key B and Key M can be used for connecting a solid state disk. When the NVMe interface of M.2 specification is connected with the solid state disk of the SATA interface, the definition of the P10 pin is the same as that of the P11 pin of the SAS or SATA interface, and the P10 pin is a disk read-write state indication pin. When the NVMe interface of the m.2 specification is connected to the NVMe interface hard disk, the P10 pin is defined as an indicator light control pin. The NVMe interface of U.2 connector is completely compatible with SAS and SATA interfaces, and the P11 pin is also a hard disk read-write status indication pin. The P32 pin of the a-side of the NVMe interface of the CEM connector is an idle pin (Reserved pin), which is also a hard disk status pin other than a hard disk data pin, and there are also a plurality of idle pins at x8 (eight wire interface) and above.
The hard disk read-write state indication pin in the hard disk state pins is not used for outputting data of the hard disk device, the risk of leakage of user data stored in the hard disk device is avoided, and the hard disk read-write state indication pin has the right of being directly connected with the baseboard management controller after the hard disk device is inserted into the hard disk backboard.
In the embodiment of the invention, the hard disk device adopts the hard disk read-write state indication pin to transmit the hard disk log, and the hard disk read-write state indication pin is usually connected with a General-purpose input/output (GPIO) pin of a baseboard management controller in the baseboard management controller, so that the hardware architecture can be directly adopted without changing the hardware architecture of a server, and the realization is simple and convenient.
In some alternative implementations of the embodiments of the present invention, for serial attached small computer system interfaces or serial advanced technology attachment interface (SAS or SATA interface) hard disks, as shown in fig. 2, the SAS or SATA interface hard disk may be attached to a hard disk expansion card or may be directly attached to a hard disk backplane. In the in-band system, the central processing unit realizes the data interaction with the hard disk device by accessing the hard disk expansion card through a high-speed serial computer expansion bus or directly accessing the data pin of the hard disk device of an SAS or SATA interface. In an out-of-band system, if the hard disk expansion card has an integrated circuit bus connected to the 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 with a hard disk read-write state indication pin of the hard disk device through a pin (such as a GPIO pin) of the baseboard management controller.
The baseboard management controller may also be connected via an integrated circuit bus to an electrically erasable programmable read-only memory (ELECTRICALLY ERASABLE PROGRAMMABLE ROM, EEPROM), a sensor, and a complex programmable logic device (Complex Programmable logic device, CPLD). Wherein the eeprom is used to store firmware of the server component or register values of the server component; the sensor is arranged on the server backboard or the server main board and is used for collecting physical state data such as temperature, wind speed and the like of the server component; complex programmable logic devices are used to couple sensors or other components to more pins that share the performance pressure of the baseboard management controller.
When the baseboard management controller is connected with a plurality of components through one integrated circuit bus, the baseboard management controller can access the corresponding components through the addresses of the components, and for the same component, the access can also be realized through accessing the addresses of different registers of the component. For example, the baseboard management controller may control the complex programmable logic device to update firmware by accessing a firmware update address of the complex programmable logic device.
In some alternative implementations of the embodiments of the present invention, for a nonvolatile memory host controller interface hard disk (NVMe interface hard disk), as shown in fig. 3, the NVMe interface hard disk may also be connected to a hard disk expansion card or directly connected to a hard disk back plate. In the in-band system, the central processing unit uses a high-speed serial computer expansion bus protocol to interactively transmit data (transmit instructions, acquire hard disk data, etc.) with the NVMe interface hard disk through a switch. The central processor may also connect to a plurality of hard disk backplanes by using Virtual Pin Ports (VPP) of NVMe through a multiple bidirectional switch, where the hard disk backplanes use General-purpose input/output (GPIO) and NVMe interface hard disks to obtain or control hard disk status information, such as controlling hard disk positioning lamps and fault lamps. The connection mode of the baseboard management controller and the NVMe interface hard disk is the same as that of the hard disk device of the SAS or SATA interface. Unlike the hard disk device with SAS or SATA interfaces, the baseboard management controller may be connected to the integrated circuit bus interface of the NVMe interface hard disk through the integrated circuit bus, and when one integrated circuit bus of the baseboard management controller is connected to a plurality of NVMe interface hard disks, a plurality of bidirectional switches may be set to gate the NVMe interface hard disk that is in communication with the baseboard management controller, so as to implement interaction between the baseboard management controller and the NVMe interface hard disk through the integrated circuit bus.
Accordingly, the GPIO pin of the baseboard management controller may be connected to the hard disk read/write status indication pin of the hard disk device through a multi-way bidirectional switch, so as to gate the hard disk device communicating with the GPIO pin of the baseboard management controller by using the multi-way bidirectional switch.
Based on the embodiment of the hard disk monitoring system, the embodiment of the invention provides a method for acquiring a hard disk log. Referring to fig. 4, the method applied to the baseboard management controller may include:
step 101: receiving a level signal output by a hard disk read-write state indication pin of a hard disk device; the level signal is obtained by modulating a hard disk read-write state and a hard disk log of the hard disk device, and the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device.
It can be understood that, in this embodiment, the hard disk read-write status indication pin of the hard disk device may be a pin for transmitting a hard disk read-write status in the hard disk device, that is, the hard disk read-write status indication pin may output a current hard disk read-write status of the hard disk device, such as an active status in which data is being read and written or an idle status in which data is not being read and written. In this embodiment, the level signal output by the hard disk read-write status indication pin of the hard disk device may be a rectangular wave signal composed of a high level and a low level; in this embodiment, the level signal output by the hard disk read-write state indication pin may be modulated by the hard disk read-write state of the hard disk device and the hard disk log, so that the hard disk device may output the hard disk log at the same time when outputting the hard disk read-write state through the hard disk read-write state indication pin.
For the specific hard disk type of the hard disk device in this embodiment, the hard disk device may be set by a designer, for example, the hard disk device may be a mechanical hard disk or a solid state hard disk; as long as the hard disk read-write state indication pin of the hard disk device can be connected with the baseboard management controller through a signal line, so that the baseboard management controller can monitor and acquire the corresponding hard disk log according to the level signal output by the receiving hard disk read-write state indication pin, and the embodiment does not limit the method.
Correspondingly, the hard disk log output by the hard disk device through the hard disk read-write status indication pin in the embodiment may be a log of status information of operation of the hard disk device, for example, an error log of operation of the hard disk (such as a read error log and a write error log). In this embodiment, the baseboard management controller is connected to the hard disk read-write status indication pin of the hard disk device through 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.
The specific connection mode of the baseboard management controller and the hard disk read-write status indication pin of the hard disk device is not limited in this embodiment, for example, the baseboard management controller is connected with the hard disk read-write status indication pin of the hard disk device through a General-purpose input/output (GPIO) pin, that is, the baseboard management controller may receive a level signal output by the hard disk read-write status indication pin of the hard disk device through the GPIO pin, so as to multiplex a pulse demodulation function of the GPIO pin of the baseboard management controller, facilitate a corresponding demodulation analysis of a hard disk log, and do not need to make a change to a hardware architecture of a server, which can be simply and conveniently implemented. The baseboard management controller may also be connected to the hard disk read/write status indication pin of the hard disk device through other pins, so long as the baseboard management controller can receive the level signal output by the hard disk read/write status indication pin of the hard disk device, which is not limited in this embodiment.
Step 102: identifying demodulation data corresponding to each target rectangular wave signal in the level signals; the width of the target rectangular wave signal is within a preset width range.
It should be noted that, the target rectangular wave signal in this embodiment may be a rectangular wave signal within a preset width range output by the hard disk read-write status indication pin, that is, a rectangular wave signal required to be used when transmitting the hard disk log. That is, the hard disk device may convert the hard disk log to be transmitted into a corresponding rectangular wave signal (i.e. a target rectangular wave signal) within a preset width range, and output the rectangular wave signal to the baseboard management controller through the hard disk read-write status indication pin, so as to realize the transmission of the hard disk log.
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, when the hard disk device may not perform data read-write in the idle state, the rectangular wave signal in a preset width range corresponding to the hard disk log is output through the hard disk read-write state indication pin. 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 may output, through the hard disk read-write state indication pin, a rectangular wave signal within a preset width range corresponding to the hard disk log when the hard disk device is in the active state for data read-write. In other embodiments, the target rectangular wave signal may further include a first target rectangular wave signal and a second target rectangular wave signal, that is, when the hard disk device is in an idle state and an active state, rectangular wave signals in a preset width range corresponding to the hard disk log may be output through the hard disk read-write state indication pin.
For the specific setting of the target rectangular wave signal, the target rectangular wave signal can be set by a designer according to a practical scene and user requirements, for example, in order to reduce the change and the operand of a hard disk device end, the level signal output by the hard disk read-write state indication pin can carry the level signal corresponding to the hard disk read-write state and the hard disk log respectively in a time-sharing manner; that is, the hard disk device may insert a level signal (i.e., a rectangular wave signal) corresponding to the hard disk log in a process that the hard disk read-write status indication pin outputs 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 a corresponding rectangular wave signal, suspending the level signal corresponding to the hard disk read-write state output through the hard disk read-write state indication pin, and outputting the rectangular wave signal converted from the hard disk log; after the hard disk log is converted into the corresponding rectangular wave signal to be output, recovering the output of the level signal corresponding to the read-write state of the hard disk; the level signals corresponding to the read-write states of the hard disks can be included between the rectangular wave signals corresponding to the two adjacent hard disk log conversion, so that timeliness of the hard disk read-write state transmission is improved.
In other embodiments, the level signal output by the hard disk read-write state indication pin may simultaneously carry the level signals corresponding to the hard disk read-write state and the hard disk log, so as to improve the transmission efficiency of the hard disk log and timeliness of the hard disk read-write state transmission. For example, since the conventional hard disk read-write status indication pin normally outputs a constant high level signal in an idle state, a square wave with a fixed period is output in an active state; therefore, in the case where the target rectangular wave signal may include the first target rectangular wave signal output in the idle state, in order to facilitate modulation of the level signal, as shown in fig. 6, modulation of the level signal corresponding to the hard disk read-write state and the hard disk log may be implemented by inserting an extremely narrow low level (i.e., an extremely short low level) into the constant high level signal, that is, the first target rectangular wave signal may be a high level rectangular wave obtained by inserting a preset low level rectangular wave into the constant high level signal, where the width of the preset low level rectangular wave is a preset width smaller than the lower boundary of the preset width range; the preset low-level rectangular wave may be a rectangular wave composed of a rising edge, a low level lasting for a preset time, and a rising edge, and the high-level rectangular wave may be a rectangular wave composed of a rising edge, a high level lasting for a certain time, and a falling edge.
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-write state and the hard disk log may be implemented by inserting the low level rectangular wave of the preset width range corresponding to the hard disk log into the constant high level signal, that is, the first target rectangular wave signal may be the low level rectangular wave of the preset width range inserted into the constant high level signal; the low level rectangular wave may be a rectangular wave consisting of a rising edge, a low level for 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 may be replaced by a high-level rectangular wave and a low-level rectangular wave with preset width ranges corresponding to the hard disk log, that is, the first target rectangular wave signal may be a high-level rectangular wave and a low-level rectangular wave with preset width ranges. The present embodiment does not impose any limitation on this.
Correspondingly, in the case that the target rectangular wave signal can include the second target rectangular wave signal output in the active state, in order to facilitate the modulation of the level signal, the original square wave with a fixed period in the active state can be subjected to pulse width modulation, so that the modulation of the level signal corresponding to the hard disk read-write state and the hard disk log is realized, namely, the second target rectangular wave signal can include low-level rectangular waves and/or high-level rectangular waves with the width within the preset width range; for example, the widths of the continuous low-level rectangular wave and the continuous high-level rectangular wave in the original square wave with the fixed period can be modulated, so that the second target rectangular wave signal comprises the low-level rectangular wave and the high-level rectangular wave.
Further, 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 by the hard disk device in an active state, wherein a high-level rectangular wave in the first target rectangular wave signal is different from a high-level rectangular wave in the second target rectangular wave signal in voltage amplitude and/or a low-level rectangular wave in the first target rectangular wave signal is different from a low-level rectangular wave in the second target rectangular wave signal in voltage amplitude; that is, the hard disk device may adjust the amplitude of the high level and/or the low level output by the hard disk read/write status indication pin in the idle status and/or the active status, so that the baseboard management controller may 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.
It can be understood that the preset width range in this embodiment may be a range where the width of the level signal corresponding to the hard disk log is located, that is, a preset range where the width of the level signal can be converted into corresponding demodulation data. For the specific number of preset width ranges in this embodiment, the designer may set the specific number according to the practical scenario and the user requirement, for example, the number of preset width ranges may be 1, that is, the baseboard management controller may identify the demodulation data corresponding to each of the first target rectangular wave signal and/or the second target rectangular wave signal by using a fixed preset width range. For example, in the case where 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 may be a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into a constant high-level signal, the second target rectangular wave signal may include a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log, and the baseboard management controller may identify the target rectangular wave signal (i.e., the first target rectangular wave signal and the second target rectangular wave signal) in the level signals output by the hard disk read-write status indication pin by using a preset width range, and determine demodulation data corresponding to each target rectangular wave signal; and the identification of the hard disk read-write state of the hard disk equipment in the hard disk log transmission process can be realized through the detection of the preset low-level rectangular wave.
Accordingly, in some embodiments, the number of the preset width ranges may be 2, that is, the preset width ranges include a first width range and a second width range, where the first width range and the second width range are not intersected, so that, by setting the first width range and the second width range, the hard disk device can transmit, through modulated continuous high-level rectangular waves and low-level rectangular waves, level signals (i.e., target rectangular wave signals) corresponding to the hard disk log in an idle state and an active state, and improve the transmission efficiency of the hard disk log. That is, the target rectangular wave signal includes a first target rectangular wave signal including a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log having a width within a first width range, and a second target rectangular wave signal; the second target rectangular wave signal comprises a high-level rectangular wave and a low-level rectangular wave which correspond to the hard disk logs with the width in a second width range; the baseboard management controller can identify first target rectangular wave signals in the level signals output by the hard disk read-write state indication pins by utilizing the first width range, and determine demodulation data corresponding to each first target rectangular wave signal; identifying second target rectangular wave signals in the level signals output by the hard disk read-write state indication pins by utilizing a second width range, and determining demodulation data corresponding to each second target rectangular wave signal; and the identification of the hard disk read-write state of the hard disk device in the hard disk log transmission process can be realized through the width detection of the level signal output by the hard disk read-write state indication pin, for example, the hard disk read-write state is determined to be in an idle state when the widths of the continuous target number (such as 3) of rectangular waves are detected to be in a first width range, and the hard disk read-write state is determined to be in an active state when the widths of the continuous target number of rectangular waves are detected to be in a second width range.
For the setting of the specific range value of the preset width range in this embodiment, the setting may be set by a designer according to a practical scenario and a user requirement, for example, when the hard disk read-write status indication pin of the hard disk device transmits the hard disk log in hexadecimal, the preset width range may include preset width values corresponding to the hexadecimal values (1-F) respectively; accordingly, when transmitting the hard disk log in other system (such as decimal system or thirty-binary system), the preset width range may include preset width values corresponding to the values of the other system, for example, preset width ranges may also include preset width values corresponding to the values of the thirty-binary system. Furthermore, in order to facilitate the transmission identification of the data packet (i.e., the valid data packet) corresponding to the hard disk log, the preset width range may further include a preset width value corresponding to the preset data packet identification data; as shown in fig. 7, the preset width range may include 17 preset width values (time) of 42-58ms, that is, 16 preset width values of 42-49ms and 51-58ms corresponding to hexadecimal values (demodulation data) and 50ms corresponding to preset packet identification data (e.g., NULL value NULL), respectively.
It can be understood that, in this embodiment, the process of obtaining the hard disk log corresponding to the level signal output by the hard disk read-write state indication pin of the hard disk device by the baseboard management controller is taken as an example for carrying out the display, and correspondingly, the baseboard management controller can identify the hard disk read-write state of the hard disk device according to the level signal output by the hard disk read-write state indication pin of the hard disk device. For example, in step 102, the baseboard management controller may identify the demodulated data corresponding to each target rectangular wave signal in the level signal and the hard disk read/write state of the hard disk device according to the level signal output by the hard disk read/write state indication pin.
Correspondingly, the baseboard management controller can correspondingly control the on-off state of the hard disk read-write state indicator lamp according to the identified hard disk read-write state, so that the independent control of the hard disk read-write state indicator lamp is realized by utilizing the identification of the baseboard management controller to the hard disk read-write state, the hard disk read-write state indicator lamp is directly controlled without utilizing the level signal output by the hard disk read-write state indicator pin, and the situation that the hard disk read-write state display mode (such as normal on and flash) of the hard disk read-write state indicator lamp is different from the original display mode due to the fact that the hard disk log is added in the level signal output by the hard disk read-write state indicator pin in a modulating manner is avoided.
Step 103: and obtaining a hard disk log of the hard disk device according to the demodulated data.
The baseboard management controller in this embodiment may analyze the demodulated data corresponding to each target rectangular wave signal in the identified level signal, and obtain the hard disk log of the hard disk device, so as to obtain the hard disk log output by the hard disk device through the hard disk read-write status indication pin.
Correspondingly, for the specific mode of acquiring the hard disk log of the hard disk device according to the demodulation data in the step, the specific mode can be set by a designer according to the practical scene and the user requirement, for example, when the hard disk log is transmitted in the form of a data packet, the baseboard management controller in the step can determine the effective data packet according to the demodulation data; obtaining a hard disk log of the hard disk device according to the effective data packet; the effective data packet comprises continuous preset number of demodulation data, the demodulation data of the position in the first preset packet in the effective data packet is preset data packet identification data, and identification of the effective data packet is achieved through setting of the preset data packet identification data. That is, the baseboard management controller may determine the valid data packet corresponding to the hard disk log according to the sequentially received identified demodulation data; and splicing hard disk logs of the hard disk equipment by using the hard disk log data in the effective data packet.
Further, in this embodiment, after obtaining the hard disk log of the hard disk device, the baseboard management controller may store the hard disk log in the database; updating a hard disk log display image in a webpage interface by utilizing the hard disk log in the database according to a preset time interval; the preset time interval is larger than or equal to a preset hard disk log transmission period. As shown in fig. 5, after receiving the level signal output by the hard disk read-write state indication pin of the hard disk device through the GPIO pin, the baseboard management controller may identify the demodulation data corresponding to each target rectangular wave signal in the level signal by using the width adjustment module, and obtain the hard disk log of the hard disk device according to the demodulation data by using the data analysis module; then, the hard disk logs are stored into a database by utilizing a data storage module, and the hard disk logs in the database are displayed on a Web interface by utilizing a data display module; the database may be built in a memory of the BMC, and is configured to store the obtained hard disk log and related information (such as a timestamp of the receiving time); the database may be used to store a hard disk log of the latest preset capacity threshold (e.g., 2000). Correspondingly, a timer can be arranged in the data display module, so that the data display module can read the hard disk logs in the database according to a preset time interval and update the hard disk log display images in the webpage interface.
Specifically, the data display module may include redfish (an open industry standard specification issued by a distributed management task group) interfaces, so as to implement a function of reading a hard disk log in the database through redfish interfaces; the baseboard management controller can read the hard disk logs in the database through the redfish interface according to the preset time interval, and update the hard disk log display images in the webpage interface.
Correspondingly, for the specific content of the hard disk log display image displayed in the web interface by the baseboard management controller in the embodiment, the specific content can be set by a designer or a user, for example, the baseboard management controller can display the hard disk log in the web interface in a graph form so as to dynamically feed back the health state of the hard disk device; the hard disk logs of the same hard disk device can be displayed on the same interface of the webpage interface, and the hard disk logs with correlation can be drawn on the same image, so that the comparison and analysis of users are facilitated.
In the embodiment of the invention, the out-of-band monitoring of the hard disk device is realized by connecting the substrate management controller with the hard disk read-write state indication pin of the hard disk device and directly outputting the hard disk log to the substrate management controller by the hard disk read-write state indication pin of the hard disk device, so that the problem that the out-of-band monitoring of the hard disk device is difficult to realize due to the fact that an out-of-band management system does not have permission to access hard disk data in the traditional out-of-band monitoring scheme of the hard disk is solved, and the out-of-band monitoring hard disk device range of the substrate management controller is improved; and the hard disk log output function is added on the basis of the original hard disk read-write state output function by modulating the level signal output by the hard disk read-write state indication pin, and the hard disk log can be obtained after the modulated level signal is demodulated and processed by the baseboard management controller, so that the transmission of the hard disk log can be realized by utilizing the existing hard disk read-write state indication pin of the hard disk device without affecting the original function of the hard disk device, and the out-of-band monitoring difficulty of the hard disk device is reduced.
Based on the above embodiments, please refer to fig. 8, fig. 8 is a flowchart of another method for obtaining a hard disk log according to an embodiment of the present invention. The method is applied to a baseboard management controller and can comprise the following steps:
Step 201: receiving a level signal output by a hard disk read-write state indication pin of a hard disk device; the level signal is obtained by modulating a hard disk read-write state and a hard disk log of the hard disk device, and the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device.
Specifically, this step is similar to step 101, and will not be described here again.
Step 202: and identifying the read-write state of the hard disk device and the demodulation data corresponding to the target rectangular wave signals in the level signals according to the level signals.
It can be understood that, in this step, the baseboard management controller can identify the current hard disk read-write state (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 according to the level signal output by the hard disk read-write state indication pin of the hard disk device.
Correspondingly, the target rectangular wave signal in the embodiment may include a first target rectangular wave signal output when the hard disk read-write state is in an idle state and a second target rectangular wave signal output when the hard disk read-write state is in an active state, that is, the hard disk device may 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, the width of the preset low-level rectangular wave is smaller than the preset width of the lower boundary of the preset width range, namely, the hard disk device can configure the first target rectangular wave signal (namely, the high-level rectangular wave) corresponding to the hard disk log in an idle state in a mode of inserting a narrower low-level rectangular wave into the constant high-level signal; the second target rectangular wave signal comprises a high-level rectangular wave and a low-level rectangular wave corresponding to the hard disk log, namely the hard disk device can modulate the width of the square wave with the original fixed period in an active state to obtain a second target rectangular wave signal (namely the high-level rectangular wave and the 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 in the same preset width range, and the first target rectangular wave signal and the second target rectangular wave signal can be demodulated by utilizing the corresponding relation (the corresponding relation shown in fig. 7) between the preset width value and the demodulation data in the same preset width range, so that the level signal can be conveniently modulated and demodulated.
Correspondingly, the baseboard management controller in the step can identify the hard disk read-write state of the hard disk device through detecting the width of the received level signal; if the duration (i.e. the width) of the preset low-level rectangular wave or the high level is detected to be larger than the constant high-level width threshold value (i.e. the constant high-level signal is detected), determining that the hard disk read-write state of the hard disk device is an idle state; and when the duration of the preset low-level rectangular wave and the high level is not detected to be larger than the constant high-level width threshold value, determining that the hard disk read-write state of the hard disk device is an active state.
Step 203: and correspondingly controlling the on and off of the hard disk read-write state indicator lamp according to the identified hard disk read-write state.
It should be noted that, in this embodiment, the baseboard management controller may correspondingly control on and off of the hard disk read-write status indicator lamp according to the identified current hard disk read-write status of the hard disk device, so as to realize separate control of the hard disk read-write status indicator lamp. The hard disk read-write state indicator lamp can be an indicator lamp which is arranged on equipment (such as a server) where the substrate management controller is located and used for indicating the hard disk read-write state of the hard disk equipment, and if the hard disk read-write state is an active state, the hard disk read-write state indicator lamp can flash according to preset frequency; when the hard disk read-write state is an idle state, the hard disk read-write state indicator lamp can be always on.
Correspondingly, for the specific mode of the baseboard management controller in the embodiment for correspondingly controlling the on and off of the hard disk read-write status indicator lamp according to the identified hard disk read-write status, the specific mode can be set by a designer, for example, the baseboard management controller can be directly connected with the status control circuit of the hard disk read-write status indicator lamp; driving a hard disk read-write state indicator lamp to turn on and off by a corresponding control state control circuit according to the identified hard disk read-write state; the state control circuit may include an amplification drive circuit. Because the quantity of pins of the baseboard management controller is limited, the baseboard management controller can control a state control circuit of the hard disk read-write state indicator lamp through a complex programmable logic device (Complex Programmable logic device, CPLD) so as to drive the hard disk read-write state indicator lamp to turn on and off; that is, the baseboard management controller can be connected to the hard disk read-write status indicator lamp through the complex programmable logic device and the status control circuit in sequence.
Step 204: determining a valid data packet according to the demodulated data; the effective data packet comprises continuous preset number of demodulation data, and the demodulation data at the position in the first preset packet in the effective data packet is preset data packet identification data.
It is understood that the valid data packet in this embodiment may be a data packet for transmitting hard disk log data in the hard disk log. The valid data packet in this embodiment may include a continuous preset number of demodulation data, that is, demodulation data corresponding to a preset number of target rectangular wave signals sequentially output by the identified hard disk read-write status indication pins. The preset number in this embodiment may be the number of demodulated data in the valid data packet; the embodiment is not limited to specific values of the preset number, as shown in fig. 9, 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 in sequence; the preset number may be other values, such as 10 or 8.
The specific content setting of the valid data packet in this embodiment may be set by a designer according to a practical scenario and a user requirement, and the valid data packet may include not only hard disk log data, but also preset data packet identification data of a position in a first preset packet in the valid data packet, so that the baseboard management controller can correctly identify the complete valid data packet through the setting of the preset data packet identification data; for example, the first preset intra-packet position may be a start position of the data packet, that is, the baseboard management controller may determine a continuous preset number of demodulation data starting with preset data packet identification data as one valid data packet; the first preset intra-packet position may be the beginning position or may be another position among the preset number of positions in the data packet, such as the end position of the data packet, that is, the baseboard management controller may determine the continuous preset number of demodulation data with the preset data packet identification data as the end position as one valid data packet.
Correspondingly, the valid data packet may further include type identification data at a position in a second preset packet in the valid data packet, so as to identify a type of data (i.e., hard disk log data) in the data packet; the type identification data is any preset identification, and the preset identification comprises a log data identification and an index identification, so that whether the hard disk log data in the effective data packet is actual data of the hard disk log or an index value for splicing the hard disk log is identified through setting of the type identification data of the position in a second preset packet in the effective data packet. Correspondingly, the valid data packet may further include data packet verification data to be verified by the data packet verification data to detect whether the valid data packet is correct.
For example, in the case that the preset number is n, the valid data packet includes 1 st to n-th demodulation data corresponding to n target rectangular wave signals continuously received, the 1 st demodulation data is preset data packet identification data, the 2 nd demodulation data is type identification data, the 3 rd to m-th demodulation data is hard disk log data, and the m+1st to n-th demodulation data is data packet check 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/write status indication pin of the hard disk device transmits the hard disk log in hexadecimal (i.e., nibble), n may be 9,m or may be 6 as shown in fig. 9 and table 1.
Table 1a presentation table of valid data packet formats
That is, when the data packet check data in the valid data packet is check data configured in a checksum check mode, 3 hexadecimal (i.e. 12 bits) data packet check data can be utilized to check 4 hexadecimal (i.e. 12 bits) hard disk log data, so as to realize the check of the valid data packet. Accordingly, the data packet verification data in the valid data packet may also be configured in other verification manners, which is not limited in this embodiment.
Correspondingly, the baseboard management controller in the step can judge whether the 1 st demodulation data in the n continuous demodulation data which are acquired at present is preset data packet identification data or not; if the data is not the preset data packet identification data, the step 202 is entered, and the demodulation data corresponding to the target rectangular wave signal in the level signal is continuously identified; if the data packet is the preset data packet identification data, judging whether the 2 nd demodulation data in the n demodulation data is the preset identification; if the data packet is not the preset identification, determining the transmission error of the data packet corresponding to the 1 st demodulation data; if the identification is the preset identification, checking by using the (m+1) th demodulation data to the (n) th demodulation data in the n demodulation data; if the verification is successful, determining n demodulation data as effective data packets; if the verification fails, determining a data packet transmission error corresponding to the 1 st demodulation data; therefore, the accuracy of the identified effective data packet can be ensured by utilizing the detection of the preset identification and the verification of the data packet verification data.
Step 205: and obtaining a hard disk log of the hard disk device according to the effective data packet.
It can be understood that, for the specific manner of the baseboard management controller in this embodiment for obtaining the hard disk logs of the hard disk device according to the valid data packet, the specific manner may be set by the designer according to the practical scenario and the user requirement, for example, each hard disk log includes a log serial number item and a log content item; the log sequence number item comprises hard disk log data in a first number of effective data packets, and the log content item comprises hard disk log data in a second number of effective data packets; for example, each hard disk log may be processed from hard disk log data in a first number+a second number of consecutive valid data packets.
For example, as shown in fig. 10, the first number and the second number may each be 4, and the data format of each hard disk log transmitted by the hard disk device may be composed of 1 log sequence number item (sequence number) and 4 log content items (data items 0-3), that is, hard disk log data in 20 consecutive valid data packets. The hard disk log data in the 1 st valid data packet in the valid data packets of the log sequence number item can be a preset log sequence number index (0 x 8), such as a preset numerical value or codes corresponding to the hard disk log data of other valid data packets (the next three valid data packets) in the log sequence number item; the hard disk log data in the 1 st effective data packet in the effective data packets of each log content item can be respectively corresponding to preset log serial number indexes (0 xA, 0xB, 0xC and 0 xD) which respectively point to 4 log content items; if the index of the preset log sequence number corresponding to the 4 log content items is 0x7766554433221100, the data contents of the 0xA, 0xB, 0xC and 0xD items can be 0x1100,0x3322,0x5544 and 0x7766 respectively.
Correspondingly, the baseboard management controller in the step can judge whether the hard disk log data in the 1 st effective data packet in the continuous 20 effective data packets which are currently acquired is a preset log sequence number index; if the index is not the preset log sequence number index, the step 203 is entered, and a new valid data packet is continuously acquired; if the data is the preset data packet identification data, judging whether hard disk log data in the 5 th effective data packet, the 9 th effective data packet, the 13 th effective data packet and the 17 th effective data packet in the 20 effective data packets are all corresponding preset data item indexes; if the non-uniformity is the corresponding preset data item index, determining a hard disk log transmission error corresponding to the first effective data packet; and if the indexes are the corresponding preset data item indexes, the hard disk log data in the 2 nd to 4 th effective data packets in the 20 effective data packets are utilized to splice to obtain the log sequence number of the hard disk log, and the log contents of the hard disk log are obtained by splicing the 6 th to 8 th effective data packets, the 10 th to 12 th effective data packets, the 14 th to 16 th effective data packets and the 18 th to 20 th effective data packets in the 20 effective data packets.
Furthermore, the baseboard management controller in this embodiment may also feed back the determined valid data packet of the transmission error or information of the hard disk log (such as the receiving time or the log serial number) to the hard disk device, so that the hard disk device can retransmit the valid data packet of the transmission error or the hard disk log before transmitting 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 time is in a preset negotiation period, and send a hard disk log command to the hard disk read-write status indication pin when receiving an permission signal returned by the hard disk read-write status indication pin; the hard disk log command comprises a data packet retransmission command and/or a log retransmission command; the preset negotiation period may be a period agreed by the baseboard management controller and the hard disk device.
For example, if the baseboard management controller needs to feed back the hard disk log command under the condition that the baseboard management controller and the hard disk device agree that the level signal corresponding to the hard disk log is not transmitted in the preset negotiation period, the baseboard management controller may send a reverse transmission request, such as a 30 ms reverse transmission request flag, to the hard disk read-write status indication pin when the current moment is in the preset negotiation period. After the hard disk device recognizes the reverse transmission request, if it is determined that the hard disk device is currently in the negotiation period, a permission signal for permitting reverse transmission is fed back to the baseboard management controller. And after receiving the permission signal, the baseboard management controller reversely transmits a hard disk log command to the hard disk device through the hard disk read-write state indication pin. The hard disk executes the hard disk log command, and can timely reissue the error or lost hard disk log and the effective data packet.
In the embodiment of the invention, the read-write state of the hard disk device and the demodulation data corresponding to the target rectangular wave signal in the level signal are identified according to the level signal, so that the read-write state of the hard disk device can be identified while the demodulation data corresponding to the hard disk log is identified, and the timely identification of the read-write state of the hard disk in the hard disk log transmission process is ensured; and the on and off of the hard disk read-write status indicator lamp are correspondingly controlled according to the identified hard disk read-write status, so that the independent control of the hard disk read-write status indicator lamp is realized, and the user can conveniently check the hard disk read-write status indicator lamp.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a device for obtaining a hard disk log, where the device for obtaining a hard disk log and the method for obtaining a hard disk log described below can be referred to correspondingly.
Referring to fig. 11, fig. 11 is a block diagram of a hard disk log obtaining apparatus according to an embodiment of the present invention. The device is applied to a substrate management controller and can comprise:
The signal receiving module 10 is used for receiving a level signal output by a hard disk read-write state indication pin of the hard disk device; the level signal is obtained by modulating a hard disk read-write state and a hard disk log of the hard disk device;
A width adjustment module 20, configured to identify demodulation data corresponding to each of the target rectangular wave signals in the level signal; the width of the target rectangular wave signal is within a preset width range;
the data parsing module 30 is configured to obtain a hard disk log of the hard disk device according to the demodulated data.
In some embodiments, 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; the width of the target rectangular wave signal is related to the hard disk log.
In some embodiments, the target rectangular wave signal includes a first target rectangular wave signal, the first target rectangular wave signal being a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into the constant high-level signal, the preset low-level rectangular wave having a width smaller than a preset width of a lower boundary of the preset width range.
In some embodiments, the target rectangular wave signal further 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.
In some embodiments, the target rectangular wave signal comprises a first target rectangular wave signal and a second target rectangular wave signal, and the preset width range comprises a first width range and a second width range, the first width range and the second width range being disjoint;
the first target rectangular wave signal comprises a high-level rectangular wave and a low-level rectangular wave which correspond to the hard disk logs with the width 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 the hard disk log having a width within a second width range.
In some embodiments, width mediation module 20 may include:
the identification sub-module is used for identifying demodulation data and the hard disk read-write state of the hard disk device according to the level signal;
And the indicating lamp control submodule is used for correspondingly controlling the on and off of the indicating lamp of the hard disk read-write state according to the read-write state of the hard disk.
In some embodiments, the signal receiving module 10 may be specifically configured to receive, through the universal input/output port pin, a level signal output by a hard disk read/write status indication pin of the hard disk device; the general input/output port pin of the baseboard management controller is connected with the hard disk read-write state indication pin of the hard disk device.
In some embodiments, the apparatus may further comprise:
The feedback control module is used for sending a reverse transmission request signal to the hard disk read-write state indication pin when the current moment is in a preset negotiation time period, and sending a hard disk log command to the hard disk read-write state indication pin when receiving an permission signal returned by the hard disk read-write state indication pin; the hard disk log command comprises a data packet retransmission command and/or a log retransmission command.
In some embodiments, the data parsing module 30 may include:
The data packet determining submodule is used for determining a valid data packet according to the demodulation data; the effective data packet comprises continuous preset number of demodulation data, and the demodulation data at the position in a first preset packet in the effective data packet is preset data packet identification data;
And the log acquisition sub-module is used for acquiring the hard disk log of the hard disk device according to the effective data packet.
In some embodiments, the demodulation data of the position in the second preset packet in the valid data packet is type identification data, the type identification data is any preset identification, and the preset identification comprises a log data identification and an index identification.
In some embodiments, the preset number is n, the valid data packet includes 1 st to nth demodulation data corresponding to n target rectangular wave signals continuously received, the 1 st demodulation data is preset data packet identification data, the 2 nd demodulation data is type identification data, the 3 rd to mth demodulation data is hard disk log data, and the m+1st to nth demodulation data is data packet check 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.
In some embodiments, the packet determination submodule may include:
a first judging unit, configured to judge whether the 1 st demodulation data in the n consecutive demodulation data acquired currently is preset packet identification data; if not, sending an activation signal to the width adjustment module 20;
The second judging unit is used for judging whether the 2 nd demodulation data in the n demodulation data is a preset identifier or not if the data is the preset data packet identifier data;
a data packet error determining unit, configured to determine a data packet transmission error corresponding to the 1 st demodulation data if the data packet error is not a preset identifier;
The verification unit is used for verifying the (m+1) th demodulation data to the (n) th demodulation data in the n demodulation data if the (m+1) th demodulation data is the preset identification; if the verification is successful, the n demodulation data are determined to be valid data packets.
In some embodiments, each hard disk log includes a log sequence number item and a log content item; the log sequence number item comprises hard disk log data in a first number of valid data packets, and the log content item comprises hard disk log data in a second number of valid data packets.
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.
In some embodiments, the first number and the second number are each 4, each hard disk log includes 1 log sequence number item and 4 log content items, and the log acquisition sub-module may include:
the third judging unit is used for judging whether the hard disk log data in the 1 st effective data packet in the 20 continuous effective data packets which are currently acquired are the preset log sequence number indexes or not; if the index is not the preset log sequence number index, sending a starting signal to a data packet determination submodule;
A fourth judging unit, configured to judge whether hard disk log data in a 5 th valid data packet, a 9 th valid data packet, a 13 th valid data packet, and a 17 th valid data packet in the 20 valid data packets are all corresponding preset data item indexes if the data is preset data packet identification data;
the log error determining unit is used for determining a hard disk log transmission error corresponding to the first valid data packet if the non-uniformity is the corresponding preset data item index;
and the log splicing unit is used for splicing hard disk log data in the 2 nd to 4 th effective data packets in the 20 effective data packets to obtain the log serial number of the hard disk log if the log splicing units are all corresponding preset data item indexes, and splicing the hard disk log data in the 6 th to 8 th effective data packets, the 10 th to 12 th effective data packets, the 14 th to 16 th effective data packets and the 18 th to 20 th effective data packets in the 20 effective data packets to obtain the log content of the hard disk log.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a method for sending a hard disk log, where the method for sending a hard disk log described below and the method for obtaining a hard disk log described above may be referred to correspondingly.
Referring to fig. 12, fig. 12 is a flowchart of a method for sending a hard disk log according to an embodiment of the present invention. The method is applied to the hard disk device and can comprise the following steps:
Step 301: and acquiring a hard disk log to be transmitted and a hard disk read-write state.
The hard disk log to be transmitted in the embodiment may be a hard disk log that needs to be transmitted to the baseboard management controller.
Step 302: modulating an original signal corresponding to the read-write state of the hard disk according to the hard disk log to be transmitted to obtain a corresponding level signal.
It can be understood that, in this embodiment, the hard disk device may modulate an original signal (such as a constant level signal and/or a square wave with a fixed period) corresponding to a read-write state of the hard disk according to the obtained hard disk log to be transmitted, so as to obtain a corresponding level signal; the level signal output by the hard disk read-write state indicating pin of the hard disk device can be obtained by modulating the hard disk read-write state of the hard disk device and the hard disk log to be transmitted.
Correspondingly, corresponding to the embodiment of the method for acquiring the hard disk log, in the embodiment, the hard disk device can modulate the original signal corresponding to the idle state and/or the active state according to the hard disk log to be transmitted to obtain a corresponding level signal; the level signal comprises a target rectangular wave signal with the width within a preset width range.
Specifically, for the specific modulation mode of the level signal corresponding to the hard disk log in this embodiment, a mode corresponding to the demodulation process of the level signal and the hard disk log obtaining process in the embodiment of the method for obtaining the hard disk log may be used for setting, which is not described herein.
Step 303: transmitting a level signal to the baseboard management controller through a hard disk read-write state indication pin; the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device.
In the embodiment of the invention, the out-of-band monitoring of the hard disk device is realized by connecting the substrate management controller with the hard disk read-write state indication pin of the hard disk device and directly outputting the hard disk log to the substrate management controller by the hard disk read-write state indication pin of the hard disk device, so that the problem that the out-of-band monitoring of the hard disk device is difficult to realize due to the fact that an out-of-band management system does not have permission to access hard disk data in the traditional out-of-band monitoring scheme of the hard disk is solved, and the out-of-band monitoring hard disk device range of the substrate management controller is improved; and the hard disk log output function is added on the basis of the original hard disk read-write state output function by modulating the level signal output by the hard disk read-write state indication pin, so that the hard disk log can be obtained after the substrate management controller demodulates and processes the modulated level signal, the transmission of the hard disk log can be realized by utilizing the existing hard disk read-write state indication pin of the hard disk device without affecting the original function, and the out-of-band monitoring difficulty of the hard disk device is reduced.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a device for sending a hard disk log, where the device for sending a hard disk log described below and the method for sending a hard disk log described above may be referred to correspondingly.
Referring to fig. 13, fig. 13 is a block diagram illustrating a hard disk log sending device according to an embodiment of the present invention. The device is applied to hard disk equipment and can comprise:
the acquisition module 40 is used for acquiring the hard disk log to be transmitted and the hard disk read-write state;
The signal modulation module 50 is configured to modulate an original signal corresponding to a hard disk read-write state according to a hard disk log to be transmitted, so as to obtain a corresponding level signal;
the log sending module 60 is configured to send a level signal to the baseboard management controller through the hard disk read-write status indication pin; the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device.
Corresponding to the above method embodiment, the embodiment of the present invention further provides an electronic device, where an electronic device described below may be referred to correspondingly with the above method for obtaining the hard disk log and the method for sending the hard disk log.
Referring to fig. 14, fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the invention. The electronic device may include:
a memory D1 for storing a computer program;
And the processor D2 is configured to implement the method for obtaining the hard disk log or the method for sending the hard disk log provided in the method embodiment when executing the computer program.
Specifically, referring to fig. 15, fig. 15 is a schematic diagram of a specific structure of an electronic device according to an embodiment of the present invention, where the electronic device may have a relatively large difference due to different configurations or performances, and may include one or more processors (central processing units, CPU) 322 (e.g., one or more processors) and a memory 332, and one or more storage mediums 330 (e.g., one or more mass storage devices) storing application programs 342 or data 344. Wherein the memory 332 and the storage medium 330 may be transitory or persistent. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the device. Still further, the central processor 322 may 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.
The electronic device 310 may also 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. For example, windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
The electronic device 310 may be embodied as a baseboard management controller or a hard disk device.
The steps in the method for acquiring a hard disk log or the method for transmitting a hard disk log described above may be implemented by the structure of the electronic device.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a computer readable storage medium, where a computer readable storage medium described below and a method for obtaining a hard disk log and a method for sending a hard disk log described above may be referred to correspondingly.
A computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the method for obtaining a hard disk log or the method for sending a hard disk log in the above method embodiment.
The computer readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, which may store program codes.
In the description, each embodiment is described in a progressive manner, and each embodiment is mainly described by the differences from other embodiments, so that the same similar parts among the embodiments are mutually referred. The apparatus, the electronic device and the computer readable storage medium disclosed in the embodiments have a relatively simple description, and the relevant points refer to the description of the method section since the apparatus, the electronic device and the computer readable storage medium correspond to the method disclosed in the embodiments.
The method, the device, the electronic equipment and the computer readable storage medium for acquiring the hard disk log provided by the invention are described in detail. The principles and embodiments of the present invention have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present invention and its core ideas. It should be noted that it will be apparent to those skilled in the art that the present invention may be modified and practiced without departing from the spirit of the present invention.

Claims (19)

1. The method for acquiring the hard disk log is characterized by being applied to a baseboard management controller and comprising the following steps of:
receiving a level signal output by a hard disk read-write state indication pin of a hard disk device; the level signal is modulated by a hard disk read-write state and a hard disk log of the hard disk device, and the baseboard management controller is connected with a hard disk read-write state indication pin of the hard disk device;
Identifying demodulation data corresponding to each target rectangular wave signal in the level signals; the width of the target rectangular wave signal is within a preset width range;
Determining a valid data packet according to the demodulation data; the effective data packet comprises a continuous preset number of demodulation data, and the demodulation data at the position in a first preset packet in the effective data packet is preset data packet identification data;
And obtaining the hard disk log of the hard disk device according to the effective data packet.
2. The method for obtaining a hard disk log according to claim 1, wherein 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; the width of the target rectangular wave signal is related to the hard disk log.
3. The method according to claim 2, wherein the target rectangular wave signal includes the first target rectangular wave signal, the first target rectangular wave signal being a high-level rectangular wave obtained by inserting a preset low-level rectangular wave into a constant high-level signal, the preset low-level rectangular wave having a width smaller than a preset width of a 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 further comprises the second target rectangular wave signal, the second target rectangular wave signal comprises 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.
5. The method of 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 comprises a high-level rectangular wave and a low-level rectangular wave which are corresponding to the hard disk log and have the width within the first width range; the second target rectangular wave signal comprises a high-level rectangular wave and a low-level rectangular wave which are corresponding to the hard disk log and have widths within the second width range.
6. The method of claim 1, wherein identifying the demodulated data corresponding to each of the target rectangular wave signals in the level signal comprises:
identifying the demodulation data and the hard disk read-write state of the hard disk device according to the level signal;
and correspondingly controlling the on and off of the hard disk read-write state indicator lamp according to the hard disk read-write state.
7. The method of claim 1, wherein the receiving the level signal output by the hard disk read-write status indication pin of the hard disk device comprises:
receiving a level signal output by a hard disk read-write state indication pin of the hard disk device through a general input/output port pin; and the universal input/output port pin of the baseboard management controller is connected with the hard disk read-write state indication pin of the hard disk device.
8. The method for obtaining a hard disk log according to claim 1, further comprising:
when the current moment is in a preset negotiation time period, a reverse transmission request signal is sent to the hard disk read-write state indication pin, and when an permission signal returned by the hard disk read-write state indication pin is received, a hard disk log command is sent to the hard disk read-write state indication pin; the hard disk log command comprises a data packet retransmission command and/or a log retransmission command.
9. The method for obtaining a hard disk log according to claim 1, wherein the demodulation data of the position in the second preset packet in the valid data packet is type identification data, the type identification data is any preset identification, and the preset identification includes a log data identification and an index identification.
10. The method according to claim 9, wherein the predetermined number is n, the valid data packet includes 1 st to nth demodulation data corresponding to n target rectangular wave signals received continuously, the 1 st demodulation data is the predetermined data packet identification data, the 2 nd demodulation data is the type identification data, the 3 rd to mth demodulation data is hard disk log data, and the m+1st to nth demodulation data is packet check 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.
11. The method for obtaining a hard disk log according to claim 10, wherein said determining a valid data packet from said demodulated data comprises:
Judging whether the 1 st demodulation data in the n continuous demodulation data which are acquired at present is the preset data packet identification data or not;
if the data packet is not the preset data packet identification data, executing the step of identifying the demodulation data corresponding to each target rectangular wave signal in the level signal;
If the data packet is the preset data packet identification data, judging whether the 2 nd demodulation data in the n demodulation data is the preset identification;
if the data packet transmission error is not the preset identification, determining the data packet transmission error corresponding to the 1 st demodulation data;
if the preset identification is the preset identification, checking by using the (m+1) th demodulation data to the (n) th demodulation data in the n demodulation data; and if the verification is successful, determining the n demodulation data as valid data packets.
12. The method for obtaining a hard disk log according to claim 1, wherein each hard disk log comprises a log serial number item and a log content item; the log sequence number item comprises hard disk log data in a first number of valid data packets, and the log content item comprises hard disk log data in a second number of valid data packets.
13. The method for obtaining a hard disk log according to claim 12, wherein the first number and the second number are each 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.
14. The method for obtaining hard disk logs according to claim 13, wherein the first number and the second number are each 4, each hard disk log includes 1 log serial number item and 4 log content items, and the obtaining the hard disk log of the hard disk device according to the valid data packet includes:
judging whether the hard disk log data in the 1 st effective data packet in the 20 continuous effective data packets which are acquired currently is the preset log sequence number index or not;
If the data packet is not the index of the preset log sequence number, executing the step of determining the effective data packet according to the demodulation data;
If the data is the preset data packet identification data, judging whether the hard disk log data in the 5 th effective data packet, the 9 th effective data packet, the 13 th effective data packet and the 17 th effective data packet in the 20 effective data packets are all corresponding preset data item indexes;
if the non-uniformity is the corresponding preset data item index, determining a hard disk log transmission error corresponding to the first effective data packet;
And if the indexes are the corresponding preset data item indexes, the log sequence numbers of the hard disk logs are obtained by splicing the hard disk log data in the 2 nd to 4 th effective data packets in the 20 effective data packets, and the log contents of the hard disk logs are obtained by splicing the hard disk log data in the 6 th to 8 th effective data packets, the 10 th to 12 th effective data packets, the 14 th to 16 th effective data packets and the 18 th to 20 th effective data packets in the 20 effective data packets.
15. An acquisition device of a hard disk log, which is applied to a baseboard management controller, comprising:
The signal receiving module is used for receiving a level signal output by a hard disk read-write state indication pin of the hard disk device; the level signal is obtained by modulating a hard disk read-write state and a hard disk log of the hard disk device;
The width modulation module is used for identifying demodulation data corresponding to each target rectangular wave signal in the level signals; the width of the target rectangular wave signal is within a preset width range;
the data analysis module is used for acquiring a hard disk log of the hard disk device according to the demodulated data;
wherein, the data parsing module includes:
A data packet determining sub-module for determining a valid data packet according to the demodulation data; the effective data packet comprises a continuous preset number of demodulation data, and the demodulation data at the position in a first preset packet in the effective data packet is preset data packet identification data;
And the log acquisition sub-module is used for acquiring the hard disk log of the hard disk device according to the effective data packet.
16. A method for transmitting a hard disk log, applied to a hard disk device, comprising:
Acquiring a hard disk log to be transmitted and a hard disk read-write state;
modulating an original signal corresponding to the read-write state of the hard disk according to the hard disk log to be transmitted to obtain a corresponding level signal;
transmitting the level signal to a baseboard management controller through the hard disk read-write state indication pin; the substrate management controller is connected with a hard disk read-write state indication pin of the hard disk device;
Modulating an original signal corresponding to a hard disk read-write state according to the hard disk log to be transmitted to obtain a corresponding level signal, wherein the method comprises the following steps:
Determining an effective data packet according to the hard disk log to be transmitted; the effective data packet comprises continuous preset number of demodulation data, and the demodulation data at the position in a first preset packet in the effective data packet is preset data packet identification data;
and modulating an original signal corresponding to the read-write state of the hard disk according to the effective data packet to obtain a corresponding level signal.
17. A transmitting apparatus of a hard disk log, which is applied to a hard disk device, comprising:
the acquisition module is used for acquiring the hard disk log to be transmitted and the hard disk read-write state;
the signal modulation module is used for modulating an original signal corresponding to the hard disk read-write state according to the hard disk log to be transmitted to obtain a corresponding level signal;
The log sending module is used for sending the level signal to the baseboard management controller through the hard disk read-write state indication pin; the substrate management controller is connected with a hard disk read-write state indication pin of the hard disk device;
The signal modulation module is specifically configured to determine an effective data packet according to the hard disk log to be transmitted; modulating an original signal corresponding to the read-write state of the hard disk according to the effective data packet to obtain a corresponding level signal; the effective data packet comprises continuous preset number of demodulation data, and the demodulation data of the position in the first preset packet in the effective data packet is preset data packet identification data.
18. An electronic device, comprising:
A memory for storing a computer program;
a processor for executing the computer program, which when executed by the processor implements the steps of the method for acquiring a hard disk log according to any one of claims 1 to 14 or the method for transmitting a hard disk log according to claim 16.
19. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method for acquiring a hard disk log according to any one of claims 1 to 14 or the method for transmitting a hard disk log according to claim 16.
CN202410382055.7A 2024-03-29 2024-03-29 Method, device, equipment and medium for acquiring and sending hard disk logs Active CN117971608B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410382055.7A CN117971608B (en) 2024-03-29 2024-03-29 Method, device, equipment and medium for acquiring and sending hard disk logs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410382055.7A CN117971608B (en) 2024-03-29 2024-03-29 Method, device, equipment and medium for acquiring and sending hard disk logs

Publications (2)

Publication Number Publication Date
CN117971608A CN117971608A (en) 2024-05-03
CN117971608B true CN117971608B (en) 2024-06-07

Family

ID=90846465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410382055.7A Active CN117971608B (en) 2024-03-29 2024-03-29 Method, device, equipment and medium for acquiring and sending hard disk logs

Country Status (1)

Country Link
CN (1) CN117971608B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8793532B1 (en) * 2012-01-25 2014-07-29 Western Digital Technologies, Inc. Hard-disk drive work load profiling and capturing systems and methods
CN105760247A (en) * 2016-02-05 2016-07-13 浪潮(北京)电子信息产业有限公司 System and method for processing hard disk faults
CN115168921A (en) * 2022-09-08 2022-10-11 中国电子科技集团公司第十五研究所 Lossless deletion management device suitable for multi-solid-state hard disk system
CN116594493A (en) * 2023-05-08 2023-08-15 苏州浪潮智能科技有限公司 Hard disk device control method and device, electronic device and storage medium
CN117076179A (en) * 2023-08-31 2023-11-17 浪潮(山东)计算机科技有限公司 Hard disk indicator lamp control method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8793532B1 (en) * 2012-01-25 2014-07-29 Western Digital Technologies, Inc. Hard-disk drive work load profiling and capturing systems and methods
CN105760247A (en) * 2016-02-05 2016-07-13 浪潮(北京)电子信息产业有限公司 System and method for processing hard disk faults
CN115168921A (en) * 2022-09-08 2022-10-11 中国电子科技集团公司第十五研究所 Lossless deletion management device suitable for multi-solid-state hard disk system
CN116594493A (en) * 2023-05-08 2023-08-15 苏州浪潮智能科技有限公司 Hard disk device control method and device, electronic device and storage medium
CN117076179A (en) * 2023-08-31 2023-11-17 浪潮(山东)计算机科技有限公司 Hard disk indicator lamp control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117971608A (en) 2024-05-03

Similar Documents

Publication Publication Date Title
CN105183575A (en) Processor fault diagnosis method, device and system
CN108647131B (en) Output system of running log
CN111176913A (en) Circuit and method for detecting Cable Port in server
CN117971608B (en) Method, device, equipment and medium for acquiring and sending hard disk logs
CN104484260A (en) Simulation monitoring circuit based on GJB289 bus interface SoC (system on a chip)
CN117971611B (en) Data demodulation method, modulation method, device, equipment and medium for hard disk log
CN115480975A (en) Wiring checking method and device
CN109753396A (en) A kind of cable self checking method, system and the server of storage system
CN115729872A (en) Computing device and detection method for PCIE cable connection
US20220292045A1 (en) Circuit structure with automatic pcie link configuration adjustment and method thereof
CN115129552A (en) Method, device, equipment and storage medium for monitoring transmission state of I2C bus
CN112596983A (en) Monitoring method for connector in server
CN113204475A (en) Lighting device and method for hard disk of server backboard and server
CN117971613B (en) Hard disk monitoring system, method, equipment, storage medium and baseboard management controller
CN117971610B (en) Hard disk monitoring method, device, system, equipment and storage medium
CN117667818B (en) Signal transmission structure, server and signal transmission method
CN113505045B (en) Hard disk fault display method and device and server
CN117992311B (en) Server and hard disk monitoring method, device, equipment and medium thereof
US20230350400A1 (en) Log information obtaining system and method
CN114625213B (en) Storage device adapter card, storage device testing system and method
CN112415296B (en) Test equipment and test system
CN210181587U (en) Data storage unit detection device
CN117093514A (en) System, method, device and equipment for identifying uplink board card connected with hard disk backboard
JP2006235665A (en) Command tester
CN117687875A (en) Liquid cooling equipment fault detection method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant