CN115454780A - Memory health degree resetting method, device and equipment - Google Patents

Memory health degree resetting method, device and equipment Download PDF

Info

Publication number
CN115454780A
CN115454780A CN202211202604.5A CN202211202604A CN115454780A CN 115454780 A CN115454780 A CN 115454780A CN 202211202604 A CN202211202604 A CN 202211202604A CN 115454780 A CN115454780 A CN 115454780A
Authority
CN
China
Prior art keywords
command
memory
health degree
electronic device
resetting
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
CN202211202604.5A
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.)
Henan Kunlun Technology Co ltd
Original Assignee
XFusion Digital Technologies 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 XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202211202604.5A priority Critical patent/CN115454780A/en
Publication of CN115454780A publication Critical patent/CN115454780A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • G06F11/3072Monitoring arrangements determined by the means or processing involved in reporting the monitored data where the reporting involves data filtering, e.g. pattern matching, time or event triggered, adaptive or policy-based reporting

Landscapes

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

Abstract

The application provides a memory health degree resetting method, a device and equipment, wherein the method comprises the following steps: the method comprises the steps that an electronic device obtains a first command, wherein the first command is used for resetting the memory health degree of a memory in the electronic device; the first command indicates a callback function needing to be called; and responding to the first command, and calling the callback function by the electronic equipment to reset the memory health degree. By the method, the memory health degree can be reset to the default value on the basis that the electronic equipment is not powered off or the operating system is not restarted, and the running stability of the electronic equipment is improved.

Description

Memory health degree resetting method, device and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, and a device for resetting memory health.
Background
The memory health may be used to evaluate the severity of the memory failure. For example, the lower the memory health, the more severe the memory failure.
In the related art, the electronic device may calculate the memory health degree through an Artificial Intelligence (AI) algorithm, so that a technician may evaluate the fault severity of the memory according to the health degree. For example, the electronic device may be a server, a computer, or the like. After the first evaluation is finished, if the memory health degree is to be calculated again, the electronic device needs to be powered off first, or the operating system needs to be restarted, so that the memory health degree is reset to a default value. However, powering down the electronic device or restarting the operating system may affect the service running on the electronic device.
Therefore, how to reset the memory health degree to a default value on the basis that the electronic equipment is not powered off or the operating system is not restarted has important practical value for ensuring the stable operation of the electronic equipment.
Disclosure of Invention
The application provides a memory health degree resetting method, a memory health degree resetting device and equipment.
In a first aspect, the present application provides a memory health degree resetting method, including:
the method comprises the steps that an electronic device obtains a first command, wherein the first command is used for resetting the memory health degree of a memory in the electronic device; the first command indicates a callback function needing to be called;
and responding to the first command, and calling the callback function by the electronic equipment to reset the memory health degree.
In the above technical solution, the electronic device may obtain the first command, and reset the memory health of the memory in the electronic device according to the first command. By resetting the memory health degree of the memory in the electronic equipment through the method, the restarting of an operating system of the electronic equipment can be avoided, or the electronic equipment is powered off, the service running on the electronic equipment cannot be stopped or interrupted, and the running stability of the electronic equipment is improved.
In a possible implementation manner, the first command includes first device information; the electronic device calls the callback function to reset the memory health degree, and the method comprises the following steps:
verifying the first equipment information to obtain a verification result;
and when the verification result is that the verification is passed, the electronic equipment calls the callback function to reset the memory health degree.
In the above technical solution, after the first device information is verified, the electronic device may reset the memory health degree. The wrong indication to the electronic equipment caused by the wrong first equipment information is avoided.
In one possible implementation, the invoking, by the electronic device, the callback function to reset the memory health degree includes:
determining a first functional module corresponding to the first command;
starting the first functional module;
and resetting the memory health degree of the memory in the electronic equipment through the first functional module.
In the above technical scheme, the electronic device can reset the memory health degree of the memory in the electronic device through the first function module, thereby avoiding restarting an operating system of the electronic device or powering off the electronic device, and ensuring that the running stability of the electronic device is good.
In one possible implementation manner, the resetting, by the first functional module, a memory health degree of a memory in the electronic device includes:
calling a callback function corresponding to the first command through the first functional module;
and setting the memory health degree in the memory configuration file in the electronic equipment as a preset health degree through the callback function.
In the above technical solution, the first functional module may set the memory health degree in the memory configuration file in the electronic device to the preset health degree through a callback function, thereby achieving a purpose of resetting the memory health degree of the memory in the electronic device.
In a possible implementation manner, the verifying the first device information to obtain a verification result includes:
acquiring second equipment information of the electronic equipment;
if the first device information is the same as the second device information, determining that the verification result is verification passing;
and if the first equipment information is different from the second equipment information, determining that the verification result is verification failure.
In the technical scheme, the first device information of the first command can be verified according to the second device information of the electronic device, so that the correctness of the first device information is ensured, and the electronic device can communicate with the client.
In a possible implementation manner, the first device information includes at least one of: an internet protocol IP address, a username, and a password.
In the above technical solution, the electronic device can verify the IP address, the user name, and the password in the first device information, thereby achieving the purpose of verifying the first device information.
In a possible implementation manner, the first command is an intelligent platform management interface IPMI command; or, the first command is a redfish command.
In the above technical solution, the electronic device may reset the memory health degree of the memory in the electronic device through an IPMI command or a redfish command, thereby avoiding restarting an operating system of the electronic device or powering down the electronic device.
In a possible implementation manner, the obtaining the first command includes:
and acquiring the first command from a client, wherein the first command is sent by the client after responding to a preset operation input by a user on a preset page.
In the above technical solution, the electronic device may obtain the first command sent by the user through the client. The electronic equipment can reset the memory health degree of the memory in the electronic equipment according to the first command.
In a second aspect, the present application provides a memory health resetting apparatus, including an obtaining module and a resetting module,
the acquisition module is used for acquiring a first command, and the first command is used for resetting the memory health degree of a memory in the electronic equipment; the first command indicates a callback function needing to be called;
and responding to the first command, wherein the resetting module is used for calling the callback function to reset the memory health degree.
In the above technical solution, the memory health degree resetting device may obtain the first command, and reset the memory health degree of the memory in the electronic device according to the first command. By resetting the memory health degree of the memory in the electronic equipment through the method, the restarting of an operating system of the electronic equipment can be avoided, or the electronic equipment is powered off, the service running on the electronic equipment cannot be stopped or interrupted, and the running stability of the electronic equipment is improved.
In a possible embodiment, the first command includes first device information; the reset module is specifically configured to verify the first device information to obtain a verification result;
and when the verification result is that the verification is passed, calling the callback function to reset the memory health degree.
In the above technical solution, after the first device information is verified, the memory health degree may be reset. The error indication of the memory health degree resetting device is avoided when the first equipment information is wrong.
In one possible embodiment, the reset module is specifically configured to,
determining a first functional module corresponding to the first command;
starting the first functional module;
and resetting the memory health degree of the memory in the electronic equipment through the first functional module.
In the technical scheme, the memory health degree of the memory in the electronic equipment can be reset through the first functional module, the operating system of the electronic equipment is prevented from being restarted, or the electronic equipment is powered off, so that the running stability of the electronic equipment is good.
In one possible implementation, the reset module is specifically configured to,
calling a callback function corresponding to the memory health degree reset command through the first function module;
and setting the memory health degree in the memory configuration file in the electronic equipment as a preset health degree through the callback function.
In the above technical scheme, the first functional module may set the memory health degree in the memory configuration file in the electronic device to the preset health degree through the callback function, thereby achieving the purpose of resetting the memory health degree of the memory in the electronic device.
In one possible embodiment, the reset module is specifically configured to,
acquiring second equipment information of the electronic equipment;
if the first device information is the same as the second device information, determining that the verification result is verification passing;
and if the first equipment information is different from the second equipment information, determining that the verification result is verification failure.
In the technical scheme, the first device information of the first command can be verified according to the second device information of the electronic device, so that the correctness of the first device information is ensured, and the memory health degree resetting device can be communicated with the client.
In one possible implementation, the first device information includes at least one of: an internet protocol IP address, a username, and a password.
In the technical scheme, the IP address, the user name and the password in the first equipment information can be verified, and the purpose of verifying the first equipment information is achieved.
In one possible implementation, the first command is an Intelligent Platform Management Interface (IPMI) command; or, the first command is a redfish command.
In the above technical solution, the management device may reset the memory health degree of the memory in the electronic device through an IPMI command or a redfish command, thereby avoiding restarting an operating system of the electronic device or powering off the electronic device.
In one possible implementation, the obtaining module is specifically configured to,
and acquiring the first command from a client, wherein the first command is sent by the client after responding to a preset operation input by a user on a preset page.
In the technical scheme, the first command sent by the user can be obtained through the client. The memory health degree resetting device can reset the memory health degree of the memory in the electronic equipment according to the first command.
In a third aspect, the present application provides a memory health resetting device, including a processor, and a memory communicatively connected to the processor;
the memory stores a computer program;
the processor executes the computer program to implement the method of any one of the first aspects.
In the above technical solution, the electronic device may obtain the first command, determine the first function module according to the first command, and call the callback function through the first function module. The electronic equipment can reset the memory health degree through the callback function and send a response message to the client. By resetting the memory health degree through the method, the operation system of the electronic equipment can be prevented from being restarted, or the electronic equipment is powered off, the service running on the electronic equipment cannot be influenced, and the running stability of the electronic equipment is improved.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a computer, implements the method of any of the first aspects.
In the above technical solution, the electronic device may obtain the first command, determine the first function module according to the first command, and call the callback function through the first function module. The electronic equipment can reset the memory health degree through the callback function and send a response message to the client. By resetting the memory health degree through the method, the operation system of the electronic equipment can be prevented from being restarted, or the electronic equipment is powered off, the service running on the electronic equipment cannot be influenced, and the running stability of the electronic equipment 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 used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the description below are only some embodiments of the present application, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic diagram illustrating a system architecture for resetting memory health according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart illustrating a memory health resetting method according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a preset page provided in an embodiment of the present application;
FIG. 4 is a diagram illustrating a first command according to an embodiment of the present application;
FIG. 5 is a diagram illustrating type information of a first command according to an embodiment of the present disclosure;
fig. 6 is a schematic flowchart illustrating another memory health resetting method according to an embodiment of the present disclosure;
fig. 7A is a schematic diagram illustrating memory health calculation according to an embodiment of the present application;
fig. 7B is a schematic diagram illustrating resetting of memory health according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a memory health degree resetting device according to an embodiment of the present disclosure;
fig. 9 is a schematic diagram of a hardware structure of the memory health degree resetting device provided in the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
It should be noted that, in this document, 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 only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
For convenience of understanding, the memory health reset system architecture according to the embodiment of the present application will be described with reference to fig. 1.
Fig. 1 is a schematic diagram of a memory health degree resetting system according to an embodiment of the present disclosure. Referring to fig. 1, a client 101 and an electronic device 102 are included. The electronic device 102 includes a memory 1021, a management module 1022, and a file system 1023.
The client 101 has a network communication function. The client 101 and the electronic device 102 may communicate in a wired communication manner or a wireless communication manner. For example, the client 101 and the electronic device 102 may communicate through a mobile internet or a fixed broadband network (e.g., a local area network, a metropolitan area network, etc.). The client 101 includes, but is not limited to, a smart phone, smart watch, tablet, laptop, smart car device, desktop computer, laptop portable computer, or virtual reality/augmented reality/mixed reality device, etc. It should be understood that the number of the clients 101 may be one or more, and the application is not limited thereto.
The electronic device 102 may be an independent physical server, may also be a server cluster formed by a plurality of physical servers, and may also be a cloud server that provides basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content Delivery Network (CDN), and a big data and artificial intelligence platform.
Memory 1021, also known as internal memory or main storage, is mounted in a memory slot on the motherboard of electronic device 102. The memory can be used for storing the operation data of the processor. For example, the Memory may be Dual-Inline Memory-Modules (DIMMs), dynamic Random Access Memory (DRAM), random Access Memory (RAM), or Read Only Memory (ROM). It should be understood that the number of the memory 1021 in the electronic device 102 may be one or more, and is not limited in this application.
The management module 1022 may be a management module of a non-business module in the electronic device 102. For example, the Management module 1022 may be a motherboard Management control unit (BMC) outside the electronic device 102, a monitoring Management device outside the electronic device 102, a Management system in a Management chip outside the processor, or a System Management Module (SMM) of the electronic device 102, and the like. The management module 1022 may calculate the memory health of each memory in the memory module 1021. For example, the management module 1022 may calculate the memory health of each memory in the memory module 1021 through an Artificial Intelligence (AI) algorithm. It should be noted that, in the embodiment of the present application, a specific form of the management module 1022 is not limited, and the foregoing is only an exemplary description. In the following embodiments, the Management module 1022 is taken as an example of a motherboard Management control unit (BMC).
The file system 1023 is a system for managing file information on a storage medium. For example, the storage medium may be a magnetic disk. The file system 1023 is responsible for file storage. For example, the file system 1023 may store the memory health of each memory in the memory module 1021.
It should be noted that the system architecture and the application scenario described in the embodiment of the present application are for more clearly explaining the technical solution of the embodiment of the present application, and do not constitute a limitation to the technical solution provided in the embodiment of the present application.
The structure of the electronic device 102 illustrated in the embodiment of the present application does not specifically limit the electronic device 102. In some embodiments, the electronic device 102 may include more or fewer components than illustrated, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. In some embodiments, the electronic device 102 may be the same device as the client 101. It should be understood that when the electronic device and the client are the same device, the electronic device at least includes a memory, a management module and a file system.
In addition, the number of the electronic devices 102 may be one or more, and is not limited in this application.
In the related art, the management module 1022 may calculate the memory health of the memory in the electronic device 102. The memory health calculation result can be stored in the file system 1023. If the memory health degree of the memory is to be recalculated, the memory health degree in the file system 1023 needs to be reset to a default value, and then the management module 1022 performs the memory health degree calculation. However, resetting the memory health to a default value requires restarting the operating system of the electronic device 102 or powering down the electronic device 102. In the above method, restarting the operating system of the electronic device 102, or powering down the electronic device 102 may cause a service running on the electronic device 102 to be interrupted or terminated, so that the running stability of the electronic device is poor.
In view of this, the present disclosure provides a memory health resetting method. According to the resetting requirement of the memory health degree, a user can send a memory health degree resetting command to the electronic equipment through the client. In response to the memory health reset command, the electronic device may reset the memory health of all memories in the electronic device. By the memory health degree resetting method, restarting of an operating system of the electronic equipment can be avoided, or the electronic equipment is powered off, so that the service running on the electronic equipment cannot be influenced, and the running stability of the electronic equipment is improved.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a schematic flowchart of a memory health degree resetting method according to an embodiment of the present disclosure. Referring to fig. 2, the method may include:
s201, the client receives a first command.
The client is an electronic device that can receive commands input by a user. For example, the client may be a tablet computer, a laptop computer, a desktop computer, or a laptop computer, among others.
The first command is a command to be processed by the client. The first command may be an Intelligent Platform Management Interface (IPMI) command based on an IPMI protocol; alternatively, the first command may be a redfish command based on the redfish protocol. The present invention is described by taking the IPMI command as an example of the first command.
In some embodiments, the client may display a preset page to input the first command. Next, the preset page will be described with reference to fig. 3. Fig. 3 is a schematic diagram of a preset page according to an embodiment of the present application. Referring to fig. 3, a command input box may be included in the preset page. Optionally, the preset page may further include a submit button. For example, the default page may be a Disk Operating System (DOS) page.
The client may receive a first command input by a user in a command input box of a preset page.
S202, the client sends a first command to the electronic equipment.
In this embodiment, the electronic device may include a management module. The management module may process the first command.
The management module may be a management module of a non-business module in the electronic device.
The management module can reset the memory health degree of the memory in the electronic equipment according to the first command. For example, the management module may be BMC, SMM, etc. in the electronic device.
In this embodiment, the user may input the first command in the command input box and click the submit button. The client may send a first command to the electronic device in response to an operation of the user clicking a submit button.
It should be noted that the user may also trigger the client to send the first command to the electronic device through another sending operation. For example, the sending operation may be the hitting of a sending shortcut key on a keyboard, and the sending shortcut key may be an enter key, a space key, and the like.
Next, the first command will be described with reference to fig. 4. Fig. 4 is a schematic diagram of a first command according to an embodiment of the present disclosure. Referring to fig. 4, the first command may include first device information and type information of the first command.
The first device information may include an Internet Protocol Address (IP Address), a user name, and a password. The first device information may be used to identify the identity of the electronic device.
The type information of the first command may be used to indicate a function module to be started for executing the first command, a callback function to be called for executing the first command, and the like. For example, the function module may be a memory health resetting module in the electronic device, and the callback function to be called may be a callback function for resetting memory health.
In some embodiments, the electronic device and the client are the same device, and the electronic device receives the first command.
S203, the electronic equipment judges whether the first equipment information is correct.
If yes, go to S204.
If not, ending.
Accordingly, the electronic device may obtain the first command from the client. And a management module in the electronic device may process the first command.
The management module may determine the first device information in the first command, that is, the management module may determine the IP address, the user name, and the password in the first device information.
In this embodiment, second device information of the electronic device may be acquired; if the first equipment information is the same as the second equipment information, determining that the verification result is that the verification is passed; and if the first equipment information is different from the second equipment information, determining that the verification result is that the verification fails.
The second device information includes at least one of: an IP address of the electronic device, a username of the electronic device, and a password of the electronic device.
It should be understood that, if all the information in the first device information is the same as all the corresponding information in the second device information, the verification result is that the verification is passed; and if any item of information in the first equipment information is different from the corresponding information in the second equipment information, the verification result is that the verification is not passed.
Specifically, if the IP address in the first device information is the same as the IP address of the electronic device, the user name in the first device information is the same as the user name of the electronic device, and the password in the first device information is the same as the password of the electronic device, the authentication result is that the authentication is passed; and if the IP address in the first device information is different from the IP address of the electronic device, or the user name in the first device information is different from the user name of the electronic device, or the password in the first device information is different from the password of the electronic device, the verification result is that the verification fails.
S204, the electronic equipment determines a first function module corresponding to the first command.
The first functional module may be a functional module in the management module for resetting the memory health. For example, the first functional module may be a memory failure prediction module.
The management module in the electronic device may determine, according to the type information of the first command, a first function module corresponding to the first command.
Specifically, the type information of the first command may include a fixed number of bytes. The content on each byte may represent a corresponding function. The management module may determine the first functional module corresponding to the first command according to the content on the specific byte in the type information of the first command.
Next, referring to fig. 5, the type information of the first command will be described by taking the first command as an IPMI command as an example. Fig. 5 is a schematic diagram of type information of a first command according to an embodiment of the present disclosure. Referring to fig. 5, the type information of the first command may include 9 bytes. The content of 0 byte may represent the network function code of the IPMI command, and the network function code may classify the command according to the hardware in the electronic device corresponding to the IPMI command. The content of 1 byte may represent an IPMI command word, which may indicate a specific instruction type of the command on the basis of a network function code. The content on the 2 bytes may represent a filter string, which may indicate the command task to which the command corresponds. The content on the 3 bytes may represent command rights, which may indicate a level of authority of the command originator. The content on the 4 bytes may indicate a functional module corresponding to the command, and the functional module may be a functional module in the electronic device that processes the command. The content of 5 bytes may represent a maximum length of the IPMI command data zone, the content of 6 bytes may represent a minimum length of the IPMI command data zone, and the maximum length and the minimum length of the IPMI command data zone may indicate a maximum length and a minimum length of bytes occupied by the IPMI command. The content of the 7 bytes may represent a callback function corresponding to the IPMI command, and the callback function corresponding to the IPMI command may be a function to be called when the command is executed. The content on the 8 bytes may represent user data, which may be a parameter that the user transfers to the electronic device. In this embodiment, the user data may be a preset health degree of a memory transferred from the user to the electronic device. For the specific structure of the IPMI command, reference may be made to the related art, and details are not described herein.
In this embodiment, the management module may store a string corresponding to the memory health degree resetting task. The management module may match a string corresponding to the memory health degree reset task with a string of 2 bytes in the type information of the first command to determine that the first command is a memory health degree reset command.
If the filtering character string on the 2 bytes is the same as the character string corresponding to the memory health degree resetting task, the first command is a memory health degree resetting command, and if the filtering character string on the 2 bytes is different from the character string corresponding to the memory health degree resetting task, the first command is not the memory health degree resetting command.
For example, assuming that the string corresponding to the memory health resetting task is "0x10", the management module may use "0x10" to match the string of 2 bytes in the type information of the first command. If the character string of 2 bytes in the type information of the first command is the same as '0 x 10', the first command is a memory health degree reset command; if the string of 2 bytes in the type information of the first command is different from "0x10", the first command is not a memory health reset command.
It should be understood that multiple functional modules may be included in the management module, and that different functional modules may perform different tasks.
In this embodiment, the content of the 4 bytes in the type information of the first command may be the name of the first function module. That is, the management module may determine the first functional module corresponding to the first command according to the content of the first command type information on 4 bytes.
For example, assuming that the content of the first command type information on 4 bytes is the memory failure prediction module, the first functional module is the memory failure prediction module.
S205, the electronic equipment starts the first command corresponding to the first function module, and calls a callback function through the first function module.
In this embodiment, after the management module in the electronic device determines the first function module corresponding to the first command, the first function module may be started.
The callback function may be a function for resetting memory health.
Callback function information may be included in the type information of the first command. Taking the IPMI command as an example, please refer to fig. 5, the content of 7 bytes in the type information of the first command may represent a callback function corresponding to the first command. For example, the content of the first command on the 7 bytes in the type information may be a pointer of the callback function.
In this embodiment, the management module may call, through the first function module, a callback function corresponding to content recorded in 7 bytes in the type information of the first command, so as to achieve the purpose of resetting the memory health degree. For example, if the first function module is a memory failure prediction module and the callback function is a callback function for resetting the memory health degree, the management module may call the callback function for resetting the memory health degree through the memory failure prediction module to reset the memory health degrees of all the memories in the electronic device.
S206, the electronic equipment resets the memory health degree through the callback function.
The memory health degree may be an attribute of the memory, and the memory health degree may be stored in a memory configuration file in the electronic device.
Resetting the memory health may be that the management module changes the memory health in a memory configuration file of the electronic device by calling back the function. For example, the memory configuration file may be located in a file system.
In this embodiment, the management module in the electronic device may change the memory health degrees of all memories in the electronic device to the preset health degree through the callback function.
The type information of the first command may include a preset health degree therein. Taking the first command as an IPMI command as an example, please refer to fig. 5, the content of 8 bytes in the type information of the first command may represent user data, and the user data is the preset health degree transmitted to the management module by the user.
It should be understood that the user can set the specific size of the preset health degree according to the actual requirement.
Take the IPMI command as the first command. The content on 8 bytes in the type information of the first command may indicate a preset health degree. For example, the content of the first command in the type information of 8 bytes is "0x64", which indicates that the preset health degree is 100; the content of the first command on 8 bytes in the type information is "0x32", which indicates that the preset health degree is 50; the content of the first command over 8 bytes in the type information is "0x00", which indicates that the preset health degree is 0.
In this embodiment, the management module may change the memory health degrees of all memories in the electronic device to the preset health degree transferred on 8 bytes in the type information of the first command in the memory configuration file of the electronic device through the callback function.
For example, assume that the preset health conveyed over 8 bytes in the type information of the first command is 100. The electronic device includes 3 memories. The memory health of the 3 memories described in the memory configuration file is 60, 80, and 50, respectively. The management module may change the memory health degrees of the 3 memories to 100 in the memory configuration file through the callback function, so as to achieve the purpose of resetting the memory health degrees.
S207, the electronic equipment sends a response message to the client.
The electronic device may feed back a processing result of the first command to the client through the response message.
The response message may include a completion code and response data.
The completion code may be "success" or "failure".
When the completion code is "successful", the response data is used to record the memory whose memory health degree reset was successful.
When the completion code is 'fail', the response data is used for recording the memory with the memory health degree reset failure.
Depending on the result of the management module processing the first command, the response message may include the following three cases:
case 1, the memory health reset of all memories was successful.
In this case, the memory health degree of all the memories in the electronic device is successfully reset, the completion code may be "successful", and the response data may be all the memories in the electronic device.
Case 2, the memory health of the partial memory is reset successfully.
In this case, the memory health degree of the partial memory in the electronic device is successfully reset, the completion code may be "successful", and the response data may be the memory in the electronic device in which the memory health degree is successfully reset.
Case 3, memory health reset of all memories failed.
In this case, the memory health degree reset of all the memories in the electronic device fails, the completion code may be "failure", and the response data may be all the memories in the electronic device.
In the memory health degree resetting method provided in this embodiment, the client may receive the first command and send the first command to the electronic device. The management module can start the first function module according to the first command, and call the callback function through the first function module. The management module can reset the memory health degree through the callback function and send a response message to the client. By resetting the memory health degree through the method, the operation system of the electronic equipment can be prevented from being restarted, or the electronic equipment is powered off, the service running on the electronic equipment cannot be influenced, and the running stability of the electronic equipment is improved.
Based on any of the above embodiments, the memory health degree resetting method shown in the present application is described below with reference to fig. 6.
Fig. 6 is a flowchart illustrating another memory health resetting method according to an embodiment of the present application. Referring to fig. 6, the method may include:
s601, acquiring a first command.
The execution subject of this embodiment may be an electronic device, and may also be a management module provided in the electronic device. Alternatively, the management module may be implemented by software, or by a combination of software and hardware.
The first command is used for resetting the memory health degree of a memory in the electronic equipment; the first command indicates a callback function that needs to be called.
In this embodiment, the first command may be obtained from the client, where the first command is sent by the client after responding to a preset operation input by the user on the preset page.
The specific implementation of obtaining the first command may refer to S202, which is not described herein.
The first command may include first device information and type information of the first command.
The first device information may include at least one of: IP address, username, and password.
The type information of the first command may be used to indicate a function module that needs to be started to execute the first command, a callback function that needs to be called to execute the first command, and the like.
S602, responding to the first command, and calling a callback function to reset the memory health degree.
In this embodiment, a first function module corresponding to the first command may be determined according to the first command, and a callback function for resetting the memory health degree may be called through the first function module, so as to reset the memory health degree of the memory in the electronic device through the callback function.
The method for determining the first functional module may refer to S204, which is not described herein again.
The method for resetting the memory health degree of the memory in the electronic device may be referred to as S205-S206, and is not described herein again.
In the memory health degree resetting method provided in this embodiment, the electronic device or the management module in the electronic device may obtain the first command, and reset the memory health degree of the memory in the electronic device according to the first command. By the method, when the memory health degree of the memory in the electronic equipment is reset, the operation system of the electronic equipment can be prevented from being restarted, or the electronic equipment is powered off, so that the service running on the electronic equipment is not influenced, and the running stability of the electronic equipment is improved.
The technical solution shown in the above method embodiment is described in detail by specific embodiments with reference to fig. 7A to 7B.
Referring to fig. 7A-7B, fig. 7A is a schematic diagram illustrating a memory health degree calculation according to an embodiment of the present disclosure, and fig. 7B is a schematic diagram illustrating a memory health degree reset according to an embodiment of the present disclosure. As shown in fig. 7A-7B, the electronic device includes a management module and a file system therein.
The management module may calculate a memory health of a memory in the electronic device.
The file system stores a memory configuration file. The memory health degree calculated by the management module can be stored in a memory configuration file.
Referring to fig. 7A, it is assumed that the electronic device includes n memories. The management module calculates that the health degree of the memory 1 is a parameter 11, the health degree of the memory 2 is a parameter 12 \8230, the health degree 8230, and the health degree of the memory n is a parameter 1n. The health of each of the n memories may be stored in a memory configuration file.
And in the running process of the electronic equipment, if the memory health degree of the memory in the electronic equipment needs to be recalculated. The user can send a first command to the electronic device through the client, so that the management module in the electronic device can reset the memory health degree of the memory in the electronic device according to the first command.
Referring to fig. 7B, the client may communicate with the electronic device.
In response to a sending operation of a user at the client, the client may send a first command to the electronic device. The management module in the electronic device may activate the first functional module according to the first command. The first functional module is a functional module in the management module, which can be used for resetting the memory health degree. For example, the first functional module may be a memory failure prediction module in the management module. The first functional module may call a callback function for resetting the memory health degree, and reset the memory health degree to a preset health degree indicated by the first command through the callback function.
Assume that the preset health indicated by the first command is M. The first functional module can reset the health degree of the memory 1 to M, the health degree of the memory 2 to M \8230 \ 8230and the health degree of the memory n to M in the file system through the callback function.
Fig. 8 is a schematic structural diagram of a memory health resetting device according to an embodiment of the present disclosure. Referring to fig. 8, the apparatus includes an obtaining module 11 and a resetting module 12, wherein,
the obtaining module 11 is configured to obtain a first command, where the first command is used to reset a memory health degree of a memory in the electronic device; the first command indicates a callback function needing to be called;
in response to the first command, the reset module 12 is configured to call the callback function to reset the memory health.
The memory health degree resetting device provided in this embodiment may be used to implement the technical solutions shown in any of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
In one possible embodiment, the first command includes first device information; the reset module 12 is specifically configured to perform verification processing on the first device information to obtain a verification result;
and when the verification result is that the verification is passed, calling the callback function to reset the memory health degree.
In one possible embodiment, the reset module 12 is specifically configured to,
determining a first functional module corresponding to the first command;
starting the first functional module;
and resetting the memory health degree of the memory of the electronic equipment through the first functional module.
In one possible embodiment, the reset module 12 is specifically configured to,
calling a callback function corresponding to the memory health degree reset command through the first function module;
and setting the memory health degree in the memory configuration file in the electronic equipment as a preset health degree through the callback function.
In one possible embodiment, the reset module 12 is specifically configured to,
acquiring second equipment information of the electronic equipment;
if the first device information is the same as the second device information, determining that the verification result is that the verification is passed;
and if the first equipment information is different from the second equipment information, determining that the verification result is that the verification fails.
In one possible implementation, the first device information includes at least one of: an internet protocol IP address, a username, and a password.
In one possible embodiment, the first command is an intelligent platform management interface IPMI command; or, the first command is a redfish command.
In a possible embodiment, the acquisition module 11 is used in particular for,
and acquiring the first command from a client, wherein the first command is sent by the client after responding to a preset operation input by a user on a preset page.
The memory health degree resetting device provided in this embodiment may be used to implement the technical solutions shown in any of the above method embodiments, and the implementation principles and technical effects thereof are similar and will not be described herein again.
Fig. 9 is a schematic diagram of a hardware structure of the memory health degree resetting device provided in the present application. The memory health degree resetting device can be a management device, or a chip, a chip module and the like in the management device. Referring to fig. 9, the memory health reset apparatus 20 may include: a processor 21 and a memory 22, wherein the processor 21 and the memory 22 may communicate; illustratively, the processor 21 and the storage 22 communicate via a communication bus 23, the storage 22 is configured to store program instructions, and the processor 21 is configured to call the program instructions in the storage to perform the memory health reset method according to any of the above-described method embodiments.
Optionally, the memory health reset device 20 may further include a communication interface, which may include a transmitter and/or a receiver.
Optionally, the Processor may be a Central Processing Unit (CPU), or may be another general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in this application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in a processor.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a computer, the method for resetting the memory health degree executed in any of the method embodiments is implemented, and the implementation principle and the technical effect of the method are similar, which are not described herein again.
The embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program is executed by a computer, the method for resetting the memory health degree executed in any of the above method embodiments is implemented, and the implementation principle and the technical effect are similar, which are not described herein again.
All or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The aforementioned program may be stored in a readable memory. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned memory (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state disk, magnetic tape (magnetic tape), floppy disk (flexible disk), optical disk (optical disk), and any combination thereof.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processing unit of a general purpose computer, special purpose computer, embedded processor, or other programmable terminal device to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable terminal equipment to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable terminal equipment to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the embodiments of the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to encompass such modifications and variations.
In the present application, the terms "include" and variations thereof may refer to non-limiting inclusions; the term "or" and variations thereof may mean "and/or". The terms "first," "second," and the like in this application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. In the present application, "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.

Claims (10)

1. A method for resetting memory health, the method comprising:
the method comprises the steps that an electronic device obtains a first command, wherein the first command is used for resetting the memory health degree of a memory in the electronic device; the first command indicates a callback function needing to be called;
and responding to the first command, and calling the callback function by the electronic equipment to reset the memory health degree.
2. The method of claim 1,
the first command comprises first equipment information; the electronic device calls the callback function to reset the memory health degree, and the method comprises the following steps:
verifying the first equipment information to obtain a verification result;
and when the verification result is that the verification is passed, the electronic equipment calls the callback function to reset the memory health degree.
3. The method of claim 2, wherein the electronic device invoking the callback function to reset the memory health comprises:
determining a first functional module corresponding to the first command;
starting the first functional module;
and resetting the memory health degree of the memory in the electronic equipment through the first functional module.
4. The method of claim 3, wherein resetting, by the first functional module, memory health of a memory in the electronic device comprises:
calling a callback function corresponding to the first command through the first functional module;
and setting the memory health degree in the memory configuration file in the electronic equipment as a preset health degree through the callback function.
5. The method according to any one of claims 2 to 4, wherein the performing the verification process on the first device information to obtain a verification result includes:
acquiring second equipment information of the electronic equipment;
if the first device information is the same as the second device information, determining that the verification result is verification passing;
and if the first equipment information is different from the second equipment information, determining that the verification result is that the verification fails.
6. The method according to any of claims 2-5, wherein the first device information comprises at least one of: an internet protocol IP address, a username, and a password.
7. The method according to any one of claims 1 to 6,
the first command is an Intelligent Platform Management Interface (IPMI) command; alternatively, the first and second electrodes may be,
the first command is a redfish command.
8. The method of any of claims 1-7, wherein the electronic device obtaining a first command comprises:
and acquiring the first command from a client, wherein the first command is sent by the client after responding to a preset operation input by a user on a preset page.
9. A memory health degree resetting device is characterized by comprising an acquisition module and a resetting module, wherein,
the acquisition module is used for acquiring a first command, and the first command is used for resetting the memory health degree of a memory in the electronic equipment; the first command indicates a callback function needing to be called;
and responding to the first command, wherein the resetting module is used for calling the callback function to reset the memory health degree.
10. A memory health reset device comprises a processor and a memory which is in communication connection with the processor;
the memory stores a computer program;
the processor executes the computer program to implement the method of any one of claims 1 to 8.
CN202211202604.5A 2022-09-29 2022-09-29 Memory health degree resetting method, device and equipment Pending CN115454780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211202604.5A CN115454780A (en) 2022-09-29 2022-09-29 Memory health degree resetting method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211202604.5A CN115454780A (en) 2022-09-29 2022-09-29 Memory health degree resetting method, device and equipment

Publications (1)

Publication Number Publication Date
CN115454780A true CN115454780A (en) 2022-12-09

Family

ID=84308510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211202604.5A Pending CN115454780A (en) 2022-09-29 2022-09-29 Memory health degree resetting method, device and equipment

Country Status (1)

Country Link
CN (1) CN115454780A (en)

Similar Documents

Publication Publication Date Title
CN108462760B (en) Electronic device, automatic cluster access domain name generation method and storage medium
CN110427785B (en) Equipment fingerprint acquisition method and device, storage medium and electronic device
US20170005858A1 (en) Log processing method and client
WO2020224238A1 (en) Blockchain node depolyment method, device and equipment, and storage medium
CN108804399B (en) Form verification method and device
CN114257551A (en) Distributed current limiting method and system and storage medium
CN114095567B (en) Data access request processing method and device, computer equipment and medium
CN112306567A (en) Cluster management system and container management and control method
CN111506331A (en) Server BMC refreshing method, system, terminal and storage medium
CN113010214B (en) BIOS option setting method, system and storage medium
CN109948332A (en) A kind of physical machine login password remapping method and device
CN110880990B (en) Configuration checking method and device for big data cluster component and computing equipment
CN111722994A (en) Task request response method and device
CN110474787B (en) Node fault detection method and device
CN110930253A (en) Intelligent contract internal main key generation method and device, computer equipment and storage medium
CN115454780A (en) Memory health degree resetting method, device and equipment
CN115454576A (en) Virtual machine process management method and system and electronic equipment
CN115454896A (en) SMBUS-based SSD MCTP control message verification method and device, computer equipment and storage medium
CN107203915B (en) Data storage method and device
CN112350856B (en) Distributed service sign-off method and equipment
CN113656378A (en) Server management method, device and medium
CN114124524A (en) Cloud platform permission setting method and device, terminal equipment and storage medium
CN114185804A (en) Interface testing method and device and terminal equipment
CN115033551A (en) Database migration method and device, electronic equipment and storage medium
CN113242302A (en) Data access request processing method and device, computer equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20231113

Address after: 450046, 10th Floor, North Chuangzhi Tiandi Building, Dongshigeng Street, Longzihu Wisdom Island Middle Road East, Zhengdong New District, Zhengzhou City, Henan Province

Applicant after: Henan Kunlun Technology Co.,Ltd.

Address before: 450000 Floor 9, building 1, Zhengshang Boya Plaza, Longzihu smart Island, Zhengdong New District, Zhengzhou City, Henan Province

Applicant before: xFusion Digital Technologies Co., Ltd.