CN113254304A - Method for determining shutdown type of server, server and storage medium - Google Patents

Method for determining shutdown type of server, server and storage medium Download PDF

Info

Publication number
CN113254304A
CN113254304A CN202110468876.9A CN202110468876A CN113254304A CN 113254304 A CN113254304 A CN 113254304A CN 202110468876 A CN202110468876 A CN 202110468876A CN 113254304 A CN113254304 A CN 113254304A
Authority
CN
China
Prior art keywords
data
shutdown
programmable logic
logic device
cpu
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
CN202110468876.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.)
China Great Wall Technology Group Co ltd
Original Assignee
China Great Wall Technology Group 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 China Great Wall Technology Group Co ltd filed Critical China Great Wall Technology Group Co ltd
Priority to CN202110468876.9A priority Critical patent/CN113254304A/en
Publication of CN113254304A publication Critical patent/CN113254304A/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/3024Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
    • 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

Abstract

The application is applicable to the technical field of servers, and provides a method for determining a shutdown type of a server, the server and a storage medium, wherein the method comprises the following steps: the complex programmable logic device acquires data information of the CPU; when the data information meets a preset data updating condition, the complex programmable logic device stores target data in a target area in a shutdown register based on the data information, wherein the target data represents the shutdown type of the CPU; according to the method and the device, the data of the target area in the shutdown register are changed according to the acquired data information, and the shutdown type of the CPU can be quickly obtained according to the target data.

Description

Method for determining shutdown type of server, server and storage medium
Technical Field
The present application belongs to the technical field of servers, and in particular, to a method for determining a shutdown type of a server, and a storage medium.
Background
Servers run faster, have higher loads, and are more expensive than ordinary computers. The server provides computing or application services for other clients (e.g., terminals such as PCs, smart phones, ATMs, etc., and even large devices such as train systems, etc.) in the network.
When the server runs, the server often needs to run for a long time without interruption, and if a shutdown fault occurs in the running process of the server, the use of a user is influenced. At present, when a server is shut down, a large amount of investigation is often needed to find out the reason of the shutdown, which wastes time.
Disclosure of Invention
The embodiment of the application provides a method for determining a shutdown type of a server, the server and a storage medium, and can solve the problem that the reason of the shutdown fault of the server is difficult to find at present.
In a first aspect, an embodiment of the present application provides a method for determining a server shutdown type, which is applied to a server, where the server includes a complex programmable logic device and a CPU, and the complex programmable logic device includes a shutdown register;
the determining method comprises the following steps:
the complex programmable logic device acquires data information of the CPU;
and when the data information meets a preset data updating condition, the complex programmable logic device stores target data in a target area in the shutdown register based on the data information, wherein the target data represents the shutdown type of the CPU.
In a second aspect, an embodiment of the present application provides a server, including a complex programmable logic device, a CPU, a memory, and a computer program that is stored in the memory and is executable on the complex programmable logic device, where the complex programmable logic device includes a shutdown register, and the complex programmable logic device implements the method for determining a shutdown type of the server according to any one of the first aspect when executing the computer program.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program is configured to, when executed by a processor, implement the method for determining a server shutdown type according to any one of the above first aspects.
In a fourth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the method for determining a server shutdown type according to any one of the above first aspects.
Compared with the prior art, the embodiment of the application has the advantages that: the method comprises the steps that a complex programmable logic device firstly obtains data information of a CPU, when the data information meets a preset data updating condition, the complex programmable logic device stores target data in a target area in a shutdown register based on the data information, and the shutdown type of the CPU can be represented through the target data; according to the method and the device, the data of the target area in the shutdown register are changed according to the acquired data information, and the shutdown type of the CPU can be quickly obtained according to the target data.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic application scenario diagram of a method for determining a server shutdown type according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for determining a server shutdown type according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a method for determining a server shutdown type according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a complex editable logic device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in the specification of this application and the appended claims, the term "if" may be interpreted contextually as "when … …" or "upon" or "in response to a determination" or "in response to a detection". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Fig. 1 is a schematic view of an application scenario of a method for determining a server shutdown type according to an embodiment of the present application, where the method for determining a server shutdown type may be used to obtain a shutdown type of a CPU. The server includes a complex programmable logic device 20, a CPU10, and a baseboard management controller 30, the complex programmable logic device 20 including a shutdown register. Before executing shutdown of the self program, the CPU10 may send a first update instruction to the Complex programmable logic device 20(Complex Programming location-CPLD), where the Complex programmable logic device 20 stores first data in a target area in a shutdown register after receiving the first update instruction, and the first data represents that the shutdown type of the CPU10 is shutdown of a normal running program of the CPU 10. The complex programmable logic device 20 detects the power supply voltage of the CPU10, and when the power supply voltage is less than a preset threshold, stores second data in a target area in the shutdown register, where the second data indicates that the shutdown type of the CPU10 is abnormal power shutdown. The complex programmable logic device 20 detects the key state of the CPU10, and when the key state is the shutdown state, stores third data in the target area of the shutdown register, where the third data represents that the shutdown type of the CPU is key shutdown. Before the Baseboard Management Controller 30(Baseboard Management Controller-BMC) sends the second shutdown instruction to the CPU10, the Baseboard Management Controller 30 sends a second update instruction to the complex programmable logic device 20, after the complex programmable logic device 20 receives the second update instruction, fourth data is stored in a target area in a shutdown register, and the fourth data represents that the shutdown type of the CPU is that the Baseboard Management Controller controls the CPU to be shutdown.
The method for determining the server shutdown type according to the embodiment of the present application is described in detail below with reference to fig. 1.
Fig. 2 shows a schematic flow chart of a method for determining a server shutdown type provided in the present application, and with reference to fig. 2, the method is described in detail as follows:
and S101, the complex programmable logic device acquires data information of the CPU.
In this embodiment, the complex programmable logic device and the CPU are both devices provided in the server. The CPLD and the CPU communicate through a computer Bus (Low pin count Bus-LPC Bus). The CPLD is provided with a shutdown register.
In this embodiment, the data information of the CPU may include at least one of a power supply voltage of the CPU, a key state of the CPU, and data transmitted by the CPU to the complex programmable logic device.
In this embodiment, the data information may be obtained by the CPLD receiving data sent by the CPU, or may be data of the CPU actively detected by the CPLD.
And S102, when the data information meets a preset data updating condition, the complex programmable logic device stores target data in a target area in a shutdown register based on the data information, wherein the target data represents the shutdown type of the CPU.
In this embodiment, the data update condition may be set according to a condition for shutdown of the CPU, that is, in what condition the CPU is shut down, the condition is set as one of the data update conditions.
In this embodiment, data corresponding to bytes in the shutdown register may be defined in advance, and different data in the shutdown register corresponds to different shutdown types. After the bytes in the shutdown register are defined, different data information may be associated with corresponding data, so that when the data information satisfies a data update condition, the initial data in the shutdown register is updated to the corresponding data, which is recorded as target data in the present application.
For example, the shutdown type of the CPU when the 7 th byte in the shutdown register is 1 is defined as shutdown of the CPU normally running program. And defining the shutdown type of the CPU when the 4 th byte in the shutdown register is 1 as the abnormal shutdown of the power supply of the CPU. And defining the shutdown type of the CPU when the 5 th byte in the shutdown register is 1 as key shutdown.
Specifically, after the server is powered on each time, the shutdown register needs to be cleared, that is, all bytes in the shutdown register are restored to the initial data, for example, all bytes are 0 values. After the complex programmable logic device acquires the data information, it needs to judge whether the data information meets the data updating condition, that is, whether the CPU is to be shut down. And if the data information meets the data updating condition, determining that the CPU is about to be shut down. If the CPU is to be shut down, the data in the shutdown register needs to be updated, so that the data stored in the shutdown register is the data corresponding to the current shutdown of the CPU and the current data information, namely the data corresponding to the current shutdown type. And finally, the shutdown type of the current shutdown of the CPU can be determined through the data in the shutdown register.
In this embodiment, the target area may be set as needed. The specific data corresponding to each data information can be set according to the requirement.
In the embodiment of the application, a complex programmable logic device firstly acquires data information of a CPU (central processing unit), when the data information meets a preset data updating condition, the complex programmable logic device stores target data in a target area in a shutdown register based on the data information, and the shutdown type of the CPU can be represented through the target data; according to the method and the device, the data of the target area in the shutdown register are changed according to the acquired data information, and the shutdown type of the CPU can be quickly obtained according to the target data.
In a possible implementation manner, the implementation process of step S101 may include:
and before the CPU executes the first shutdown instruction, the CPU sends a first updating instruction to the complex programmable logic device. The complex programmable logic device receives a first update instruction, and the data information comprises the first update instruction.
In the present embodiment, one of the cases of the shutdown of the CPU is the shutdown of the CPU normal running program. In order to record shutdown of the normal operation condition of the CPU, in the normal operation process of the program stored in the CPU, before the program is operated to the shutdown, the program is recorded as a first shutdown instruction in the present application, and the CPU may first send an update instruction to the CPLD, which is recorded as a first update instruction in the present application. The first update instruction is used for instructing the CPLD to update the initial data in the shutdown register.
The first update instruction may include data that the CPLD needs to store, which is referred to as first data in this application.
In a possible implementation manner, the implementation process of step S101 may include:
the complex programmable logic device detects the power supply voltage of the CPU, and the data information comprises the power supply voltage.
In the present embodiment, one case of the CPU shutdown is the presence of an abnormality in the power supply voltage, for example, the power-down of the AC power supply. In order to record the shutdown of the CPU due to the abnormal power supply voltage of the CPU, the CPLD needs to detect the power supply voltage of the CPU in real time to obtain the power supply voltage of the CPU, for example, the voltage of the AC/DC power supply.
In a possible implementation manner, the implementation process of step S101 may include:
the complex programmable logic device detects the key state of a control key of the CPU, and the data information comprises the key state.
In this embodiment, since one case of the CPU being powered off is that the user controls the CPU to be powered off through the power-off button of the CPU. In order to record the CPU shutdown condition caused by triggering the control key for controlling the CPU shutdown, the CPLD needs to detect the key state of the control key of the CPU in real time.
In a possible implementation manner, after step S101, the method may further include:
and judging whether the data information meets a preset data updating condition or not.
Specifically, when the data information includes the first update instruction, the data update condition includes that the first update instruction is received, and therefore, after the CPLD receives the first update instruction sent by the CPU, it is determined that the data information satisfies the data update condition.
Specifically, when the data information includes a power supply voltage, the data update condition includes that the power supply voltage is less than a preset threshold. And when the power supply voltage detected by the CPLD is smaller than a preset threshold value, determining that the data information meets the data updating condition.
Specifically, when the data information includes a key state, the data update condition includes that the key state is a power-off state. And when the key state detected by the CPLD is the power-off state, determining that the data information meets the data updating condition.
In a possible implementation manner, when the data information includes the first update instruction, and the CPLD receives the first update instruction, the implementation process of step S102 may include:
the complex programmable logic device stores first data in a target area in a shutdown register, the target data comprises the first data, and the shutdown type of the first data representing the CPU is shutdown of a normal running program of the CPU.
In this embodiment, the first update instruction may include first data, where the first data is data that needs to be stored in the shutdown register.
If the CPLD receives the first update instruction, the CPLD may parse the first update instruction to obtain first data, and store the first data in the target area. The data in the shutdown register is read to obtain first data, and the shutdown type corresponding to the first data is the shutdown of the normal running program of the CPU, so that the CPU shutdown belonging to the shutdown of the normal running program of the CPU can be determined.
As an example, if the first data in the first update instruction is 0001, the CPLD may store 0001 after receiving the first update instruction.
In a possible implementation manner, when the data information includes the power supply voltage, and the power supply voltage detected by the CPLD is less than a preset threshold, the implementation process of step S102 may include:
and the complex programmable logic device stores second data in a target area in the shutdown register, the target data comprises the second data, and the second data represents that the shutdown type of the CPU is abnormal shutdown of the power supply.
In this embodiment, if the power supply voltage detected by the CPLD is less than the preset threshold, the CPLD writes the shutdown register and writes the second data into the shutdown register. The second data is corresponding data when the power voltage is smaller than a preset threshold value.
In the present embodiment, the preset threshold may be set as needed, for example, 12V, 11V, 10V, etc.
As an example, if the power supply voltage detected by the CPLD is 5V, the preset threshold value of the power supply voltage is 12V, and the second data is 00001. And if the detected power supply voltage is smaller than the preset threshold value, the CPLD directly writes 00001 into the shutdown register.
In a possible implementation manner, when the data information includes the key state and the key state detected by the CPLD is the power-off state, the implementation process of step S102 may include:
and the complex programmable logic device stores third data in a target area in the shutdown register, the target data comprises the third data, and the third data represents that the shutdown type of the CPU is key shutdown.
In this embodiment, when the CPU normally operates, the key state of the control key is the power-on state, and if the CPLD detects that the key state of the control key is the power-off state, the CPLD writes the power-off register and writes the third data into the power-off register. The third data is corresponding data when the key state is the power-off state.
As an example, if the third data is 000001. And when the CPLD detects that the key state of the control key is a power-off state, the CPLD writes 000001 into a power-off register.
The first data, the second data, and the third data are different data.
In a possible implementation manner, the server includes a baseboard management controller, and the BMC may control the CPU to be powered off, that is, the BMC may send a power-off instruction to the CPU to control the CPU to be powered off, which is recorded as a second power-off instruction in this application. Therefore, it is also necessary to record the CPU shutdown due to BMC control.
As shown in fig. 3, specifically, the method may further include:
s201, before the baseboard management controller sends a second shutdown instruction to the CPU, the baseboard management controller sends a second update instruction to the complex programmable logic device.
In this embodiment, the BMC, CPU and CPLD communicate over the LPC bus.
In this embodiment, the second shutdown instruction is used to instruct the CPU to shutdown.
And S202, after the complex programmable logic device receives the second updating instruction, the complex programmable logic device stores fourth data in a target area in a shutdown register, wherein the fourth data represents that the shutdown type of the CPU is that the substrate management controller controls the CPU to be shut down.
In this embodiment, the second update instruction may include fourth data therein. The fourth data may be set as needed. The first data, the second data, the third data, and the fourth data are different data.
In this embodiment, after receiving the second update instruction, the CPLD stores the fourth data in the target area in the shutdown register.
In a possible implementation manner, since the shutdown register only temporarily stores data, that is, the shutdown register may only store data corresponding to the current shutdown of the CPU, and may not store the data for a long time, in order to store the data corresponding to the current shutdown of the CPU at each time, the BMC needs to read the data in the shutdown register and store the data at each time in the shutdown register in the BMC. The BMC reads the data in the shutdown register, can read the data according to a preset time interval, can also read the data in real time, and stores the read data in the shutdown register in the BMC in a log mode.
Specifically, after step S102, the method may further include:
the method comprises the steps that a substrate management controller obtains target data in a complex programmable logic device; the baseboard management controller stores target data.
In this embodiment, the BMC may read the target data from the shutdown register of the CPLD, and store the target data in the form of a log.
For example, if the shutdown type of the CPU in 3 months and 10 days needs to be searched, the log of the BMC may be read, the data stored in the log of the BMC in 3 months and 10 days is 0001 after the log is searched, and the shutdown type corresponding to 0001 is shutdown of the CPU normally running program.
In the embodiment of the application, the target data in the shutdown register is stored by the BMC, so that the log of the BMC can be directly read when the CPU is subsequently inquired about the shutdown type at a certain time, the target data in the shutdown register at the certain time can be obtained from the log of the BMC, and the shutdown type corresponding to the target data is further obtained.
Specifically, after step S202, the method may further include:
the substrate management controller acquires fourth data in the complex programmable logic device; the baseboard management controller stores the fourth data.
In one possible implementation, the shutdown type of the CPU may also be a shutdown caused by an abnormal operation of the CPU. If the shutdown of the CPU is caused by abnormal operation of the CPU, the data in the shutdown register is still the initial data. The data in the shutdown register at the shutdown time caused by the abnormal operation of the CPU read by the BMC is initial data. When the CPU shutdown type at the moment is inquired at the later stage, if the initial data stored in the log in the BMC is acquired, the CPU shutdown type at the moment can be determined to be shutdown caused by abnormal operation of the CPU.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the method for determining the shutdown type of the server in the foregoing embodiment, fig. 4 shows a block diagram of the server provided in the embodiment of the present application, and for convenience of description, only the portions related to the embodiment of the present application are shown.
Referring to fig. 4, the server may include: a complex programmable logic device 300 and a CPU, the complex programmable logic device 300 including a shutdown register.
The complex programmable logic device 300 may include:
a data obtaining module 310, configured to obtain data information of the CPU by the complex programmable logic device;
a data updating module 320, configured to, when the data information meets a preset data updating condition, store, by the complex programmable logic device, target data in a target area in the shutdown register based on the data information, where the target data represents a shutdown type of the CPU.
In one possible implementation, the data acquisition module 310 may be specifically configured to:
before the CPU executes a first shutdown instruction, the CPU sends a first updating instruction to the complex programmable logic device;
the complex programmable logic device receives the first updating instruction, and the data information comprises the first updating instruction;
and/or the presence of a gas in the gas,
the complex programmable logic device detects the power supply voltage of the CPU, and the data information comprises the power supply voltage;
and/or the presence of a gas in the gas,
the complex programmable logic device detects the key state of a control key of the CPU, and the data information comprises the key state.
In one possible implementation manner, when the data information includes the first update instruction, the data update condition includes: receiving the first update instruction, the data update module 320 may specifically be configured to:
the complex programmable logic device stores first data in a target area in the shutdown register, the target data comprises the first data, and the first data represents that the shutdown type of the CPU is shutdown of a normal running program of the CPU.
In one possible implementation manner, when the data information includes the power supply voltage, the data update condition includes: the power supply voltage is less than a preset threshold, and the data update module 320 may be specifically configured to:
and the complex programmable logic device stores second data in a target area in the shutdown register, wherein the target data comprises the second data, and the second data represents that the shutdown type of the CPU is abnormal power shutdown.
In a possible implementation manner, when the data information includes the key status, the data update condition includes: the key status is a power-off status, and the data updating module 320 may be specifically configured to:
and the complex programmable logic device stores third data in a target area in the shutdown register, wherein the target data comprises the third data, and the third data represents that the shutdown type of the CPU is key shutdown.
In a possible implementation manner, the server includes a baseboard management controller, and the baseboard management controller may be specifically configured to:
before the baseboard management controller sends a second shutdown instruction to the CPU, the baseboard management controller sends a second update instruction to the complex programmable logic device;
after the complex programmable logic device receives the second update instruction, the complex programmable logic device stores fourth data in a target area in the shutdown register, wherein the fourth data represents that the shutdown type of the CPU is that the baseboard management controller controls the CPU to be shut down.
In one possible implementation, the baseboard management controller may be specifically configured to:
the substrate management controller acquires the target data in the complex programmable logic device;
the baseboard management controller stores the target data.
In one possible implementation, the baseboard management controller may be specifically configured to:
the baseboard management controller acquires the fourth data in the complex programmable logic device;
the baseboard management controller stores the fourth data.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
An embodiment of the present application further provides a server, and referring to fig. 5, the server 400 may include: the complex programmable logic device 410, the memory 420, and the CPU430, and a computer program stored in the memory 420 and executable on the complex programmable logic device 410, when the complex programmable logic device 410 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, for example, steps S101 to S102 in the embodiment shown in fig. 2. Alternatively, the complex programmable logic device 410, when executing the computer program, implements the functions of the modules/units in the above-described device embodiments, such as the functions of the modules 310 to 320 shown in fig. 4.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in the memory 420 and executed by the complex programmable logic device 410 to accomplish the present application. The one or more modules/units may be a series of computer program segments capable of performing specific functions, which are used to describe the execution of the computer program in the terminal device 400.
Those skilled in the art will appreciate that fig. 5 is merely an example of a terminal device and is not limiting and may include more or fewer components than shown, or some components may be combined, or different components such as input output devices, network access devices, buses, etc.
The memory 420 may be an internal storage unit of the terminal device, or may be an external storage device of the terminal device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. The memory 420 is used for storing the computer programs and other programs and data required by the terminal device. The memory 420 may also be used to temporarily store data that has been output or is to be output.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The method for determining the shutdown type of the server provided by the embodiment of the application can be applied to terminal devices such as a computer, a tablet computer, a notebook computer, a netbook, a Personal Digital Assistant (PDA) and the like, and the embodiment of the application does not limit the specific type of the terminal device.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when being executed by a processor, the computer program implements the steps in the embodiments of the method for determining a server shutdown type.
The embodiment of the present application provides a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in each embodiment of the method for determining a server shutdown type when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. 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 application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. The method for determining the shutdown type of the server is applied to the server, the server comprises a complex programmable logic device and a CPU, and the complex programmable logic device comprises a shutdown register;
wherein the determination method comprises the following steps:
the complex programmable logic device acquires data information of the CPU;
and when the data information meets a preset data updating condition, the complex programmable logic device stores target data in a target area in the shutdown register based on the data information, wherein the target data represents the shutdown type of the CPU.
2. The method for determining the type of server shutdown according to claim 1, wherein the complex programmable logic device obtains data information of the CPU, including;
before the CPU executes a first shutdown instruction, the CPU sends a first updating instruction to the complex programmable logic device;
the complex programmable logic device receives the first updating instruction, and the data information comprises the first updating instruction;
and/or the presence of a gas in the gas,
the complex programmable logic device detects the power supply voltage of the CPU, and the data information comprises the power supply voltage;
and/or the presence of a gas in the gas,
the complex programmable logic device detects the key state of a control key of the CPU, and the data information comprises the key state.
3. The method for determining a server power-off type according to claim 2, wherein when the data information includes the first update instruction, the data update condition includes: receiving the first updating instruction;
the complex programmable logic device stores target data in a target area in the shutdown register based on the data information, and the method comprises the following steps:
the complex programmable logic device stores first data in a target area in the shutdown register, the target data comprises the first data, and the first data represents that the shutdown type of the CPU is shutdown of a normal running program of the CPU.
4. The method for determining a server power-off type according to claim 2, wherein when the data information includes the power supply voltage, the data update condition includes: the power supply voltage is less than a preset threshold value;
the complex programmable logic device stores target data in a target area in the shutdown register based on the data information, and the method comprises the following steps:
and the complex programmable logic device stores second data in a target area in the shutdown register, wherein the target data comprises the second data, and the second data represents that the shutdown type of the CPU is abnormal power shutdown.
5. The method for determining a server power-off type according to claim 2, wherein when the data information includes the key status, the data update condition includes: the key state is a power-off state;
the complex programmable logic device stores target data in a target area in the shutdown register based on the data information, and the method comprises the following steps:
and the complex programmable logic device stores third data in a target area in the shutdown register, wherein the target data comprises the third data, and the third data represents that the shutdown type of the CPU is key shutdown.
6. The method of determining a server power-off type of claim 1, wherein the server comprises a baseboard management controller, the method further comprising:
before the baseboard management controller sends a second shutdown instruction to the CPU, the baseboard management controller sends a second update instruction to the complex programmable logic device;
after the complex programmable logic device receives the second update instruction, the complex programmable logic device stores fourth data in a target area in the shutdown register, wherein the fourth data represents that the shutdown type of the CPU is that the baseboard management controller controls the CPU to be shut down.
7. The method for determining a server power-off type according to any one of claims 1 to 5, wherein the server includes a baseboard management controller, and after the target area in the power-off register stores the target data, the method includes:
the substrate management controller acquires the target data in the complex programmable logic device;
the baseboard management controller stores the target data.
8. The method for determining the type of server shutdown as claimed in claim 6, wherein after the complex programmable logic device stores fourth data in the target area in the shutdown register, comprising:
the baseboard management controller acquires the fourth data in the complex programmable logic device;
the baseboard management controller stores the fourth data.
9. A server, comprising a complex programmable logic device, a CPU and a memory, and a computer program stored in the memory and executable on the complex programmable logic device, wherein the complex programmable logic device comprises a shutdown register, and the complex programmable logic device implements the method for determining the shutdown type of the server according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the method for determining a server power-off type according to any one of claims 1 to 7.
CN202110468876.9A 2021-04-28 2021-04-28 Method for determining shutdown type of server, server and storage medium Pending CN113254304A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110468876.9A CN113254304A (en) 2021-04-28 2021-04-28 Method for determining shutdown type of server, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110468876.9A CN113254304A (en) 2021-04-28 2021-04-28 Method for determining shutdown type of server, server and storage medium

Publications (1)

Publication Number Publication Date
CN113254304A true CN113254304A (en) 2021-08-13

Family

ID=77222156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110468876.9A Pending CN113254304A (en) 2021-04-28 2021-04-28 Method for determining shutdown type of server, server and storage medium

Country Status (1)

Country Link
CN (1) CN113254304A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114236461A (en) * 2021-12-17 2022-03-25 深圳市百富智能新技术有限公司 Electric quantity calibration method, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114236461A (en) * 2021-12-17 2022-03-25 深圳市百富智能新技术有限公司 Electric quantity calibration method, electronic equipment and storage medium
CN114236461B (en) * 2021-12-17 2023-11-21 深圳市百富智能新技术有限公司 Electric quantity calibration method, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US7392429B2 (en) System and method for maintaining persistent state data
US8132055B2 (en) Operating system-firmware interface update recovery
CN109726076B (en) Applet life cycle management method and system
US8423729B2 (en) Part information restoration method, part information management method and electronic apparatus
CN114236461B (en) Electric quantity calibration method, electronic equipment and storage medium
CN113254304A (en) Method for determining shutdown type of server, server and storage medium
CN113672306B (en) Server component self-checking abnormity recovery method, device, system and medium
CN111475343B (en) Computer state outage restoration method and device and terminal equipment
CN113272785B (en) Method for mounting file system, terminal equipment and storage medium
US20200342109A1 (en) Baseboard management controller to convey data
CN116302755A (en) PSU fault injection test method, system, device and readable storage medium
CN111159009A (en) Pressure testing method and device for log service system
US20090144536A1 (en) Monitoring method and monitor apparatus
CN113595762B (en) Network card configuration storage method and device
CN113282435B (en) Application exception processing method and electronic equipment
CN112882869A (en) Servo system parameter management method, device, equipment and storage medium
CN112732498A (en) Test method, device, equipment and storage medium for simulating single-point power-on and power-off of equipment
CN111027104A (en) Method, device and mainboard for preventing loss of network card identification data
US20220405387A1 (en) Secure enablement of a removable security module on a logic board
CN112269583B (en) Method for processing equipment operation abnormal file upgrade, server and storage medium
US20240118824A1 (en) Methods and system to remove data from mobile device
CN117909105A (en) SCP log output method and system, medium, chip and electronic equipment thereof
CN111813037A (en) Starting-up control method, starting-up control device and electronic equipment
CN116954972A (en) Fault positioning method, positioning device, terminal equipment and storage medium
CN117555729A (en) Automatic backup and recovery method for system, terminal equipment and storage medium

Legal Events

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