CN117520094A - State determination method and device for bare metal server - Google Patents

State determination method and device for bare metal server Download PDF

Info

Publication number
CN117520094A
CN117520094A CN202311565179.0A CN202311565179A CN117520094A CN 117520094 A CN117520094 A CN 117520094A CN 202311565179 A CN202311565179 A CN 202311565179A CN 117520094 A CN117520094 A CN 117520094A
Authority
CN
China
Prior art keywords
bare metal
shutdown
metal server
state
server
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
CN202311565179.0A
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 Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202311565179.0A priority Critical patent/CN117520094A/en
Publication of CN117520094A publication Critical patent/CN117520094A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a state determining method and device of a bare metal server, wherein the method comprises the steps of responding to an operation instruction input by a user; if the operation instruction is a starting instruction, executing starting operation and acquiring an identification code and a starting state of the server; periodically sending the identification code and the starting-up state to a remote server so that the remote server can determine that the bare metal server is in the starting-up state; if the operation instruction is a shutdown instruction, executing corresponding shutdown operation so that the remote server can determine that the bare metal server is in a normal shutdown state; if the power-off condition is detected, alarm information is sent to the remote server, so that the remote server can distinguish the specific condition of abnormal shutdown of the bare metal server according to the alarm information. And if the remote server does not receive the identification code and the starting state after exceeding the preset time, determining that the bare metal server is abnormally shut down, confirming the specific condition of the abnormal shut down of the bare metal based on the alarm information, accurately grasping the key state of the bare metal server, and effectively detecting various shut down conditions.

Description

State determination method and device for bare metal server
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method and an apparatus for determining a state of a bare metal server.
Background
The bare metal server is a physical server on the cloud, can be seamlessly integrated with the existing cloud computing, network and other services, meets the extreme requirements of business on computing performance, provides high-performance and stable physical computing resources, and has the advantages of integrating the stability of the traditional host computer and the high elasticity of the resources on the cloud. To ensure the quality of service of bare metal servers, critical states of the servers (e.g., abnormal shutdown) need to be monitored.
Because the manufacturers of bare metal servers are more, the server models produced by each manufacturer are different from each other in terms of event level definition of shutdown. At present, shutdown warning of a bare metal server is achieved through ping unreachable. However, ping cannot accurately judge the shutdown cause of the bare metal server, so that the problem that the key state of the bare metal server cannot be accurately grasped exists.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method and an apparatus for determining a state of a bare metal server, so as to solve the problem that a key state of the bare metal server cannot be accurately known.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
the first aspect of the invention discloses a state determining method of a bare metal server, which is applied to the bare metal server and comprises the following steps:
responding to an operation instruction input by a user;
executing a first operation flow when the operation instruction is a starting instruction;
executing a second operation flow when the operation instruction is a shutdown instruction;
the first operation flow includes:
executing starting operation and acquiring an identification code and a starting state of the bare metal server;
periodically sending the identification code and the starting state to a remote server;
the second operation flow includes:
executing a shutdown operation corresponding to the shutdown instruction according to the shutdown instruction;
and when the power-off condition is detected, a first warning message is sent to the remote server based on preset warning logic.
Preferably, the executing the shutdown operation corresponding to the shutdown instruction according to the shutdown instruction includes:
if the shutdown instruction is a system shutdown instruction, acquiring an identification code and a shutdown state of the bare metal server;
transmitting the identification code and the shutdown state to the remote server and executing shutdown operation;
if the shutdown instruction is an out-of-band shutdown instruction, generating a second warning message according to the identification code of the bare metal server;
and sending the second warning message to the remote server and executing a shutdown operation.
The third aspect of the present invention discloses a method for determining a status of a bare metal server, which is applied to a remote server, wherein the remote server and the bare metal server are connected in communication with each other, and the method comprises:
when receiving starting-up information sent by the bare metal server, determining that the bare metal server is in a starting-up state;
if the starting-up information is not received within a preset time period, determining that the bare metal server is in an abnormal shutdown state;
and when the shutdown information sent by the bare metal server is received, determining that the bare metal server is in a normal shutdown state.
Preferably, if the startup information is not received within a preset time period, after determining that the bare metal server is in an abnormal shutdown state, the method further includes:
if an alarm message sent by the bare metal server is received and the alarm message indicates that the bare metal server is in a power-off and power-off state, determining that the bare metal server is in the power-off and power-off state;
and if the alarm message sent by the bare metal server is received and the alarm message indicates that the bare metal server is in an out-of-band shutdown state, determining that the bare metal server is in the out-of-band shutdown state.
Preferably, if the startup information is not received within a preset time period, after determining that the bare metal server is in an abnormal shutdown state, the method further includes:
and if the alarm message sent by the bare metal server is not received, determining that the bare metal server is in an out-of-band shutdown state.
The third aspect of the present invention discloses a status determining device of a bare metal server, applied to the bare metal server, the device comprising:
a response unit for responding to an operation instruction input by a user;
the first execution unit is used for executing a first operation flow when the operation instruction is a starting instruction;
the second execution unit is used for executing a second operation flow when the operation instruction is a shutdown instruction;
the first operation flow includes:
the acquisition unit is used for executing starting operation and acquiring the identification code and the starting state of the bare metal server;
the first sending unit is used for periodically sending the identification code and the starting state to a remote server;
the second operation flow includes:
the third execution unit is used for executing the shutdown operation corresponding to the shutdown instruction according to the shutdown instruction;
and the second sending unit is used for sending a first warning message to the remote server based on preset warning logic when the power-off condition is detected.
Preferably, the third execution unit includes:
the obtaining subunit is used for obtaining the identification code and the shutdown state of the bare metal server if the shutdown instruction is a system shutdown instruction;
the first sending subunit is used for sending the identification code and the shutdown state to the remote server and executing shutdown operation;
a generating subunit, configured to generate a second notification alert message according to the identifier code of the bare metal server if the shutdown instruction is an out-of-band shutdown instruction;
and the second sending subunit is used for sending the second alarm message to the remote server and executing shutdown operation.
The fourth aspect of the present invention discloses a status determining device of a bare metal server, applied to a remote server, where the remote server and the bare metal server are communicatively connected to each other, the device comprising:
the receiving unit is used for determining that the bare metal server is in a starting state when receiving starting information sent by the bare metal server;
the first determining unit is used for determining that the bare metal server is in an abnormal shutdown state if the startup information is not received within a preset time length;
and the second determining unit is used for determining that the bare metal server is in a normal shutdown state when the shutdown information sent by the bare metal server is received.
Preferably, the apparatus further comprises:
the third determining unit is used for determining that the bare metal server is in a power-off and power-off state if the warning message sent by the bare metal server is received and the warning message indicates that the bare metal server is in the power-off and power-off state;
and the fourth determining unit is used for determining that the bare metal server is in an out-of-band shutdown state if the warning message sent by the bare metal server is received and the warning message indicates that the bare metal server is in the out-of-band shutdown state.
Preferably, the apparatus further comprises:
and a fifth determining unit, configured to determine that the bare metal server is in an out-of-band shutdown state if the alert message sent by the bare metal server is not received.
Based on the state determining method and device of the bare metal server provided by the embodiment of the invention, the method comprises the steps of responding to an operation instruction input by a user; when the operation instruction is a starting instruction, executing starting operation and acquiring an identification code and a starting state of the server; periodically sending the identification code and the starting-up state to a remote server so that the remote server can determine that the bare metal server is in the starting-up state; when the operation instruction is a shutdown instruction, executing corresponding shutdown operation so that the remote server determines that the bare metal server is in a normal shutdown state; when the power-off condition is detected, alarm information is sent to the remote server, so that the remote server can distinguish the specific condition of abnormal shutdown of the bare metal server according to the alarm information. And if the remote server does not receive the identification code and the starting state after exceeding the preset time, determining that the bare metal server is abnormally shut down, confirming the specific condition of the abnormal shut down of the bare metal based on the alarm information, accurately grasping the key state of the bare metal server, and effectively detecting various shut down conditions.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of an application environment according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for determining a state of a bare metal server according to an embodiment of the present invention;
FIG. 3 is a flowchart of a first operation flow according to an embodiment of the present invention;
FIG. 4 is a flowchart of a second operation flow according to an embodiment of the present invention;
FIG. 5 is another flowchart of a method for determining a status of a bare metal server according to an embodiment of the present invention;
fig. 6 is a block diagram of a state determining device of a bare metal server according to an embodiment of the present invention;
fig. 7 is another block diagram of a state determining apparatus of a bare metal server according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In this application, 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 phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As known from the background art, ping cannot accurately determine the shutdown cause of the bare metal server, so there is a problem that the key state of the bare metal server cannot be accurately grasped.
Therefore, the embodiment of the invention provides a state determining method and device of a bare metal server, wherein the method comprises the steps of responding to an operation instruction input by a user; when the operation instruction is a starting instruction, executing starting operation and acquiring an identification code and a starting state of the server; periodically sending the identification code and the starting-up state to a remote server so that the remote server can determine that the bare metal server is in the starting-up state; when the operation instruction is a shutdown instruction, executing corresponding shutdown operation so that the remote server determines that the bare metal server is in a normal shutdown state; when the power-off condition is detected, alarm information is sent to the remote server, so that the remote server can distinguish the specific condition of abnormal shutdown of the bare metal server according to the alarm information. And if the remote server does not receive the identification code and the starting state after exceeding the preset time, determining that the bare metal server is abnormally shut down, confirming the specific condition of the abnormal shut down of the bare metal based on the alarm information, accurately grasping the key state of the bare metal server, and effectively detecting various shut down conditions.
Referring to fig. 1, a schematic diagram of an application environment suitable for use in embodiments of the present invention is shown. The method for determining the state of the bare metal server according to the embodiment of the present invention may be applied to the interactive system 100 shown in fig. 1. The interactive system 100 includes a bare metal server 101 and a remote server 102, the bare metal server 101 and the remote server 102 being communicatively coupled.
The bare metal server 101 (BMS) is an on-cloud physical server, can be seamlessly integrated with existing cloud computing, network and other services, meets the extremely-high requirements of business on computing performance, provides high-performance and stable physical computing resources, and integrates the stability of a traditional host and the advantage of high elasticity of resources on the cloud. Remote server 102 may be one or more servers specified according to business needs.
Based on the application scenario disclosed in the above embodiment of the present invention, as shown in fig. 2, a flowchart of a method for determining a state of a bare metal server according to an embodiment of the present invention is provided, where the method may be applied to a bare metal server 101 in the above application scenario, and mainly includes the following steps:
step S201: and responding to the operation instruction input by the user.
In the process of specifically implementing step S201, the user triggers a power-on button or a power-off button, or inputs a power-on instruction or a power-off instruction from the interactive interface, and responds to the operation of the user.
Step S202: and when the operation instruction is a starting instruction, executing a first operation flow.
In the process of specifically implementing step S202, when the operation instruction input by the user is a power-on instruction, the first operation flow is executed. The specific embodiment of the first operation flow is shown in fig. 3, and includes the following steps:
step S301: and executing the starting operation and acquiring the identification code and the starting state of the bare metal server.
In the specific implementation process of step S301, a startup operation is performed according to a startup instruction, and an identification code (for example, SN number) of the bare metal server and a current startup state of the bare metal server are obtained.
It should be noted that, an execution script is added to the startup item rc.d to obtain an identification code (for example, SN number) of the bare metal server and a current startup state of the bare metal server.
Step S302: the identification code and the power-on state are periodically transmitted to a remote server.
In the process of implementing step S302, the identification code (for example, SN number) of the bare metal server and the current power-on state of the bare metal server are sent to the remote server periodically (for example, the period is 1 minute).
It can be understood that the identification code (for example, SN number) of the bare metal server and the current power-on state of the bare metal server are periodically sent, which is beneficial to realizing the real-time monitoring of the state of the bare metal server, helping to find problems in time (for example, the bare metal server is powered down) and taking necessary measures, thereby improving the reliability and stability.
Step S203: and when the operation instruction is a shutdown instruction, executing a second operation flow.
In the process of specifically implementing step S203, when the operation instruction input by the user is a shutdown instruction, the second operation flow is executed. The specific embodiment of the second operation flow is shown in fig. 4, and includes the following steps:
step S401: and executing the shutdown operation corresponding to the shutdown instruction according to the shutdown instruction.
In the specific implementation process of step S401, when the shutdown instruction is a system shutdown instruction, the normal shutdown operation is considered; and when the shutdown instruction is an out-of-band shutdown instruction, the shutdown instruction is regarded as non-abnormal shutdown operation.
It should be noted that, when the shutdown instruction is a system shutdown instruction (for example, a user executes a poweroff or reboot command to perform a shutdown operation from the inside of the operating system), the identifier (for example, SN number) and the shutdown state of the bare metal server are obtained by using the system shutdown logic of the system d-halt. And sending the identification code and the shutdown state to a remote server and executing shutdown operation.
It will be appreciated that the system shutdown logic of the system d-halt service will execute all executable files under the/usr/lib/system d/system-shutdown/directory when the system is shutdown, so that an execution script can be added under the directory to achieve the purpose of acquiring the identification code and shutdown state and reporting to the remote server.
It should be noted that, when the shutdown instruction is an out-of-band shutdown instruction (for example, the user performs a shutdown operation from an out-of-band management page or an IPMI command), a second notification alert message (for example, a trap message) is generated according to the identification code of the bare metal server, and the second notification alert message is sent to the remote server and the shutdown operation is performed.
It may be appreciated that the trap message carries an identification code of the bare metal server and an alarm item, where the alarm item may be, for example, related information indicating that the bare metal server is shutdown out of band.
Step S402: and when the power-off condition is detected, a first warning message is sent to a remote server based on preset warning logic.
In the specific implementation process of step S402, when a power-off condition is detected, the bare metal server is powered off and turned off, and is regarded as abnormal power-off operation at this time; a first alert message (e.g., a trap message) is sent to a remote server based on preset alert logic.
It can be understood that the trap message carries an identification code of the bare metal server and an alarm item, wherein the alarm item can be related information indicating that the bare metal server is powered off and shut down, for example.
In the embodiment of the invention, the normal power-on state, the normal power-off state, the out-of-band power-off state and the power-off state are effectively distinguished through the identification code, the power-on state, the power-off state, the first warning message and the second warning message, so that the detection method of the power-off of the bare metal server is perfected, the key state of the bare metal server is accurately mastered, and various power-off conditions are effectively detected.
As shown in fig. 5, another flowchart of a method for determining a status of a bare metal server according to an embodiment of the present invention may be applied to the remote server 102 in the above application scenario, and mainly includes the following steps:
step S501: when the starting-up information sent by the bare metal server is received, the bare metal server is determined to be in a starting-up state.
In the specific implementation process of step S501, when the remote server receives the startup information (including the identification code and the startup state of the bare metal server) sent by the bare metal server, it determines that the bare metal server is currently in the startup state.
Step S502: if the starting-up information is not received within the preset time, determining that the bare metal server is in an abnormal shutdown state.
In the specific implementation process of step S502, if the remote server does not receive the startup information periodically sent by the bare metal server within a preset period of time (for example, 3 minutes), it is determined that the bare metal server is currently in an abnormal shutdown state. The specific condition that the bare metal server is in an abnormal shutdown state needs to be judged.
In some embodiments, the remote server determines whether an alarm message (the alarm message may be the first alarm message or the second alarm message in the embodiment of fig. 2) sent by the bare metal server is received, and if the alarm message sent by the bare metal server is not received, determines that the bare metal server is in an out-of-band shutdown state.
It can be understood that if the alarm message sent by the bare metal server is received, when the alarm message indicates that the bare metal server is in a power-off state, the bare metal server is determined to be in the power-off state; and when the alarm message indicates that the bare metal server is in the out-of-band shutdown state, determining that the bare metal server is in the out-of-band shutdown state.
Step S503: when the shutdown information sent by the bare metal server is received, the bare metal server is determined to be in a normal shutdown state.
In the specific implementation process of step S503, when the remote server receives the shutdown information (including the identification code and the shutdown state of the bare metal server) sent by the bare metal server, it determines that the bare metal server is currently in a normal shutdown state.
In the embodiment of the invention, the state of the bare metal server is effectively distinguished by receiving the startup information, the shutdown information and the alarm message, so that the potential problems and anomalies of the bare metal server are more easily detected, and better management and optimization of system resources are facilitated.
Corresponding to the method for determining the state of the bare metal server according to the embodiment of the present invention (applied to the bare metal server), referring to fig. 6, a block diagram of a state determining device for a bare metal server according to the embodiment of the present invention is shown, where the state determining device includes: a response unit 601, a first execution unit 602, a second execution unit 603, an acquisition unit 604, a first transmission unit 605, a third execution unit 606, and a second transmission unit 607.
And a response unit 601 for responding to an operation instruction input by a user.
The first execution unit 602 is configured to execute a first operation flow when the operation instruction is a power-on instruction.
The second execution unit 603 is configured to execute a second operation flow when the operation instruction is a shutdown instruction.
The first operation flow comprises the following steps:
and the obtaining unit 604 is used for executing the starting operation and obtaining the identification code and the starting state of the bare metal server.
The first sending unit 605 is configured to send the identification code and the power-on status to the remote server periodically.
The second operation flow comprises:
the third execution unit 606 is configured to execute a shutdown operation corresponding to the shutdown instruction according to the shutdown instruction.
The second sending unit 607 is configured to send a first alert message to a remote server based on preset alert logic when a power failure condition is detected.
In the embodiment of the invention, the normal power-on state, the normal power-off state, the out-of-band power-off state and the power-off state are effectively distinguished through the identification code, the power-on state, the power-off state, the first warning message and the second warning message, so that the detection method of the power-off of the bare metal server is perfected, the key state of the bare metal server is accurately mastered, and various power-off conditions are effectively detected.
In connection with what is shown in fig. 6, the third execution unit 606 includes an acquisition subunit, a first transmission subunit, a generation subunit, and a second transmission subunit.
The obtaining subunit is used for obtaining the identification code and the shutdown state of the bare metal server if the shutdown instruction is a system shutdown instruction.
And the first sending subunit is used for sending the identification code and the shutdown state to the remote server and executing shutdown operation.
And the generation subunit is used for generating a second warning message according to the identification code of the bare metal server if the shutdown instruction is an out-of-band shutdown instruction.
And the second sending subunit is used for sending the second alarm message to the remote server and executing shutdown operation.
Corresponding to the method for determining the state of the bare metal server (applied to the remote server) provided in the above embodiment of the present invention, referring to fig. 7, another block diagram of a state determining apparatus for a bare metal server provided in the embodiment of the present invention is shown, where the state determining apparatus includes: a receiving unit 701, a first determining unit 702, and a second determining unit 703.
And the receiving unit 701 is configured to determine that the bare metal server is in a power-on state when receiving the power-on information sent by the bare metal server.
The first determining unit 702 is configured to determine that the bare metal server is in an abnormal shutdown state if no startup information is received within a preset duration.
The second determining unit 703 is configured to determine that the bare metal server is in a normal shutdown state when receiving the shutdown information sent by the bare metal server.
In the embodiment of the invention, the state of the bare metal server is effectively distinguished by receiving the startup information, the shutdown information and the alarm message, so that the potential problems and anomalies of the bare metal server are more easily detected, and better management and optimization of system resources are facilitated.
In connection with the content shown in fig. 7, the state determining apparatus further includes: a third determination unit and a fourth determination unit.
And the third determining unit is used for determining that the bare metal server is in the power-off state if the warning message sent by the bare metal server is received and the warning message indicates that the bare metal server is in the power-off state.
And the fourth determining unit is used for determining that the bare metal server is in the out-of-band shutdown state if the warning message sent by the bare metal server is received and the warning message indicates that the bare metal server is in the out-of-band shutdown state.
In connection with the content shown in fig. 7, the state determining apparatus further includes: and the fifth determining unit is used for determining that the bare metal server is in an out-of-band shutdown state if the warning message sent by the bare metal server is not received.
In summary, the embodiment of the invention provides a method and a device for determining a state of a bare metal server, wherein the method comprises the steps of responding to an operation instruction input by a user; when the operation instruction is a starting instruction, executing starting operation and acquiring an identification code and a starting state of the server; periodically sending the identification code and the starting-up state to a remote server so that the remote server can determine that the bare metal server is in the starting-up state; when the operation instruction is a shutdown instruction, executing corresponding shutdown operation so that the remote server determines that the bare metal server is in a normal shutdown state; when the power-off condition is detected, alarm information is sent to the remote server, so that the remote server can distinguish the specific condition of abnormal shutdown of the bare metal server according to the alarm information. And if the remote server does not receive the identification code and the starting state after exceeding the preset time, determining that the bare metal server is abnormally shut down, confirming the specific condition of the abnormal shut down of the bare metal based on the alarm information, accurately grasping the key state of the bare metal server, and effectively detecting various shut down conditions.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A state determining method of a bare metal server, applied to a bare metal server, the method comprising:
responding to an operation instruction input by a user;
executing a first operation flow when the operation instruction is a starting instruction;
executing a second operation flow when the operation instruction is a shutdown instruction;
the first operation flow includes:
executing starting operation and acquiring an identification code and a starting state of the bare metal server;
periodically sending the identification code and the starting state to a remote server;
the second operation flow includes:
executing a shutdown operation corresponding to the shutdown instruction according to the shutdown instruction;
and when the power-off condition is detected, a first warning message is sent to the remote server based on preset warning logic.
2. The method of claim 1, wherein the executing the shutdown operation corresponding to the shutdown instruction according to the shutdown instruction comprises:
if the shutdown instruction is a system shutdown instruction, acquiring an identification code and a shutdown state of the bare metal server;
transmitting the identification code and the shutdown state to the remote server and executing shutdown operation;
if the shutdown instruction is an out-of-band shutdown instruction, generating a second warning message according to the identification code of the bare metal server;
and sending the second warning message to the remote server and executing a shutdown operation.
3. A method for determining a status of a bare metal server, applied to a remote server, the remote server and the bare metal server being communicatively connected to each other, the method comprising:
when receiving starting-up information sent by the bare metal server, determining that the bare metal server is in a starting-up state;
if the starting-up information is not received within a preset time period, determining that the bare metal server is in an abnormal shutdown state;
and when the shutdown information sent by the bare metal server is received, determining that the bare metal server is in a normal shutdown state.
4. The method of claim 3, wherein after determining that the bare metal server is in the abnormal shutdown state if the startup information is not received within a preset period of time, further comprising:
if an alarm message sent by the bare metal server is received and the alarm message indicates that the bare metal server is in a power-off and power-off state, determining that the bare metal server is in the power-off and power-off state;
and if the alarm message sent by the bare metal server is received and the alarm message indicates that the bare metal server is in an out-of-band shutdown state, determining that the bare metal server is in the out-of-band shutdown state.
5. The method of claim 3, wherein after determining that the bare metal server is in the abnormal shutdown state if the startup information is not received within a preset period of time, further comprising:
and if the alarm message sent by the bare metal server is not received, determining that the bare metal server is in an out-of-band shutdown state.
6. A state determining apparatus of a bare metal server, applied to a bare metal server, the apparatus comprising:
a response unit for responding to an operation instruction input by a user;
the first execution unit is used for executing a first operation flow when the operation instruction is a starting instruction;
the second execution unit is used for executing a second operation flow when the operation instruction is a shutdown instruction;
the first operation flow includes:
the acquisition unit is used for executing starting operation and acquiring the identification code and the starting state of the bare metal server;
the first sending unit is used for periodically sending the identification code and the starting state to a remote server;
the second operation flow includes:
the third execution unit is used for executing the shutdown operation corresponding to the shutdown instruction according to the shutdown instruction;
and the second sending unit is used for sending a first warning message to the remote server based on preset warning logic when the power-off condition is detected.
7. The apparatus of claim 6, wherein the third execution unit comprises:
the obtaining subunit is used for obtaining the identification code and the shutdown state of the bare metal server if the shutdown instruction is a system shutdown instruction;
the first sending subunit is used for sending the identification code and the shutdown state to the remote server and executing shutdown operation;
a generating subunit, configured to generate a second notification alert message according to the identifier code of the bare metal server if the shutdown instruction is an out-of-band shutdown instruction;
and the second sending subunit is used for sending the second alarm message to the remote server and executing shutdown operation.
8. A status determining apparatus of a bare metal server, applied to a remote server, the remote server and the bare metal server being communicatively connected to each other, the apparatus comprising:
the receiving unit is used for determining that the bare metal server is in a starting state when receiving starting information sent by the bare metal server;
the first determining unit is used for determining that the bare metal server is in an abnormal shutdown state if the startup information is not received within a preset time length;
and the second determining unit is used for determining that the bare metal server is in a normal shutdown state when the shutdown information sent by the bare metal server is received.
9. The apparatus of claim 8, wherein the apparatus further comprises:
the third determining unit is used for determining that the bare metal server is in a power-off and power-off state if the warning message sent by the bare metal server is received and the warning message indicates that the bare metal server is in the power-off and power-off state;
and the fourth determining unit is used for determining that the bare metal server is in an out-of-band shutdown state if the warning message sent by the bare metal server is received and the warning message indicates that the bare metal server is in the out-of-band shutdown state.
10. The apparatus of claim 8, wherein the apparatus further comprises:
and a fifth determining unit, configured to determine that the bare metal server is in an out-of-band shutdown state if the alert message sent by the bare metal server is not received.
CN202311565179.0A 2023-11-22 2023-11-22 State determination method and device for bare metal server Pending CN117520094A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311565179.0A CN117520094A (en) 2023-11-22 2023-11-22 State determination method and device for bare metal server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311565179.0A CN117520094A (en) 2023-11-22 2023-11-22 State determination method and device for bare metal server

Publications (1)

Publication Number Publication Date
CN117520094A true CN117520094A (en) 2024-02-06

Family

ID=89747404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311565179.0A Pending CN117520094A (en) 2023-11-22 2023-11-22 State determination method and device for bare metal server

Country Status (1)

Country Link
CN (1) CN117520094A (en)

Similar Documents

Publication Publication Date Title
US9674287B2 (en) Methods and apparatus for event logging in an information network
US8806037B1 (en) Remote support automation for a storage server
US11789760B2 (en) Alerting, diagnosing, and transmitting computer issues to a technical resource in response to an indication of occurrence by an end user
US11706080B2 (en) Providing dynamic serviceability for software-defined data centers
CN107896172B (en) Monitoring fault processing method and device, storage medium and electronic equipment
KR101065355B1 (en) Terminal device and server for remote diagnosis for communication terminal and method thereof
JP2008191878A (en) Remote diagnostic-failure responding system, remote diagnostic-failure responding device, remote diagnostic-failure response instruction device, remote diagnostic-falure responding method, and remote diagnostic-failure responding program
EP4206839A1 (en) Method for managing ecu on vehicle, and ecu and readable storage medium
CN106407081B (en) Case management system and server
CN117520094A (en) State determination method and device for bare metal server
JP6222759B2 (en) Failure notification device, failure notification method and program
CN109947630B (en) Fault notification method, device and storage medium
US20210224160A1 (en) Software wireless device
JP2002169706A (en) Monitor system
CN116723235B (en) Intelligent switch control unit, hardware architecture, function implementation method and intelligent switch
CN212061141U (en) External control equipment and system outside frequency
JP7508703B2 (en) Method for managing ECU in vehicle, ECU and readable storage medium
JPWO2011114834A1 (en) Network device and network device
KR101231933B1 (en) System and method for managing error of electronic devices
US11178256B2 (en) Business service providing system, business service recovery method, and business service recovery program
TWM652948U (en) Information monitoring management server
CN110908935A (en) Out-of-frequency external control equipment, system and method
CN118138431A (en) Power system sensor adaptation method, device, equipment and storage medium
CN117194166A (en) Monitoring method and device for serial port external equipment, electronic equipment and storage medium
CN115480977A (en) Fault monitoring method and device, electronic 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