CN112527575B - Hard disk lighting test method, device and equipment and readable storage medium - Google Patents

Hard disk lighting test method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN112527575B
CN112527575B CN202011352371.8A CN202011352371A CN112527575B CN 112527575 B CN112527575 B CN 112527575B CN 202011352371 A CN202011352371 A CN 202011352371A CN 112527575 B CN112527575 B CN 112527575B
Authority
CN
China
Prior art keywords
hard disk
indicator lamp
display
lighting test
cpld
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
CN202011352371.8A
Other languages
Chinese (zh)
Other versions
CN112527575A (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202011352371.8A priority Critical patent/CN112527575B/en
Publication of CN112527575A publication Critical patent/CN112527575A/en
Application granted granted Critical
Publication of CN112527575B publication Critical patent/CN112527575B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source

Abstract

The application discloses a hard disk lighting test method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: presetting a corresponding relation among an I2C address of a backboard where a hard disk is located, an address of the hard disk and an indicator lamp display state corresponding to the hard disk; receiving an indicator lamp display instruction; controlling an indicator lamp corresponding to the target hard disk to display through an I2C interface of the CPU by using the corresponding relation and an indicator lamp display instruction to obtain an actual display state of the indicator lamp corresponding to the target hard disk; and obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk. According to the technical scheme, the hard disk lighting test can be realized only by means of the physical addresses of the hardware, such as the backboard where the hard disk is located, the hard disks and the I2C interface of the CPU, so that the complexity of the hard disk lighting test can be reduced, and the convenience of the hard disk lighting test is improved.

Description

Hard disk lighting test method, device and equipment and readable storage medium
Technical Field
The present disclosure relates to the field of hard disk lighting technologies, and more particularly, to a hard disk lighting test method, apparatus, device, and computer readable storage medium.
Background
At present, the indication lamp corresponding to the hard disk is usually arranged in the server, the running state of the hard disk is distinguished and positioned by means of the display condition of the indication lamp, in addition, the indication of the indication lamp is convenient for a worker to timely obtain the prompt of the abnormal hard disk, and the hard disk can be correctly replaced. Before the hard disk condition is displayed by the indicator lamp, the indicator lamp display condition needs to be tested, so that the condition that the hard disk operation state is indicated by mistake due to the error of the lighting of the hard disk is avoided.
In the conventional method, when a hard disk lighting test is performed, a lighting test control program conforming to each system is generally developed in a server, for example, a ub packet is required to be used for a UOS system, an rpm packet is required to be used for reddat, an exe packet is required to be used for windows, and then the lighting test of the hard disk is realized in a corresponding operating system by the developed lighting test control program.
In summary, how to reduce the complexity of the hard disk lighting test is a technical problem to be urgently solved by those skilled in the art.
Disclosure of Invention
In view of the above, an object of the present application is to provide a hard disk power-on test method, apparatus, device and computer readable storage medium for reducing the complexity of the hard disk power-on test.
In order to achieve the above purpose, the present application provides the following technical solutions:
a hard disk lighting test method is applied to a CPU and comprises the following steps:
presetting a corresponding relation among an I2C address of a back plate where a hard disk is located, the address of the hard disk and an indicator light display state corresponding to the hard disk;
receiving an indicator light display instruction; the instruction lamp display instruction comprises an address of a target hard disk and a theoretical display state of an indicator lamp corresponding to the target hard disk;
controlling an indicator lamp corresponding to the target hard disk to display through an I2C interface of the CPU by utilizing the corresponding relation and the indicator lamp display instruction, so as to obtain the actual display state of the indicator lamp corresponding to the target hard disk;
and obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk.
Preferably, the controlling, by using the correspondence and the indication lamp display instruction, the indication lamp corresponding to the target hard disk through the I2C interface of the CPU to display includes:
determining the I2C address of the backboard where the target hard disk is located according to the corresponding relation and the indicator light display instruction;
according to the I2C address of the backboard where the target hard disk is located, the indicator light display instruction is sent to the CPLD on the backboard where the target hard disk is located through the I2C interface of the CPU;
and controlling the indicator light corresponding to the target hard disk to display by utilizing the CPLD according to the indicator light display instruction and the corresponding relation.
Preferably, after the CPLD is used to control the indicator light corresponding to the target hard disk to display according to the indicator light display instruction and the corresponding relationship, the method further includes:
judging whether a feedback instruction sent by the CPLD is received; the feedback instruction comprises the actual display state of an indicator lamp corresponding to the target hard disk;
if yes, obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator light corresponding to the target hard disk, wherein the lighting test result comprises the following steps:
and comparing the indicator lamp display instruction with a feedback instruction sent by the CPLD to obtain the lighting test result.
Preferably, if it is determined that the feedback instruction sent by the CPLD is not received, the method further includes:
detecting whether a link between the CPU and the back plate where the target hard disk is located is normal or not;
if not, sending out a link error prompt;
and if so, sending a feedback prompt to the CPLD through an I2C interface of the CPU.
Preferably, after sending the feedback hint to the CPLD through the I2C interface of the CPU, the method further includes:
and if the feedback instruction sent by the CPLD is not received within a preset time length, determining that the CPLD is abnormal and sending a prompt of the CPLD abnormality.
Preferably, the indicator light that the hard disk corresponds shows the state and includes that the lamp goes out, red light and blue light entirely, wherein, the lamp goes out entirely does the hard disk is not in place, the red light does hard disk trouble, blue light do the hard disk is in operating condition.
A hard disk lighting test device is applied to a CPU and comprises:
the device comprises a setting module, a display module and a display module, wherein the setting module is used for presetting the corresponding relation among an I2C address of a back plate where a hard disk is positioned, the address of the hard disk and the display state of an indicator lamp corresponding to the hard disk;
the receiving module is used for receiving an indicator lamp display instruction; the instruction lamp display instruction comprises an address of a target hard disk and a theoretical display state of an indicator lamp corresponding to the target hard disk;
the control module is used for controlling the indicator lamp corresponding to the target hard disk to display through the I2C interface of the CPU by utilizing the corresponding relation and the indicator lamp display instruction so as to obtain the actual display state of the indicator lamp corresponding to the target hard disk;
and the result obtaining module is used for obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk.
Preferably, the control module includes:
the determining unit is used for determining the I2C address of the backboard where the target hard disk is located according to the corresponding relation and the indicator light display instruction;
the sending unit is used for sending the indicator lamp display instruction to the CPLD on the backboard where the target hard disk is located through the I2C interface of the CPU by using the I2C address of the backboard where the target hard disk is located;
and the control unit is used for controlling the indicator lamp corresponding to the target hard disk to display by utilizing the CPLD according to the indicator lamp display instruction and the corresponding relation.
A hard disk drive lighting test apparatus comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the hard disk lighting test method in any one of the above items when executing the computer program.
A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the hard disk lighting test method according to any one of the preceding claims.
The application provides a hard disk lighting test method, a device, equipment and a computer readable storage medium, wherein the method comprises the following steps: presetting a corresponding relation among an I2C address of a backboard where a hard disk is located, an address of the hard disk and an indicator lamp display state corresponding to the hard disk; receiving an indicator light display instruction; the instruction lamp display instruction comprises an address of a target hard disk and a theoretical display state of an indicator lamp corresponding to the target hard disk; controlling an indicator lamp corresponding to the target hard disk to display through an I2C interface of the CPU by using the corresponding relation and an indicator lamp display instruction to obtain an actual display state of the indicator lamp corresponding to the target hard disk; and obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk.
According to the technical scheme, the corresponding relation among the I2C address of the back plate where the hard disk is located, the hard disk address and the display state of the indicating lamp corresponding to the hard disk is preset, after the display instruction of the indicating lamp is received, the preset corresponding relation and the display instruction of the indicating lamp are utilized, the indicating lamp corresponding to the target hard disk is controlled through the I2C interface of the CPU to display, then, the lighting test result is obtained according to the actual display state and the theoretical display state of the indicating lamp corresponding to the target hard disk, compared with the existing method that a specific control program needs to be developed and designed from the operating system level, the lighting test of the hard disk can be carried out only through the physical addresses of the hardware, such as the back plate where the hard disk is located, and the I2C interface of the CPU, the lighting test of the hard disk can be achieved without depending on the operating system level, therefore, the complexity of the lighting test of the hard disk can be reduced, and the convenience of the lighting test of the hard disk is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a hard disk lighting test method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of a hard disk lighting test device according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a hard disk lighting test device according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
In the conventional hard disk lighting test, a lighting test control program corresponding to each operating system needs to be developed in a server to perform the lighting test on the hard disk by the control program, but because the number of operating systems compatible with the server is large, the complexity of the lighting test of the hard disk is increased because the lighting test control program corresponding to each operating system is developed and designed, and therefore, the application provides a hard disk lighting test method for reducing the complexity of the lighting test of the hard disk.
Specifically, referring to fig. 1, which shows a flowchart of a hard disk lighting test method provided in the embodiment of the present application, the hard disk lighting test method provided in the embodiment of the present application is applied to a CPU, and may include:
s11: the corresponding relation among the I2C address of the back plate where the hard disk is located, the address of the hard disk and the display state of the indicator light corresponding to the hard disk is preset.
In the application, the corresponding relation among the I2C address of the back plate where the hard disk is located, the address of the hard disk and the display state of the indicator light corresponding to the hard disk can be set based on the relation among the back plate where the hard disk is located, the hard plate and the display light corresponding to the hard disk.
It should be noted that, the hard disk mentioned in this application may specifically be an NVME (Non-Volatile Memory express) hard disk, and for this type of hard disk, each backplane specifically has two I2C interfaces, and accordingly, two I2C addresses need to be set for the backplane, the two I2C interfaces control four NVME hard disks in common, the two NVME hard disks share one IC2 address, and each NVME hard disk has its own specific address. For example: the Valid I2C address 0x24 may be used to represent a first I2C address on a certain backplane, and the Valid I2C address 0x25 may be used to represent a second I2C address on the backplane, and the addresses of the hard disk may be set to 0x03 and 0x04.
S12: receiving an indicator lamp display instruction; the instruction lamp display instruction comprises an address of the target hard disk and a theoretical display state of an indicator lamp corresponding to the target hard disk.
It should be noted that, in the present application, the CPU may directly connect the bootable device through the high-speed signal line, and the bootable device may send an indicator display instruction to the CPU in the shell environment, that is, when performing the lighting test on the hard disk, the CPU may receive the indicator display instruction sent by the bootable device through the high-speed signal line in the shell environment, where the indicator display instruction specifically includes an address of a target hard disk to be subjected to the lighting test and a theoretical display state of an indicator corresponding to the target hard disk, so as to perform the lighting test on the target hard disk according to the indicator display instruction.
S13: and controlling the indicator lamp corresponding to the target hard disk to display through the I2C interface of the CPU by utilizing the corresponding relation and the indicator lamp display instruction, so as to obtain the actual display state of the indicator lamp corresponding to the target hard disk.
After receiving the indicator light display instruction, the I2C address of the backplane where the target hard disk is located may be obtained according to the preset correspondence relationship in step S11 and the address of the target hard disk included in the indicator light display instruction, and then the indicator light display instruction may be correspondingly sent to the I2C address of the backplane where the target hard disk is located through the I2C interface of the CPU, and the indicator light corresponding to the target hard disk is controlled to display according to the address of the target hard disk in the indicator light display instruction and the theoretical display state of the indicator light corresponding to the target hard disk, so as to obtain the actual display state of the indicator light corresponding to the target hard disk.
S14: and obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk.
After the actual display state of the indicator light corresponding to the target hard disk is obtained, the actual display state of the indicator light corresponding to the target hard disk can be compared with the theoretical display state of the indicator light corresponding to the target hard disk, if the actual display state of the indicator light corresponding to the target hard disk is consistent with the theoretical display state of the indicator light corresponding to the target hard disk, the indicator light corresponding to the target hard disk is displayed correctly, and if the actual display state of the indicator light corresponding to the target hard disk is inconsistent with the theoretical display state of the indicator light corresponding to the target hard disk, at the moment, a prompt for displaying the error can be sent out, so that a worker can check the connection, setting and the like of the indicator light of the target hard disk, correct display can be achieved, and accuracy and reliability of hard disk state indication during normal work of a follow-up indicator light are improved.
Through the process, when the hard disk lighting test is realized, the hard disk lighting test can be realized only by means of the backboard where the hard disk is located, the physical addresses of the hardware, namely the hard disk, and the IC2 interface of the CPU, so that the instruction can be directly issued to the CPU in the shell environment, the hard disk lighting test can be realized by the CPU according to the set corresponding relation, the lighting test does not need to be carried out depending on the operating system layer, the redundancy and the waste of software development can be avoided, the complexity of the hard disk lighting test can be reduced, and the efficiency and the convenience of the hard disk lighting test can be improved.
According to the technical scheme, the I2C address of the back plate where the hard disk is located, the corresponding relation between the hard disk address and the display state of the indicator lamp corresponding to the hard disk are preset, after the display instruction of the indicator lamp is received, the indicator lamp corresponding to the target hard disk is controlled to display through the I2C interface of the CPU, then, the lighting test result is obtained according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk, compared with the existing method that a specific control program needs to be developed and designed from the operating system level, the lighting test of the hard disk can be carried out, the lighting test of the hard disk can be realized only by means of the physical addresses of the hardware, namely the back plate where the hard disk is located, and the I2C interface of the CPU, and the lighting test of the hard disk can be realized without depending on the operating system level, therefore, the complexity of the lighting test of the hard disk can be reduced, and the convenience of the lighting test of the hard disk is improved.
The hard disk lighting test method provided in the embodiment of the present application, which uses the correspondence and the indication lamp display instruction to control the indication lamp corresponding to the target hard disk through the I2C interface of the CPU to display, may include:
determining the I2C address of the backboard where the target hard disk is located according to the corresponding relation and the indication lamp display instruction;
according to the I2C address of the backboard where the target hard disk is located, the indication lamp display instruction is sent to the CPLD on the backboard where the target hard disk is located through the I2C interface of the CPU;
and controlling the indicator lamp corresponding to the target hard disk to display by using the CPLD according to the indicator lamp display instruction and the corresponding relation.
In this application, the specific process of displaying by using the corresponding relationship and the indication lamp display instruction and controlling the indication lamp corresponding to the target hard disk through the I2C interface of the CPU is as follows:
the method comprises the steps of determining an I2C address of a backboard where a target hard disk is located according to a set corresponding relation and an address of the target hard disk contained in an indicator light display instruction, sending the indicator light display instruction to a CPLD (Complex programmable logic device) on the backboard corresponding to the determined I2C address through an I2C interface of a CPU (central processing unit), namely the CPLD where the target hard disk is located, according to the I2C address of the backboard where the target hard disk is located, and then controlling the indicator light corresponding to the target hard disk to display by using the CPLD according to the indicator light display instruction and the corresponding relation.
Through the manner of sending the indication lamp display instruction to the CPLD of the backboard and controlling the display of the indication lamp corresponding to the target hard disk by the CPLD, the pressure of the CPU can be reduced, and the reliability of the display control of the indication lamp of the target hard disk is improved conveniently.
The hard disk lighting test method provided by the embodiment of the application, after the CPLD is used to control the indicator lamp corresponding to the target hard disk to display according to the indicator lamp display instruction and the corresponding relationship, may further include:
judging whether a feedback instruction sent by the CPLD is received; the feedback instruction may include an actual display state of an indicator light corresponding to the target hard disk;
if yes, obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk, wherein the lighting test result can include:
and comparing the display instruction of the indicator lamp with the feedback instruction sent by the CPLD to obtain a lighting test result.
In the application, after the CPLD is used to control the indicator corresponding to the target hard disk to display according to the indicator display instruction and the corresponding relationship, the CPU may determine whether it receives the feedback instruction sent by the CPLD, where the feedback instruction may include an actual display state of the indicator corresponding to the target hard disk, and if it is determined that the feedback instruction sent by the CPLD is received, a process of obtaining a lighting test result is specifically: the theoretical display state of the indicator lamp corresponding to the target hard disk contained in the indicator lamp display instruction received by the CPU is compared with the actual display state of the indicator lamp corresponding to the target hard disk contained in the feedback instruction sent by the CPLD to obtain a lighting test result, so that the CPU does not need to specially combine the indicator lamp display instruction and the corresponding relation to inquire a backboard where the target hard disk is located and obtain the actual display state of the indicator lamp corresponding to the target hard disk, the workload of the CPU is reduced conveniently, and the obtaining efficiency of the lighting test result is improved.
The hard disk lighting test method provided by the embodiment of the application, if it is determined that the feedback instruction sent by the CPLD is not received, may further include:
detecting whether a link between a CPU and a back board where a target hard disk is located is normal;
if not, sending out a prompt of a link error;
and if so, sending a feedback prompt to the CPLD through an I2C interface of the CPU.
When judging whether the feedback instruction sent by the CPLD is received, if the feedback instruction sent by the CPLD is determined not to be received, whether a link between the CPU and a back plate where the target hard disk is located is normal can be detected, if the link between the CPU and the back plate where the target hard disk is located is determined to be abnormal, a prompt of link error is sent out, so that a worker can check and maintain the link in time, the link between the CPU and the back plate where the target hard disk is located can be recovered to be normal, the CPU can receive the feedback instruction sent by the CPLD through the normal link as much as possible, and if the link between the CPU and the back plate where the target hard disk is located is determined to be normal, the feedback prompt can be sent to the CPLD on the back plate where the target hard disk is located through an I2C interface of the CPU, so that the CPLD can send the feedback instruction to the CPU in time after receiving the prompt.
After sending the feedback prompt to the CPLD through the I2C interface of the CPU, the hard disk lighting test method provided in the embodiment of the present application may further include:
if the feedback instruction sent by the CPLD is not received within the preset time span, the CPLD is determined to be abnormal, and a prompt of the CPLD abnormality is sent out.
After the feedback prompt is sent to the CPLD through the I2C interface of the CPU, if the feedback instruction sent by the CPLD is not received within the preset time length, the CPLD is determined to be abnormal, so that the CPLD cannot normally send the feedback instruction, and at the moment, the abnormal prompt of the CPLD can be sent out, so that a worker can repair the CPLD on the backboard where the target hard disk is located according to the prompt as soon as possible, and the influence on the hard disk lighting test is avoided.
It should be noted that the preset time length mentioned above can be specifically set according to the hard disk lighting test requirement and the performance of the CPLD.
According to the lighting test method for the hard disk, the display states of the indicating lamps corresponding to the hard disk can comprise the full-off of the lamps, the red lamps and the blue lamps, wherein the lamps are completely off, the hard disk is not in place, the red lamps are in hard disk failure, and the blue lamps are in working states for the hard disk.
In this application, the display states of the indicator lamps corresponding to the hard disks may specifically include three display states of full-off lamps, red lamps and blue lamps, the full-off lamps may correspond to no hard disk, the red lamps may correspond to a hard disk failure (Error), the blue lamps may correspond to a hard disk in an operating state (Active), and the instruction corresponding to the full-off lamps may specifically be 0x00, the instruction corresponding to the red lamps may specifically be 0x01, and the instruction corresponding to the blue lamps may specifically be 0x02, for example, the indicator lamps corresponding to the hard disk having an address of 0x03 and controlled by the first I2C address of the backplane may be turned on by an indicator lamp display instruction of-I2C x24 x03 x 01.
It should be noted that the display state of the indicator light corresponding to the hard disk may be adjusted according to actual needs, and the display state of the indicator light corresponding to the hard disk is not limited in any way in the present application.
The embodiment of the present application further provides a hard disk lighting test device, which is applied to a CPU, and referring to fig. 2, a schematic structural diagram of the hard disk lighting test device provided in the embodiment of the present application is shown, where the hard disk lighting test device may include:
the setting module 21 is used for presetting the corresponding relation among the I2C address of the back plate where the hard disk is located, the address of the hard disk and the display state of the indicator light corresponding to the hard disk;
the receiving module 22 is used for receiving an indicator light display instruction; the instruction lamp display instruction can comprise an address of a target hard disk and a theoretical display state of an indicator lamp corresponding to the target hard disk;
the control module 23 is configured to control, by using the correspondence and an indicator light display instruction, an indicator light corresponding to the target hard disk to display through an I2C interface of the CPU, so as to obtain an actual display state of the indicator light corresponding to the target hard disk;
and a result obtaining module 24, configured to obtain a lighting test result according to the actual display state and the theoretical display state of the indicator corresponding to the target hard disk.
In an embodiment of the present application, a hard disk lighting test apparatus, a control module 23 may include:
the determining unit is used for determining the I2C address of the backboard where the target hard disk is located according to the corresponding relation and the indication lamp display instruction;
the sending unit is used for sending the display instruction of the indicator lamp to the CPLD on the backboard where the target hard disk is located through the I2C interface of the CPU by using the I2C address of the backboard where the target hard disk is located;
and the control unit is used for controlling the indicator lamp corresponding to the target hard disk to display according to the indicator lamp display instruction and the corresponding relation by utilizing the CPLD.
In the hard disk lighting test device provided in the embodiment of the present application, the control module 23 may further include:
the judging unit is used for judging whether a feedback instruction sent by the CPLD is received or not after the CPLD is used for displaying according to the display instruction of the indicator lamp and the indicator lamp corresponding to the corresponding relation control target hard disk; the feedback instruction may include an actual display state of an indicator light corresponding to the target hard disk;
if it is determined that the feedback instruction sent by the CPLD is received, the obtaining a result module 24 may include:
and the comparison unit is used for comparing the indicator lamp display instruction with the feedback instruction sent by the CPLD to obtain a lighting test result.
In the hard disk lighting test device provided in the embodiment of the present application, the control module 23 may further include:
the detection unit is used for detecting whether a link between the back panel where the CPU and the target hard disk are located is normal or not if the feedback instruction sent by the CPLD is determined not to be received;
sending out a prompt for sending out a prompt of a link error if the link between the CPU and the back plate where the target hard disk is located is abnormal;
and the feedback sending prompting unit is used for sending a feedback prompt to the CPLD through the I2C interface of the CPU if the link between the back boards where the CPU and the target hard disk are located is normal.
In the hard disk lighting test device provided in the embodiment of the present application, the control module 23 may further include:
and the determining unit is used for determining that the CPLD is abnormal and sending out the abnormal prompt of the CPLD if a feedback instruction sent by the CPLD is not received within a preset time length after the feedback prompt is sent to the CPLD through the I2C interface of the CPU.
The embodiment of the application provides a hard disk test device of lighting a lamp, the pilot lamp that the hard disk corresponds shows the state and can include that the lamp goes out, red light and blue lamp entirely, and wherein, the lamp goes out entirely for the hard disk not on the throne, the red light is the hard disk trouble, the blue lamp is in operating condition for the hard disk.
An embodiment of the present application further provides a hard disk lighting test device, see fig. 3, which shows a schematic structural diagram of the hard disk lighting test device provided in the embodiment of the present application, and the hard disk lighting test device may include:
a memory 31 for storing a computer program;
a processor 32, configured to execute the computer program stored in the memory 31, and configured to implement the following steps:
presetting a corresponding relation among an I2C address of a backboard where a hard disk is located, an address of the hard disk and an indicator lamp display state corresponding to the hard disk; receiving an indicator light display instruction; the instruction lamp display instruction comprises an address of a target hard disk and a theoretical display state of an indicator lamp corresponding to the target hard disk; controlling an indicator lamp corresponding to the target hard disk to display through an I2C interface of the CPU by using the corresponding relation and an indicator lamp display instruction to obtain an actual display state of the indicator lamp corresponding to the target hard disk; and obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the following steps may be implemented:
presetting a corresponding relation among an I2C address of a backboard where a hard disk is located, an address of the hard disk and an indicator lamp display state corresponding to the hard disk; receiving an indicator lamp display instruction; the instruction lamp display instruction comprises an address of a target hard disk and a theoretical display state of an indicator lamp corresponding to the target hard disk; controlling an indicator lamp corresponding to the target hard disk to display through an I2C interface of the CPU by utilizing the corresponding relation and an indicator lamp display instruction to obtain an actual display state of the indicator lamp corresponding to the target hard disk; and obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk.
The computer-readable storage medium may include: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
For a description of a relevant part in the hard disk lighting test device, the equipment and the computer readable storage medium provided in the embodiment of the present application, reference may be made to the detailed description of a corresponding part in the hard disk lighting test method provided in the embodiment of the present application, and details are not described herein again.
It should be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Furthermore, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include elements inherent in the list. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element. In addition, parts of the above technical solutions provided in the embodiments of the present application, which are consistent with the implementation principles of corresponding technical solutions in the prior art, are not described in detail so as to avoid redundant description.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (7)

1. A hard disk lighting test method is applied to a CPU and comprises the following steps:
presetting a corresponding relation among an I2C address of a back plate where a hard disk is located, the address of the hard disk and an indicator light display state corresponding to the hard disk;
receiving an indicator lamp display instruction; the indication lamp display instruction comprises an address of a target hard disk and a theoretical display state of an indication lamp corresponding to the target hard disk;
controlling an indicator lamp corresponding to the target hard disk to display through an I2C interface of the CPU by utilizing the corresponding relation and the indicator lamp display instruction, so as to obtain an actual display state of the indicator lamp corresponding to the target hard disk; the displaying the indication lamp corresponding to the target hard disk through the I2C interface of the CPU by using the corresponding relation and the indication lamp display instruction comprises: determining the I2C address of the backboard where the target hard disk is located according to the corresponding relation and the indicator light display instruction; according to the I2C address of the backboard where the target hard disk is located, the indicator light display instruction is sent to the CPLD on the backboard where the target hard disk is located through the I2C interface of the CPU; controlling an indicator lamp corresponding to the target hard disk to display by using the CPLD according to the indicator lamp display instruction and the corresponding relation;
obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk;
after the indicator corresponding to the target hard disk is controlled to display by using the CPLD according to the indicator display instruction and the corresponding relation, the method further comprises the following steps: judging whether a feedback instruction sent by the CPLD is received; the feedback instruction comprises the actual display state of an indicator lamp corresponding to the target hard disk; if yes, obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator light corresponding to the target hard disk, wherein the lighting test result comprises the following steps: and comparing the indicator lamp display instruction with a feedback instruction sent by the CPLD to obtain the lighting test result.
2. The hard disk drive lighting test method according to claim 1, wherein if it is determined that the feedback instruction sent by the CPLD is not received, the method further comprises:
detecting whether a link between the CPU and a back plate where the target hard disk is located is normal;
if not, sending out a prompt of a link error;
and if so, sending a feedback prompt to the CPLD through an I2C interface of the CPU.
3. The hard disk drive lighting test method according to claim 2, after sending a feedback prompt to the CPLD through the I2C interface of the CPU, further comprising:
and if the feedback instruction sent by the CPLD is not received within a preset time length, determining that the CPLD is abnormal and sending a prompt of the CPLD abnormality.
4. The hard disk lighting test method according to claim 1, wherein the indication lamp display status corresponding to the hard disk includes a lamp full-off state, a red lamp and a blue lamp, wherein the lamp full-off state indicates that the hard disk is not in place, the red lamp indicates that the hard disk fails, and the blue lamp indicates that the hard disk is in a working state.
5. A hard disk lighting test device is characterized in that the device is applied to a CPU and comprises:
the device comprises a setting module, a display module and a display module, wherein the setting module is used for presetting the corresponding relation among an I2C address of a back plate where a hard disk is positioned, the address of the hard disk and the display state of an indicator lamp corresponding to the hard disk;
the receiving module is used for receiving an indicator lamp display instruction; the indication lamp display instruction comprises an address of a target hard disk and a theoretical display state of an indication lamp corresponding to the target hard disk;
the control module is used for controlling the indicator lamp corresponding to the target hard disk to display through the I2C interface of the CPU by utilizing the corresponding relation and the indicator lamp display instruction so as to obtain the actual display state of the indicator lamp corresponding to the target hard disk;
the result obtaining module is used for obtaining a lighting test result according to the actual display state and the theoretical display state of the indicator lamp corresponding to the target hard disk;
the control module includes:
the determining unit is used for determining the I2C address of the backboard where the target hard disk is located according to the corresponding relation and the indicator light display instruction;
the sending unit is used for sending the indicator lamp display instruction to the CPLD on the backboard where the target hard disk is located through the I2C interface of the CPU by using the I2C address of the backboard where the target hard disk is located;
the control unit is used for controlling the indicator lamp corresponding to the target hard disk to display by utilizing the CPLD according to the indicator lamp display instruction and the corresponding relation;
the control module further comprises:
the judging unit is used for judging whether a feedback instruction sent by the CPLD is received or not after the CPLD is used for controlling the indicator lamp corresponding to the target hard disk to display according to the indicator lamp display instruction and the corresponding relation; the feedback instruction comprises the actual display state of an indicator lamp corresponding to the target hard disk;
if the feedback instruction sent by the CPLD is determined to be received, the result obtaining module comprises:
and the comparison unit is used for comparing the indicator lamp display instruction with the feedback instruction sent by the CPLD to obtain the lighting test result.
6. A hard disk lighting test device is characterized by comprising:
a memory for storing a computer program;
a processor for implementing the steps of the hard disk lighting test method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the hard disk lighting test method according to any one of claims 1 to 4.
CN202011352371.8A 2020-11-26 2020-11-26 Hard disk lighting test method, device and equipment and readable storage medium Active CN112527575B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011352371.8A CN112527575B (en) 2020-11-26 2020-11-26 Hard disk lighting test method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011352371.8A CN112527575B (en) 2020-11-26 2020-11-26 Hard disk lighting test method, device and equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN112527575A CN112527575A (en) 2021-03-19
CN112527575B true CN112527575B (en) 2023-02-28

Family

ID=74993839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011352371.8A Active CN112527575B (en) 2020-11-26 2020-11-26 Hard disk lighting test method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN112527575B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113204475B (en) * 2021-05-08 2023-01-24 山东英信计算机技术有限公司 Lighting device and method for hard disk of server backboard and server
CN113608937B (en) * 2021-06-28 2023-07-18 苏州浪潮智能科技有限公司 Hard disk backboard LED hard disk-free testing device and method
CN114443445A (en) * 2021-12-31 2022-05-06 苏州浪潮智能科技有限公司 Hard disk lighting method and device, electronic equipment and storage medium
CN114625213B (en) * 2022-01-24 2023-08-11 苏州浪潮智能科技有限公司 Storage device adapter card, storage device testing system and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108680872A (en) * 2018-04-02 2018-10-19 郑州云海信息技术有限公司 A kind of test method suitable for NVME hard disk backboard status lamps
CN108959031A (en) * 2018-06-29 2018-12-07 郑州云海信息技术有限公司 A kind of NVME backboard lighting control method thereof, system, medium and equipment
CN109086192A (en) * 2018-09-18 2018-12-25 郑州云海信息技术有限公司 A kind of onboard SATA hard disc lighting system and method based on IPMI
CN110441713A (en) * 2019-07-12 2019-11-12 苏州浪潮智能科技有限公司 A method of passing through the automatic testing service device LED light stability of BMC
CN110543404A (en) * 2019-07-19 2019-12-06 广东浪潮大数据研究有限公司 Server, hard disk lighting method and system and computer readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9146823B2 (en) * 2013-07-16 2015-09-29 American Megatrends, Inc. Techniques for testing enclosure management controller using backplane initiator
CN105389248A (en) * 2015-12-02 2016-03-09 英业达科技有限公司 Lamp number control system of non-volatile memory solid-state hard disk
CN110413487A (en) * 2018-04-28 2019-11-05 中国长城科技集团股份有限公司 A kind of indicator light management method, system and the baseboard management controller of server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108680872A (en) * 2018-04-02 2018-10-19 郑州云海信息技术有限公司 A kind of test method suitable for NVME hard disk backboard status lamps
CN108959031A (en) * 2018-06-29 2018-12-07 郑州云海信息技术有限公司 A kind of NVME backboard lighting control method thereof, system, medium and equipment
CN109086192A (en) * 2018-09-18 2018-12-25 郑州云海信息技术有限公司 A kind of onboard SATA hard disc lighting system and method based on IPMI
CN110441713A (en) * 2019-07-12 2019-11-12 苏州浪潮智能科技有限公司 A method of passing through the automatic testing service device LED light stability of BMC
CN110543404A (en) * 2019-07-19 2019-12-06 广东浪潮大数据研究有限公司 Server, hard disk lighting method and system and computer readable storage medium

Also Published As

Publication number Publication date
CN112527575A (en) 2021-03-19

Similar Documents

Publication Publication Date Title
CN112527575B (en) Hard disk lighting test method, device and equipment and readable storage medium
WO2022160756A1 (en) Server fault positioning method, apparatus and system, and computer-readable storage medium
US6807643B2 (en) Method and apparatus for providing diagnosis of a processor without an operating system boot
US5951686A (en) Method and system for reboot recovery
US6381694B1 (en) System for automatic recovery from software problems that cause computer failure
US20240012706A1 (en) Method, system and apparatus for fault positioning in starting process of server
US6502208B1 (en) Method and system for check stop error handling
US20090100287A1 (en) Monitoring Apparatus and a Monitoring Method Thereof
US20110107074A1 (en) Electronic Device Capable of Automatically Setting up Operating Systems and Related Method and System
US10922071B2 (en) Centralized off-board flash memory for server devices
WO2018095107A1 (en) Bios program abnormal processing method and apparatus
WO2021057795A1 (en) System starting method and apparatus, node device and computer-readable storage medium
CN108292342B (en) Notification of intrusions into firmware
US20170132102A1 (en) Computer readable non-transitory recording medium storing pseudo failure generation program, generation method, and generation apparatus
KR100831117B1 (en) Method and system for automatic technical support for computers
US8286093B2 (en) Replacement motherboard configuration
US8176309B2 (en) Boot system has BIOS that reads rescue operating system from memory device via input/output chip based on detecting a temperature of a hard disk
WO2023065601A1 (en) Server component self-test anomaly recovery method and device, system, and medium
CN111722965A (en) Computer system and debugging method thereof
EP1185932B1 (en) Method and apparatus for automatically reintegrating a module into a computer system
NO175120B (en) System manager system for data processing system
US20050257095A1 (en) Apparatus and method for detecting and indicating faults on a motherboard
CN101408860A (en) Monitoring apparatus and monitoring method
CN109992971B (en) Method and system for detecting batch firmware security of computer in local area network
US20080141262A1 (en) System, apparatus, and method for managing a service

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
GR01 Patent grant