CN111048139A - Storage medium detection method, device, equipment and readable storage medium - Google Patents

Storage medium detection method, device, equipment and readable storage medium Download PDF

Info

Publication number
CN111048139A
CN111048139A CN201911332540.9A CN201911332540A CN111048139A CN 111048139 A CN111048139 A CN 111048139A CN 201911332540 A CN201911332540 A CN 201911332540A CN 111048139 A CN111048139 A CN 111048139A
Authority
CN
China
Prior art keywords
storage medium
detection
value
register
determining
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.)
Pending
Application number
CN201911332540.9A
Other languages
Chinese (zh)
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 Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur 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 Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911332540.9A priority Critical patent/CN111048139A/en
Publication of CN111048139A publication Critical patent/CN111048139A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details

Landscapes

  • Debugging And Monitoring (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a storage medium detection method, a device, equipment and a readable storage medium. When the read register value is consistent with the written detection value, the read-write function of the storage medium is normal, if the read register value is inconsistent with the written detection value, at least one function of the read function and the write function of the storage medium can be determined to have a problem, at this moment, the storage medium can be judged to be abnormal, namely, the storage medium is failed to be detected, and at this moment, alarm information can be output. When the storage medium is specifically an EEPROM, a user can know that the EEPROM is abnormal, and then the EEPROM or a mainboard is replaced, so that the normal data interaction between the BMC and the EEPROM can be ensured, and the EEPROM can store important data.

Description

Storage medium detection method, device, equipment and readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a storage medium detection method, apparatus, device, and readable storage medium.
Background
EEPROM, or written as E2PROM, chinese full name: english full spelling of electronic erasing type rewritable read-only memory: an Electrically-Erasable Programmable Read-Only Memory is a semiconductor Memory device which can be repeatedly written by electronic means, and can erase the existing information on a computer or a special device and reprogram the information.
Generally, the EEPROM is used to store important data, and the BMC (baseboard management controller) stores and reads and writes important data by interacting therewith. However, when the EEPROM is damaged or unavailable (e.g., cannot be read, cannot be written, cannot be read and written), the BMC still interacts with the EEPROM in reading and writing, which may cause that important data cannot be normally stored or the BMC cannot read valid information, thereby causing data loss or abnormal operation of the BMC.
In summary, how to effectively avoid the problem that data is lost or the BMC cannot read valid information due to the abnormal EEPROM is a technical problem that needs to be solved urgently by those skilled in the art at present.
Disclosure of Invention
The invention aims to provide a storage medium detection method, a storage medium detection device and a readable storage medium, wherein a BMC performs self-detection on the storage medium, finds out the abnormality of the storage medium in time and outputs alarm information, and when the storage medium is an EEPROM (electrically erasable programmable read-only memory), a user can replace the device in time so as to ensure that important data can be normally stored and the BMC can read effective information.
In order to solve the technical problems, the invention provides the following technical scheme:
a storage medium detection method is applied to BMC and comprises the following steps:
writing the detection value into a target register in the storage medium;
reading a register value corresponding to the current moment of the target register;
judging whether the register value is the same as the detection value;
if so, determining that the storage medium passes the detection;
if not, determining that the storage medium detection fails, and outputting alarm information.
Preferably, determining that the storage medium detection failed comprises:
determining that one-time read-write abnormity occurs in the storage medium, wherein the retry times is + 1;
when the retry number is 0, ending the detection;
when the retry number is not 0, judging whether the retry number is greater than a preset threshold value;
if so, determining that the storage medium detection fails;
if not, repeatedly executing the step of writing the detection value into the target register in the storage medium;
correspondingly, when the storage medium is determined to pass the detection, the retry times are cleared.
Preferably, the writing the detection value to the target register in the storage medium includes:
determining a target register from a plurality of designated registers in the storage medium;
writing the detection value to the target register.
Preferably, the outputting the alarm information includes:
and outputting alarm prompt information by using the alarm device corresponding to the BMC, and/or sending alarm notification information to a user terminal.
Preferably, the writing the detection value to the target register in the storage medium includes:
writing the detection values to a plurality of the target registers in the storage medium;
accordingly, determining that the storage medium failed detection comprises:
and determining that the storage medium detection fails after determining that the register values read from the plurality of target registers are different from the detection values.
Preferably, the establishing, by the BMC, a communication connection with the storage medium through I2C, and reading a register value corresponding to the target register at the current time includes:
the register value is read by the I2C.
Preferably, writing the detection value to the target register in the storage medium comprises:
and updating the detection value periodically, and writing the detection value into the target register.
A storage medium detection device is applied to BMC and comprises:
the detection value writing module is used for writing the detection value into a target register in the storage medium;
the register value reading module is used for reading a register value corresponding to the current moment of the target register;
the detection judging module is used for judging whether the register value is the same as the detection value or not;
the detection pass determining module is used for determining that the storage medium passes the detection if the register value is the same as the detection value;
and the detection failure determining module is used for determining that the storage medium fails to detect and outputting alarm information if the register value is different from the detection value.
A storage medium detection apparatus comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the storage medium detection method when executing the computer program.
A readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the storage medium detection method described above.
The method provided by the embodiment of the invention is applied to BMC, and the detection value is written into the target register in the storage medium; reading a register value corresponding to the current moment of a target register; judging whether the register value is the same as the detection value; if so, determining that the storage medium passes the detection; if not, determining that the storage medium detection fails and outputting alarm information.
Considering a storage medium as a storage medium, reading and writing are key operations that enable stored data. Therefore, whether the storage medium is abnormal or not can be detected, and both reading and writing operations can be started. Based on this, in the method, the BMC writes the detection value into the target register in the storage medium and then reads the register value in the target register. When the read register value is consistent with the written detection value, the read-write function of the storage medium is normal, if the read register value is inconsistent with the written detection value, at least one function of the read function and the write function of the storage medium can be determined to have a problem, at this moment, the storage medium can be judged to be abnormal, namely, the storage medium is failed to be detected, and at this moment, alarm information can be output. When the storage medium is specifically an EEPROM, a user can know that the storage medium is abnormal, and then the storage medium or the mainboard is replaced, so that the BMC can perform data interaction with the EEPROM normally, and the EEPROM can store important data.
Accordingly, embodiments of the present invention further provide a storage medium detection apparatus, a device, and a readable storage medium corresponding to the storage medium detection method, which have the above technical effects, and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of an embodiment of a storage medium detection method according to the present invention;
FIG. 2 is a diagram illustrating an application of a storage medium detection method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a storage medium detection apparatus according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a storage medium detection apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a storage medium detection apparatus according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
referring to fig. 1, fig. 1 is a flowchart of a storage medium detection method applied to a BMC according to an embodiment of the present invention, where the method includes the following steps:
s101, writing the detection value into a target register in the storage medium.
The storage medium may be any one of common storage media with read and write functions, such as an EEPROM.
The target register may be a register in the storage medium, to which an inherent function is not specified.
The BMC is in communication connection with the storage medium through I2C. The I2C (Inter-Integrated Circuit) bus is a two-wire serial bus, and can be used to connect the microcontroller and its peripheral devices.
The BMC may write the detection value to the target register in the storage medium, specifically via I2C. Specifically, the BMC may send I2C a request to access the storage medium to write a detection value in the target register.
The detection value may be predefined (for example, the detection value may be defined as AAh or 55h), or may be determined at any time (for example, a random function is used to randomly generate a latest detection value of the number of bytes of length that can be stored in a target register). It should be noted that, while the detection value is written into the target register, the detection value needs to be recorded so as to verify whether the read/write function of the storage medium is abnormal or not.
Preferably, it is considered that in practical applications, the storage medium may be periodically tested to find the abnormality in time. If the same detection value is used for a long time, there is a possibility that the failure of the storage medium cannot be detected when the target register cannot be written and the read function is normal. Therefore, in practical applications, it is also possible to periodically update the detection value and write the detection value to the target register. Therefore, the condition of abnormity of the target register caused by the fact that the target register cannot be written can be found at the first time. The period for updating the detection value may be the same as or different from the period for detecting the storage medium, and specifically, the detection value may be changed every time the detection is performed, or may be changed after the detection is performed for a plurality of times.
And S102, reading a register value corresponding to the current moment of the target register.
After writing the detection value to the target register, the register value in the target register may be read.
Specifically, the BMC establishes a communication connection with the storage medium through I2C, that is, the register value can be read through I2C. For example, the BMC sends I2C to request access to the storage medium, and reads the register value corresponding to the current time of the target register.
S103, judging whether the register value is the same as the detection value.
After reading the register value, judging whether the register value is the same as the detection value, if so, indicating that the read-write function of the storage medium is normal; if the difference is not the same, the reading function and the writing function of the storage medium have at least one functional abnormity. That is, when the write function of the storage medium is abnormal, a write failure or a write value error may occur when a detection value is written into the register, and even when the read function is normal, the register value read is different from the detection value; when the reading function of the storage medium is abnormal, a detection value is normally written into the target register, and when the reading function is abnormal, reading failure may occur, and the read value is different from the real value in the target register, so that the read register value is different from the detection value; when both the read function and the write function of the storage medium are abnormal, it is almost impossible for the detected value and the read register value to be the same, and therefore, when both the read function and the write function are abnormal, the detected value and the register value may be regarded as being impossible to be the same.
After determining the judgment result whether the register value is the same as the detection value, the storage medium detection result can be obtained according to different judgment results. Specifically, if the determination result is yes, step S104 is executed; if the determination result is no, step S105 is executed.
And S104, determining that the storage medium passes the detection.
When the detection value is consistent with the register value, the reading function and the writing function of the storage medium can be determined to be normal, and at the moment, the storage medium can be directly determined to be normal, namely the storage medium passes the detection at this time. When the storage medium is determined to be normal, the storage medium can be continuously used for storing the key data, and the BMC can also continuously read the valid information from the storage medium.
And S105, determining that the storage medium fails to be detected, and outputting alarm information.
When the detection value is inconsistent with the register value, it can be determined that at least one of the read function and the write function of the storage medium is abnormal, at this time, the storage medium is no longer suitable for continuously storing important data, and the BMC continuously accessing the storage medium may cause serious abnormality of the BMC. At the moment, the detection and identification of the storage medium can be determined, in order to ensure that important data can be effectively stored, the BMC can perform data interaction with a normal storage medium and can output alarm information, so that a user can timely know that the currently used storage medium is abnormal. When a user acquires alarm information, the important data can be normally stored by replacing a storage medium or a mainboard, the normal work of the BMC is guaranteed, and the system performance is maintained to be stable.
Wherein, outputting the alarm information may specifically include, in practical application: and outputting alarm prompt information by using the corresponding warning device of the BMC, and/or sending alarm notification information to the user terminal. Wherein, the warning device can be embodied as an optical alarm such as an LED alarm lamp, an acoustic alarm such as a buzzer, and an audible and visual alarm. The user terminal may be specifically a smart phone, a computer, or a device or software (e.g., a mailbox client) capable of remotely receiving the alarm feature.
Preferably, considering that in practical applications, there may be a case where read-write abnormality occurs in only one register in the storage medium, therefore, it may be determined that misdetermination may occur based on only the read-write performance of the same register. To solve this problem, in practical applications, at least one of the following two processing methods can be adopted:
mode 1: a plurality of registers may be specified in the storage medium as target registers, and when detecting the storage medium, step S101 may specifically be: writing the detection values to a plurality of target registers in the storage medium;
accordingly, the determining of the storage medium detection failure in step S105 includes:
and determining that the storage medium detection fails after determining that the register values read from the plurality of target registers are different from the detection values.
That is, when checking whether the storage medium is abnormal, it is possible to determine whether the storage medium is abnormal by writing the detection values into a plurality of target registers in the storage medium and reading the register values in the target registers. Specifically, when the register values read by all the target registers are inconsistent with the detection values, it is determined that the storage medium is abnormal. Of course, whether the storage medium is abnormal or not can be determined in a manner of setting whether the proportion or the number of the target registers with the abnormal condition exceeds the corresponding threshold value or not.
Mode 2: a plurality of target registers can be arranged, but one target register is replaced when each detection is carried out, so that larger errors of detection results caused by the contingency of a single target register can be reduced. Specifically, step S101 may specifically include:
step one, determining a target register from a plurality of designated registers in a storage medium;
and step two, writing the detection value into the target register.
For convenience of description, the above two steps will be described in combination.
The designated register may be predetermined, and the target register determined from the plurality of designated registers may be determined randomly or in a designated rotation order. After a target register is identified from the plurality of designated registers, the detection value may be written to the target register.
The method provided by the embodiment of the invention is applied to BMC, and the detection value is written into the target register in the storage medium; reading a register value corresponding to the current moment of a target register; judging whether the register value is the same as the detection value; if so, determining that the storage medium passes the detection; if not, determining that the storage medium detection fails and outputting alarm information.
Considering a storage medium as a storage medium, reading and writing are key operations that enable stored data. Therefore, whether the storage medium is abnormal or not can be detected, and both reading and writing operations can be started. Based on this, in the method, the BMC writes the detection value into the target register in the storage medium and then reads the register value in the target register. When the read register value is consistent with the written detection value, the read-write function of the storage medium is normal, if the read register value is inconsistent with the written detection value, at least one function of the read function and the write function of the storage medium can be determined to have a problem, at this moment, the storage medium can be judged to be abnormal, namely, the storage medium is failed to be detected, and at this moment, alarm information can be output. When the storage medium is specifically an EEPROM, a user can know that the EEPROM is abnormal, and then the EEPROM or a mainboard is replaced, so that the normal data interaction between the BMC and the EEPROM can be ensured, and the EEPROM can store important data.
It should be noted that, based on the above embodiments, the embodiments of the present invention also provide corresponding improvements. In the preferred/improved embodiment, the same steps as those in the above embodiment or corresponding steps may be referred to each other, and corresponding advantageous effects may also be referred to each other, which are not described in detail in the preferred/improved embodiment herein.
Preferably, in order to avoid transient failure of the storage medium or single read-write failure due to instability of the I2C link, a method of retrying for multiple times can be adopted to avoid false alarm caused by single point failure, thereby avoiding causing trouble to clients. The specific implementation process comprises the following steps:
in the step S105, the following steps may be specifically performed:
step one, determining that a storage medium has one-time read-write abnormity, wherein the retry number is + 1;
step two, when the retry number is 0, finishing the detection;
step three, when the retry number is not 0, judging whether the retry number is larger than a preset threshold value;
step four, if yes, determining that the storage medium detection fails;
step five, if not, repeatedly executing the step of writing the detection value into the target register in the storage medium;
accordingly, when the storage medium is determined to pass the detection, the retry times are cleared.
For convenience of description, the above steps will be described in combination.
In the present embodiment, a counter is provided for counting the number of consecutive detection failures, i.e., the number of retries, and the initial value of the number of retries may be set to 0.
After determining that the storage medium has one read-write abnormality, adding 1 to the retry number; when the detection is passed, resetting the retry times, after a result is obtained by one detection, judging whether the retry times is greater than a preset threshold value, if so, indicating that the times of the storage medium detection abnormity reach the condition of judging the storage medium abnormity, and at the moment, directly determining that the storage medium detection fails; if not, repeating the operation of step S101; if the retry number is 0, the detection can be ended and the detection is determined to pass.
It should be noted that, in practical applications, the first embodiment and the preferred embodiment may be fused according to practical application requirements, and in order to facilitate those skilled in the art to understand how to implement practical applications and how to combine the preferred embodiments, the following describes the storage medium detection method in detail with reference to a specific application scenario as an example.
And writing AAh or 55h into the EEPROM target register by the BMC, reading the register, comparing whether the read value is the write value, if so, passing the detection, and continuously writing 55h or AAh at an interval of 1 hour. If the single detection fails, 10 retries can be performed, if 10 fails, an alarm is given, please refer to fig. 2 for a specific implementation flow, fig. 2 is a specific application schematic diagram of an EEPROM detection method in an embodiment of the present invention, and the implementation process includes:
step 1, initializing a detection value to AAh when the BMC starts to detect the EEPROM;
step 2, judging whether the detection value is AAh;
step 3, if yes, setting the detection value to be 55 h;
step 4, if not, setting the detection value as AAh;
step 5, sending an I2C request to access the EEPROM, and writing a detection value into a target register;
step 6, sending an I2C request to access the EEPROM, and reading a register value in a target register;
step 7, judging whether the register value is equal to the detection value;
and 8, if so, clearing the retry times, terminating the detection of the current round and determining that the detection of the current round passes.
Step 9, if not, the detection fails, and the retry number is + 1;
step 10, judging whether the retry number is more than 10;
and 11, if so, terminating the detection of the current round, determining that the detection of the current round fails, and recording a detection log.
Wherein, each round of detection can comprise one detection or a plurality of detections, and the condition for terminating each round of detection can be specifically as follows: within 10 repeated detections, the last detection is detection pass, and all the 10 repeated detections fail.
From the above steps, by applying the EEPROM detection method provided by the embodiment of the present invention, whether the EEPROM can be read or written normally by the BMC can be determined by actively erasing and reading the self-check register every 1 hour, which has the advantage that the whole detection process has no influence on the normal operation of the BMC, and can also verify whether the communication between the BMC and the EEPROM is normal most directly.
In order to avoid instant failure of EEPROM or single read-write failure caused by instability of I2C link, the invention adopts a method of retrying for a plurality of times to avoid false alarm caused by single point failure, thereby avoiding causing trouble to clients.
The method provides a realization method for automatically detecting whether the EEPROM is normally available by the BMC. The invention monitors the health state of the EEPROM in real time by actively reading and writing the EEPROM without influencing the normal work of the BMC, informs the abnormal condition of the EEPROM to a user in time, avoids false alarm caused by single-point fault by retry, and avoids loss of important data of the BMC or abnormal operation.
Example two:
corresponding to the above method embodiment, an embodiment of the present invention further provides a storage medium detection apparatus, which can be applied to the BMC, and the storage medium detection apparatus described below and the storage medium detection method described above can be referred to correspondingly.
Referring to fig. 3, the apparatus includes the following modules:
a detection value writing module 101, configured to write a detection value into a target register in a storage medium;
the register value reading module 102 is configured to read a register value corresponding to a current time of a target register;
the detection judging module 103 is used for judging whether the register value is the same as the detection value;
a detection pass determining module 104, configured to determine that the storage medium passes the detection this time if the register value is the same as the detection value;
and the detection failure determining module 105 is used for determining that the storage medium is failed to detect if the register value is different from the detection value, and outputting alarm information.
The device provided by the embodiment of the invention is applied to BMC to write the detection value into the target register in the storage medium; reading a register value corresponding to the current moment of a target register; judging whether the register value is the same as the detection value; if so, determining that the storage medium passes the detection; if not, determining that the storage medium detection fails and outputting alarm information.
Considering a storage medium as a storage medium, reading and writing are key operations that enable stored data. Therefore, whether the storage medium is abnormal or not can be detected, and both reading and writing operations can be started. In this way, in the present apparatus, the BMC writes the detection value into the target register in the storage medium, and then reads the register value in the target register. When the read register value is consistent with the written detection value, the read-write function of the storage medium is normal, if the read register value is inconsistent with the written detection value, at least one function of the read function and the write function of the storage medium can be determined to have a problem, at this moment, the storage medium can be judged to be abnormal, namely, the storage medium is failed to be detected, and at this moment, alarm information can be output. When the storage medium is specifically an EEPROM, a user can know that the EEPROM is abnormal, and then the EEPROM or a mainboard is replaced, so that the normal data interaction between the BMC and the EEPROM can be ensured, and the EEPROM can store important data.
In a specific embodiment of the present invention, the detection failure determining module 105 is specifically configured to determine that a storage medium has a read-write abnormality for one time, and the retry number is + 1; when the retry number is 0, finishing the detection; when the retry number is not 0, judging whether the retry number is greater than a preset threshold value;
if so, determining that the storage medium detection fails; if not, triggering a detection value writing module 101, and repeatedly executing the step of writing the detection value into the target register in the storage medium;
accordingly, the detection pass determining module 104 is specifically configured to zero the retry number when it is determined that the storage medium passes the detection this time.
In an embodiment of the present invention, the detection value writing module 101 is specifically configured to determine a target register from a plurality of designated registers in the storage medium; the detection value is written to the target register.
In an embodiment of the present invention, the detection failure determining module 105 is specifically configured to output an alarm prompt message by using an alarm device corresponding to the BMC, and/or send an alarm notification message to the user terminal.
In an embodiment of the present invention, the detection value writing module 101 is specifically configured to write a detection value to a plurality of target registers in a storage medium;
accordingly, the detection failure determination module 105 is specifically configured to determine that the storage medium has failed to detect after determining that the register values read from the plurality of target registers are different from the detection values.
In an embodiment of the present invention, the BMC establishes a communication connection with the storage medium through I2C, and the register value reading module 102 is specifically configured to read the register value through I2C.
In an embodiment of the present invention, the detection value writing module 101 is specifically configured to periodically update the detection value and write the detection value into the target register.
Example four:
corresponding to the above method embodiment, an embodiment of the present invention further provides a storage medium detection apparatus, and a storage medium detection apparatus described below and a storage medium detection method described above may be referred to in correspondence with each other.
Referring to fig. 4, the storage medium sensing apparatus includes:
a memory D1 for storing computer programs;
and a processor D2, configured to implement the steps of the storage medium detection method of the above-described method embodiment when executing the computer program.
Specifically, referring to fig. 5, a specific structural diagram of a storage medium detection device provided in this embodiment is shown, where the storage medium detection device may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 322 (e.g., one or more processors) and a memory 332, and one or more storage media 330 (e.g., one or more mass storage devices) storing an application 342 or data 344. Memory 332 and storage media 330 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instructions operating on a data processing 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 storage medium detection device 301.
The storage medium detection apparatus 301 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. Such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The steps in the storage medium detecting method described above may be implemented by the structure of the storage medium detecting apparatus.
Example five:
corresponding to the above method embodiment, the embodiment of the present invention further provides a readable storage medium, and a readable storage medium described below and a storage medium detection method described above may be referred to in correspondence with each other.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the storage medium detection method of the above-mentioned method embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (10)

1. A storage medium detection method is applied to BMC and comprises the following steps:
writing the detection value into a target register in the storage medium;
reading a register value corresponding to the current moment of the target register;
judging whether the register value is the same as the detection value;
if so, determining that the storage medium passes the detection;
if not, determining that the storage medium detection fails, and outputting alarm information.
2. The storage medium detection method of claim 1, wherein determining that the storage medium detection failed comprises:
determining that one-time read-write abnormity occurs in the storage medium, wherein the retry times is + 1;
when the retry number is 0, ending the detection;
when the retry number is not 0, judging whether the retry number is greater than a preset threshold value;
if so, determining that the storage medium detection fails;
if not, repeatedly executing the step of writing the detection value into the target register in the storage medium;
correspondingly, when the storage medium is determined to pass the detection, the retry times are cleared.
3. The storage medium detection method of claim 1, wherein writing the detection value to the target register in the storage medium comprises:
determining a target register from a plurality of designated registers in the storage medium;
writing the detection value to the target register.
4. The storage medium detection method of claim 1, wherein the outputting the warning information comprises:
and outputting alarm prompt information by using the alarm device corresponding to the BMC, and/or sending alarm notification information to a user terminal.
5. The storage medium detection method of claim 1, wherein writing the detection value to the target register in the storage medium comprises:
writing the detection values to a plurality of the target registers in the storage medium;
accordingly, determining that the storage medium failed detection comprises:
and determining that the storage medium detection fails after determining that the register values read from the plurality of target registers are different from the detection values.
6. The storage medium detection method according to claim 1, wherein the BMC establishes a communication connection with the storage medium through I2C, and reads the register value corresponding to the current time of the target register, including:
the register value is read by the I2C.
7. The storage medium detection method of any one of claims 1 to 6, wherein writing the detection value to the target register in the storage medium comprises:
and updating the detection value periodically, and writing the detection value into the target register.
8. A storage medium detection device is applied to BMC and comprises:
the detection value writing module is used for writing the detection value into a target register in the storage medium;
the register value reading module is used for reading a register value corresponding to the current moment of the target register;
the detection judging module is used for judging whether the register value is the same as the detection value or not;
the detection pass determining module is used for determining that the storage medium passes the detection if the register value is the same as the detection value;
and the detection failure determining module is used for determining that the storage medium fails to detect and outputting alarm information if the register value is different from the detection value.
9. A storage medium detection apparatus, comprising:
a memory for storing a computer program;
a processor for implementing the steps of the storage medium detection method of any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the storage medium detection method according to any one of claims 1 to 7.
CN201911332540.9A 2019-12-22 2019-12-22 Storage medium detection method, device, equipment and readable storage medium Pending CN111048139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911332540.9A CN111048139A (en) 2019-12-22 2019-12-22 Storage medium detection method, device, equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911332540.9A CN111048139A (en) 2019-12-22 2019-12-22 Storage medium detection method, device, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN111048139A true CN111048139A (en) 2020-04-21

Family

ID=70237461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911332540.9A Pending CN111048139A (en) 2019-12-22 2019-12-22 Storage medium detection method, device, equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111048139A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679945A (en) * 2020-06-12 2020-09-18 地平线(上海)人工智能技术有限公司 Processor detection method and device and computer readable storage medium
CN112286750A (en) * 2020-10-29 2021-01-29 山东云海国创云计算装备产业创新中心有限公司 GPIO (general purpose input/output) verification method and device, electronic equipment and medium
CN112328305A (en) * 2020-10-30 2021-02-05 歌尔光学科技有限公司 Eye pattern testing method and device, electronic equipment and readable storage medium
CN113253941A (en) * 2021-06-22 2021-08-13 苏州浪潮智能科技有限公司 Register reading method, device, equipment and medium
CN115220972A (en) * 2022-06-07 2022-10-21 中科驭数(北京)科技有限公司 Equipment fault detection method, device, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150177998A1 (en) * 2013-12-19 2015-06-25 Hon Hai Precision Industry Co., Ltd. Electronic device and method for testing redundant array of independent disks level
CN107193680A (en) * 2017-05-18 2017-09-22 郑州云海信息技术有限公司 A kind of heartbeat detecting method, equipment and system
CN108777639A (en) * 2018-05-30 2018-11-09 郑州云海信息技术有限公司 A kind of design method for realizing i2c bus datas monitoring and protection
CN109783262A (en) * 2018-12-24 2019-05-21 新华三技术有限公司 Fault data processing method, device, server and computer readable storage medium
CN110427303A (en) * 2019-07-30 2019-11-08 新华三技术有限公司成都分公司 A kind of fault alarming method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150177998A1 (en) * 2013-12-19 2015-06-25 Hon Hai Precision Industry Co., Ltd. Electronic device and method for testing redundant array of independent disks level
CN107193680A (en) * 2017-05-18 2017-09-22 郑州云海信息技术有限公司 A kind of heartbeat detecting method, equipment and system
CN108777639A (en) * 2018-05-30 2018-11-09 郑州云海信息技术有限公司 A kind of design method for realizing i2c bus datas monitoring and protection
CN109783262A (en) * 2018-12-24 2019-05-21 新华三技术有限公司 Fault data processing method, device, server and computer readable storage medium
CN110427303A (en) * 2019-07-30 2019-11-08 新华三技术有限公司成都分公司 A kind of fault alarming method and device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111679945A (en) * 2020-06-12 2020-09-18 地平线(上海)人工智能技术有限公司 Processor detection method and device and computer readable storage medium
CN112286750A (en) * 2020-10-29 2021-01-29 山东云海国创云计算装备产业创新中心有限公司 GPIO (general purpose input/output) verification method and device, electronic equipment and medium
CN112328305A (en) * 2020-10-30 2021-02-05 歌尔光学科技有限公司 Eye pattern testing method and device, electronic equipment and readable storage medium
CN113253941A (en) * 2021-06-22 2021-08-13 苏州浪潮智能科技有限公司 Register reading method, device, equipment and medium
US11860718B2 (en) 2021-06-22 2024-01-02 Inspur Suzhou Intelligent Technology Co., Ltd. Register reading method and apparatus, device, and medium
CN115220972A (en) * 2022-06-07 2022-10-21 中科驭数(北京)科技有限公司 Equipment fault detection method, device, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN111048139A (en) Storage medium detection method, device, equipment and readable storage medium
CN109783262B (en) Fault data processing method, device, server and computer readable storage medium
CN109328340B (en) Memory fault detection method and device and server
CN110377469B (en) Detection system and method for PCIE (peripheral component interface express) equipment
CN110427303A (en) A kind of fault alarming method and device
JPH1055320A (en) On-line memory monitoring system and device
CN108073486B (en) Hard disk fault prediction method and device
CN112732477B (en) Method for fault isolation by out-of-band self-checking
US10866872B1 (en) Auto-recovery for software systems
CN112002370B (en) Method and device for identifying disk abnormity and distributed storage system
CN111414268A (en) Fault processing method and device and server
JP2017091077A (en) Pseudo-fault generation program, generation method, and generator
CN112231140A (en) Method, system, terminal and storage medium for fault recovery of BMC (baseboard management controller) of storage device
US10915388B2 (en) Data storage device and associated operating method capable of detecting errors and effectively protecting data
CN113672415A (en) Disk fault processing method, device, equipment and storage medium
CN108899059B (en) Detection method and equipment for solid state disk
CN114461436A (en) Memory fault processing method and device and computer readable storage medium
CN110865906B (en) Motor initial position angle storage method and device, vehicle and storage medium
CN111124785B (en) Method, device, equipment and storage medium for hard disk fault detection
CN113625957B (en) Method, device and equipment for detecting hard disk faults
CN116719657A (en) Firmware fault log generation method, device, server and readable medium
CN115509786A (en) Method, device, equipment and medium for reporting fault
US11726853B2 (en) Electronic control device
CN114020670A (en) PCIE card management method, system, equipment and storage medium
CN113917385A (en) Self-detection method and system for electric energy meter

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200421