CN110456897A - Power-off protection method, protective device and the server cluster of electronic equipment - Google Patents
Power-off protection method, protective device and the server cluster of electronic equipment Download PDFInfo
- Publication number
- CN110456897A CN110456897A CN201810432289.2A CN201810432289A CN110456897A CN 110456897 A CN110456897 A CN 110456897A CN 201810432289 A CN201810432289 A CN 201810432289A CN 110456897 A CN110456897 A CN 110456897A
- Authority
- CN
- China
- Prior art keywords
- ups
- power
- alternating current
- key service
- service
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/30—Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2273—Test methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/22—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
- G06F11/2284—Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing by power-on test, e.g. power-on self test [POST]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Power Sources (AREA)
Abstract
The embodiment of the invention provides the power-off protection method of a kind of electronic equipment, protective device and server clusters, and wherein method includes: to detect to the working condition of UPS;When the active state for detecting UPS is alternating current power-down state, preset key service out of service;When the active state for detecting UPS is alternating current power-up state, the preset key service of resuming operation.The power-off protection method of a kind of electronic equipment provided in an embodiment of the present invention; while server data safety can be protected after alternating current power down; automatically can also be resumed operation preset key service, to improve degree of intelligence when server changes for power transmission.
Description
Technical field
The present invention relates to power electronic equipment technical field, more particularly to a kind of electronic equipment power-off protection method,
Protective device and server cluster.
Background technique
It is service when alternating current power down that UPS (Uninterruptible Power System, uninterruptible power supply), which is one kind,
The device of device equipment offer power supply.
Current UPS can send power-off signal to server, server is in UPS after UPS detects alternating current power down
Battery electric energy exhaust preceding normal shutdown, guarantee that server is not in exception in restarting.
This power-off protection method, although can guarantee that server operates normally after restart, if in UPS electric energy
Alternating current just restores electricity before exhausting, and power breakdown does not occur, at this time since server is normal shutdown, for server,
Do not occur power down/power up, thus can not trigger the server power on self-starting function, that is, server can not be automatic
Starting, and can only manually boot and resume operation.
Summary of the invention
The power-off protection method for being designed to provide a kind of electronic equipment, protective device and the server of the embodiment of the present invention
Cluster, to realize that server can restore run preset key service automatically when city power recovery powers.Particular technique side
Case is as follows:
In a first aspect, the embodiment of the invention provides the power-off protection method of a kind of electronic equipment, applied to being connected with UPS
Electronic equipment, which comprises
The working condition of the UPS is detected;
When the active state for detecting UPS is alternating current power-down state, preset key service out of service;
When the active state for detecting UPS is alternating current power-up state, the preset key service of resuming operation.
Optionally, the step of working condition to the UPS detects, comprising: obtain the alternating current shape that UPS is sent
State signal;
It is described when detect UPS active state be alternating current power-down state when, preset key service out of service
The step of, comprising: when acquired alternating current status signal is power-off signal, preset key service out of service;
It is described when detect UPS active state be alternating current power-up state when, the preset key of resuming operation
The step of service, comprising: when acquired alternating current status signal is power on signal, resume operation the preset crucial clothes
Business.
Optionally, the alternating current status signal for obtaining UPS and sending, comprising: periodically acquire city's electricity condition of UPS transmission
Signal.
Optionally, the alternating current status signal for obtaining UPS and sending, comprising:
It is sent to UPS and obtains alternating current status signal request;
Receive the response comprising the alternating current status signal that UPS is returned.
Optionally, the preset key service out of service, comprising:
Obtain each preset currently running each process of key service;
Obtain the currently performed operation of each process and data;
Save the currently running each process of the preset key service and the currently performed operation sum number of each process
According to;
Close each preset currently running each process of key service.
Optionally, it is described resume operation the preset key service the step of, comprising:
Read operation and data that each process for being saved executes, operation that saved each process executes and
Data are as follows: the operation and data of each preset key service;
Start each process of each preset key service;
The operation of read each process execution and data are loaded onto each process, resumed operation described preset
Key service.
Second aspect, the embodiment of the invention provides the power-down protection apparatus of a kind of electronic equipment, applied to being connected with UPS
Electronic equipment, described device includes:
Detection module is detected for the working condition to the UPS;
First execution module, for when detect UPS active state be alternating current power-down state when, it is out of service pre-
If key service;
Second execution module, for when detect UPS active state be alternating current power-up state when, institute of resuming operation
State preset key service.
Optionally, the detection module, is specifically used for: obtaining the alternating current status signal that UPS is sent;
First execution module, is specifically used for: out of service when acquired alternating current status signal is power-off signal
Preset key service;
Second execution module, is specifically used for: when acquired alternating current status signal is power on signal, resuming operation described
Preset key service.
Optionally, the detection module, is specifically used for: periodically acquiring the alternating current status signal of UPS transmission.
Optionally, the detection module, comprising:
Sending submodule obtains alternating current status signal request for sending to UPS;
Receiving submodule receives the response comprising the alternating current status signal that UPS is returned.
Optionally, first execution module, is specifically used for:
Obtain each preset currently running each process of key service;
Obtain the currently performed operation of each process and data;
Save the currently running each process of the preset key service and the currently performed operation sum number of each process
According to;
Close each preset currently running each process of key service.
Optionally, second execution module, is specifically used for:
Read operation and data that each process for being saved executes, operation that saved each process executes and
Data are as follows: the operation and data of each preset key service;
Open each process of each preset key service;
The operation of read each process execution and data are loaded onto each process, resumed operation described preset
Key service.
The third aspect includes multiple clothes in the server cluster the embodiment of the invention provides a kind of server cluster
Business device node and more uninterruptible power supply UPS, each server node connect with an at least UPS and carry out power transmission and network
Interaction, each server node, which is run, UPS status monitoring services, and the UPS status monitoring services are for executing sheet
The power-off protection method for the electronic equipment that inventive embodiments first aspect provides.
Optionally, network interaction is connected with each other and carried out between each server node, and the multiple server node includes extremely
Few 1 primary server joint and from server node;
The primary server joint is issued to for obtaining the identification parameter of UPS, and by the identification parameter from server
Node;
It is described from server node, for identifying that the identification parameter is corresponding by run UPS status monitoring services
UPS;The identification parameter includes: the internet protocol address and port numbers of UPS.
Optionally, each server node in the server cluster, specifically for passing through Simple Network Management Protocol
SNMP sends to UPS and obtains alternating current status signal request;
The UPS for receiving the acquisition alternating current status signal request by SNMP, and is returned to server node and is wrapped
The response of the status signal containing alternating current;
Each server node specifically for receiving the response comprising alternating current status signal, and is supervised by UPS state
Survey the alternating current status signal in response described in service acquisition.
Optionally, the server node is specifically used for:
When city's electricity condition of acquisition is power-down state, the UPS status monitoring services run in the server node are supervised
Alternating current power down is measured, the UPS status monitoring services close the preset key service of server node operation;
When city's electricity condition of acquisition is power-up state, the UPS status monitoring services run in the server node are supervised
It measures alternating current to power on, the UPS status monitoring services restore preset key service.
Fourth aspect, the embodiment of the invention provides a kind of server, including processor and machine readable storage medium, institutes
It states machine readable storage medium and is stored with the machine-executable instruction that can be executed by the processor, the processor is described
Machine-executable instruction promotes: the method for realizing the power-off protection method for the electronic equipment that first aspect of the embodiment of the present invention provides
Step.
5th aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage
Dielectric memory contains computer program, and the computer program is executed by processor the electricity of first aspect of embodiment of the present invention offer
The method and step of the power-off protection method of sub- equipment.
The power-off protection method of a kind of electronic equipment provided in an embodiment of the present invention, when server detects the work of UPS
When state is changed into alternating current power-down state, it can stop itself running preset crucial clothes using electric energy provided by UPS
Business, to protect server data safety, and when the active state for detecting UPS is alternating current power-up state, automatically
It resumes operation preset key service, improves degree of intelligence when server changes for power transmission.Certainly, implement this
Any product or method of invention must be not necessarily required to reach all the above advantage simultaneously.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of the power-off protection method of electronic equipment provided in an embodiment of the present invention;
Fig. 2 is the topological diagram of the server node and UPS deployment during the present invention is implemented in server cluster;
Fig. 3 is the flow diagram of step S102 in the embodiment of the present invention;
Fig. 4 is the flow diagram of step S103 in the embodiment of the present invention;
Fig. 5 is another flow diagram of the power-off protection method of electronic equipment provided in an embodiment of the present invention;
Fig. 6 is another flow diagram of the power-off protection method of electronic equipment provided in an embodiment of the present invention;
Fig. 7 is the idiographic flow schematic diagram of the power-off protection method of electronic equipment provided in an embodiment of the present invention;
Fig. 8 is a kind of structural schematic diagram of the power-down protection apparatus of electronic equipment provided in an embodiment of the present invention;
Fig. 9 is the structural schematic diagram of detection module in the power-down protection apparatus of electronic equipment provided in an embodiment of the present invention;
Figure 10 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
As shown in Figure 1, the embodiment of the invention provides the power-off protection method of a kind of electronic equipment, applied to being connected with
The electronic equipment of UPS, the process may comprise steps of:
S101 detects the working condition of UPS.
In the embodiment of the present invention, it is connected with the electronic equipment of UPS, can be the server node in server cluster, or
The other equipment with data-handling capacity of person.Illustrate by taking the server node in server cluster as an example, as shown in Fig. 2, one
It may include multiple servers node in a server cluster, wherein solid line indicates the network signal between server node and UPS
Interaction (signal can be forwarded by interchanger), dotted line indicate the power transmission between server node and UPS.As shown, each
Server node can not only be connect by electric power cable with UPS, can also be connect by the communications cable with UPS, be made server
It also keeps communicating to connect while keeping electrically connected between node and UPS, be examined so as to the working condition to UPS
It surveys.
S102, when the active state for detecting UPS is alternating current power-down state, preset crucial clothes out of service
Business.
UPS can have different working conditions, for example, UPS works in normal condition when alternating current input is normal;When
When alternating current power down, UPS can use the electric energy of itself as equipment power supply;If alternating current is again before UPS itself electric energy exhausts
It powers on, powering mode can be switched back into alternating current by UPS.Due to keeping communication connection, service between server node and UPS
Device node can detecte the working condition of UPS.
Specifically, when the working condition of UPS is changed into alternating current power-down state by original normal condition, though UPS at this time
The electric energy of itself storage so be can use for server node power supply, but after power consumption of powdered is most, server node still has
Possible abnormal shutdown may cause loss of data if server node is carrying out write operation at this time.Therefore, this hair
In bright embodiment when server node detects that the active state of UPS is alternating current power-down state, with regard to key out of service
Service, to avoid the loss of data of the key service caused by server node abnormal shutdown after UPS electric energy exhausts.
The key service of meaning of the embodiment of the present invention, usually by the artificial preset and closely related important clothes of business
Business, such as: service relevant to the write-in of server node data or other critical services.Once these service improper pass
It closes, may cause loss of data, it is serious to may be damaged server node.The title of key service can be pre-stored in column
It, can be with the key in read list when server node detects that the active state of UPS is alternating current power-down state in table
The title of service, thus service corresponding with key service title being currently running out of service.
As a kind of optional embodiment of the embodiment of the present invention, as shown in figure 3, the process of key service out of service has
Body can be with are as follows:
S1021 obtains each preset currently running each process of key service.
Corresponding process can be generated after service operation, therefore, preset key service at runtime, can correspond to it is multiple into
Journey.If necessary to stop preset key service, then need to close process corresponding with preset key service.In order to close with
The corresponding process of preset key service, server node can detecte which preset key service operation in current system has
Process, and obtain these processes.
S1022 obtains the currently performed operation of each process and data.
Process at runtime, can execute corresponding operation and generate data.The available each process of server node is worked as
Preceding performed operation and corresponding data, to be saved to it.
S1023, save the currently running each process of preset key service and each process it is currently performed operation and
Data.
Operation and data performed by process are lost when power is off in order to prevent, and server node can be to preset key
It services currently running each process and the currently performed operation of each process and data is saved, for example, can will be above-mentioned
Data are stored in non-volatile storage medium, such as in disk.Specific store method can be by stopping with operating system
The similar mechanism of dormancy mechanism realizes that details are not described herein for the embodiment of the present invention.
S1024 closes each preset currently running each process of key service.
When the currently running each process of preset key service and the currently performed operation of each process and data are protected
After depositing, even if server node powers off, corresponding data will not lose, at this point, server node can close each preset
The currently running each process of key service.
S103, when the active state for detecting UPS is alternating current power-up state, resume operation preset crucial clothes
Business.
If city power recovery powers before UPS electric energy exhausts, the working condition of UPS is returned by original battery power switching
Mains-supplied, server node can detecte the active state of UPS as alternating current power-up state at this time, therefore server section
The preset key service that can resume operation is put, to restore business.
As a kind of optional embodiment of the embodiment of the present invention, as shown in figure 4, preset key service of resuming operation
Process is specifically as follows:
S1031 reads operation and data that each process saved executes, the operation that each process saved executes
And data are as follows: the operation and data of each preset key service.
In the embodiment of the present invention, it can be read corresponding from the file for being stored with operation and data that each process executes
Content, these contents are the operation and data of each preset key service.
S1032 starts each process of each preset key service.
In order to restore business, server node can star each process of preset key service.If preset pass
Key service be it is multiple, then can star the process of each preset key service.
The operation of read each process execution and data are loaded onto each process, resume operation default by S1033
Key service.
After process initiation, read content can be loaded onto corresponding process by server node, be held in process
Row corresponding operation, thus preset key service of resuming operation.Specific read method can pass through the suspend mode of operating system
The similar mechanism of Restoration Mechanism realizes that details are not described herein for the embodiment of the present invention.
As a kind of optional embodiment of the embodiment of the present invention, after UPS electric energy exhausts, server node power-off is closed
Machine, although this shutdown mode is abnormal shutdown mode, due to the pass of server node for server node
Key service is out of service, therefore will not impact to server node.Behind city power recovery, there is power down/powered on
Journey, so that trigger the server node powers on self-starting function, server node still is able to reset automatically.Detailed process
Figure is referring to Fig. 5, and after alternating current power down, S201, UPS send power-off signal to server node;S202, server node stop pre-
If key service;After UPS electric energy exhausts, server node power-off shutdown;After alternating current powers on, S203, UPS are again to clothes
Business device node power supply;S204 after server node electrifying startup, can find that being saved before power-off, operation is pre- from disk
If data when key service, and these data are used, restore the preset key service of operation before power-off.
The power-off protection method of a kind of electronic equipment provided in an embodiment of the present invention, when server node detects UPS's
When active state is alternating current power-down state, it can stop itself running preset key using electric energy provided by UPS
Service, so that server data safety is protected, and when the active state for detecting UPS is alternating current power-up state, from
Dynamic preset key service of resuming operation, to improve degree of intelligence when server changes for power transmission.
As shown in fig. 6, the embodiment of the invention also provides the power-off protection method of a kind of electronic equipment, applied to being connected with
The electronic equipment of UPS, the process may comprise steps of:
S301 obtains the alternating current status signal that UPS is sent.
In the present embodiment, obtaining the alternating current status signal that UPS is sent is exactly the one kind detected to the working condition of UPS
Specific implementation, it is, of course, also possible to be detected in other manners to the working condition of UPS.
UPS can send different signals according to different working conditions, for example, when alternating current input is normal, UPS work
Make in normal condition, UPS can send alternating current normal signal;When alternating current power down, UPS is switched to battery power supply from city's electricity condition
State, UPS can send alternating current power-off signal;When city power recovery, UPS returns city's electricity condition from battery power switching, and UPS can be with
Send alternating current power on signal.In the embodiment of the present invention, alternating current status signal transmitted by the available UPS of server node, from
And different operations is executed according to different signals.
As a kind of optional embodiment of the embodiment of the present invention, a UPS can be disposed in every server node
Signal detection program, for detecting the alternating current status signal of UPS transmission.The working principle of the UPS signal detection program are as follows: period
Property obtain UPS transmission alternating current status signal.For example, obtaining the alternating current status signal that a UPS is sent every 1 second;Or
Person obtained the alternating current status signal that a UPS is sent every 10 seconds.It the signal acquisition period therein, can be according to server section
The actual working environment setting of point, for example, can correspondingly shorten the signal acquisition period if the storage limited energy of UPS;Such as
The key service of fruit server node operation is more, then also needs correspondingly to shorten the signal acquisition period, thus after alternating current power down,
Server node can detect power-off signal as early as possible.
As another optional embodiment of the embodiment of the present invention, in the embodiment of the present invention, UPS be can be with SNMP
The UPS of (Simple Network Management Protocol, Simple Network Management Protocol) communication protocol, server node
It can be communicated based on SNMP communication protocol with UPS, wherein SNMP communication protocol is application layer protocol, and communication bottom is real
It now can usually pass through UDP (User Datagram Protocol, User Datagram Protocol) protocol realization.
Specifically, when server node needs to obtain city's electricity condition, the request for being used to obtain alternating current status signal is sealed
Data packet is dressed up, above-mentioned data packet is then sent;After UPS receives the data packet comprising request, the content in data packet is parsed, from
And current alternating current status signal is read, and the response comprising alternating current status signal is packaged into data packet, it then retransmits and includes
The data packet of above-mentioned alternating current status signal;After server node received data packet, the content in data packet is parsed, to obtain city
Electricity condition signal.
S302, when acquired alternating current status signal is power-off signal, preset key service out of service.The present invention
In embodiment, when the alternating current status signal that server node obtains is power-off signal, show to detect that the working condition of UPS turns
Become alternating current power-down state, UPS begins to use the electric energy of itself for server node power supply.At this time although UPS can use certainly
The electric energy of body storage is server node power supply, but after power consumption of powdered is most, server node is it is possible to improper pass
Machine may cause loss of data if server node is carrying out write operation at this time.Therefore, when server node detects
It, can be with key service out of service, to avoid loss of data when active state to UPS is alternating current power-down state.
S303, when acquired alternating current status signal is power on signal, preset key service of resuming operation.
In the embodiment of the present invention, when the alternating current status signal that server node obtains is power on signal, show to detect
The active state of UPS is alternating current power-up state, and UPS returns mains-supplied from battery power switching.Server node can at this time
With preset key service of resuming operation, to restore business.Interactive process between UPS and server node is referring to Fig. 7, specifically
Are as follows: after alternating current power down, S401, UPS send power-off signal to server node;S402, server node stop preset pass
Key service;After alternating current powers on, S403, UPS send power on signal to server node;S404, server node resume operation
Preset key service.
The power-off protection method of a kind of electronic equipment provided in an embodiment of the present invention, acquired in the server node by
When the alternating current status signal that UPS is sent is power-off signal, it is preset can to stop self-operating using electric energy provided by UPS
Key service, to protect server data safety;The alternating current status signal sent by UPS acquired in the server node
When for power on signal, can resume operation preset key service automatically, become to improve server for power transmission
Degree of intelligence when change.
A kind of specific embodiment of the power-down protection apparatus of electronic equipment provided in an embodiment of the present invention is flowed with shown in Fig. 1
Journey is corresponding, and with reference to Fig. 8, Fig. 8 is a kind of structural schematic diagram of the power-down protection apparatus of the electronic equipment of the embodiment of the present invention, packet
It includes:
Detection module 501 is detected for the working condition to UPS.
First execution module 502, for stopping fortune when the active state for detecting UPS is alternating current power-down state
The preset key service of row.
Second execution module 503, for restoring fortune when the active state for detecting UPS is alternating current power-up state
The preset key service of row.
Wherein, detection module 501 are specifically used for: obtaining the alternating current status signal that UPS is sent.
First execution module 502, is specifically used for: out of service when acquired alternating current status signal is power-off signal
Preset key service.
Second execution module 503, is specifically used for: when acquired alternating current status signal is power on signal, resuming operation
Preset key service.
Wherein, detection module 501 are specifically used for: periodically acquiring the alternating current status signal of UPS transmission.
Wherein, as shown in figure 9, detection module 501 includes:
Sending submodule 5011 obtains alternating current status signal request for sending to UPS.
Receiving submodule 5012 receives the response comprising alternating current status signal that UPS is returned.
Wherein, the first execution module 502, is specifically used for:
Obtain the currently running each process of each preset key service;Obtain each process it is currently performed operation and
Data;Save the currently running each process of preset key service and the currently performed operation of each process and data;It closes
Each currently running each process of preset key service.
Wherein, the second execution module 503, is specifically used for:
Read operation and data that each process deposited executes, the operation and data that each process saved executes are as follows:
The operation and data of each preset key service;Open each process of each preset key service;It will be read each
The operation and data that a process executes are loaded onto each process, preset key service of resuming operation.
The power-down protection apparatus of a kind of electronic equipment provided in an embodiment of the present invention, when the detection module in server node
When the active state for detecting UPS is alternating current power-down state, the first execution module can utilize electric energy provided by UPS,
Stop itself running preset key service, to protect server data safety;When detection module detects the work of UPS
When being changed into alternating current power-up state as state, the second execution module can resume operation preset key service, to improve clothes
Degree of intelligence when business device changes for power transmission.
The embodiment of the invention also provides a kind of server clusters, include multiple services in the server cluster with reference to Fig. 2
Device node and more UPS, each server node connect and carry out power transmission and network interaction, each clothes with an at least UPS
Business device node, which is run, UPS status monitoring services, wherein UPS status monitoring services are for executing as shown in Figure 1, Figure 2 shown in -7
The power-off protection method of electronic equipment.
Optionally, network interaction can be connected with each other and carried out between each server node, and multiple server nodes include extremely
Few 1 primary server joint and from server node, can be one or more from server node.
Wherein, primary server joint is issued to for obtaining the identification parameter of UPS, and by identification parameter from server section
Point, for example, the identification parameters such as IP address and the port numbers of UPS can be obtained from the UPS connecting with primary server joint, so
Identification parameter is handed down to respectively from server afterwards, it, can be by being run after receiving above-mentioned identification parameter from server node
The corresponding UPS of UPS status monitoring services identification parameter.
Optionally, each server node in server cluster specifically can be used for sending by snmp protocol to UPS
Obtain alternating current status signal request.
UPS, which can be used for receiving by SNMP, obtains alternating current status signal request, and returning to server node includes city
The response of electricity condition signal.
Each server node specifically for receiving the response comprising alternating current status signal, and is taken by UPS status monitoring
Business obtains the alternating current status signal in response.
Communication process between above-mentioned server node and UPS is identical as embodiment illustrated in fig. 6 of the present invention, no longer superfluous herein
It states.
Optionally, server node is specifically used for:
When city's electricity condition of acquisition is power-down state, the UPS status monitoring services run in server node are monitored
Alternating current power down, UPS status monitoring services close the preset key service of server node operation;When city's electricity condition of acquisition is
When power-up state, the UPS status monitoring services run in server node monitor that alternating current powers on, and UPS status monitoring services are extensive
Multiple preset key service.
When the UPS status monitoring services run in server node monitor that alternating current power down or alternating current power on, Ke Yiguan
Close or restore the preset key service of server node operation, it is specific close or recovery process and Fig. 3 of the present invention and Fig. 4 shown in
Embodiment is identical, and details are not described herein.
A kind of server cluster provided in an embodiment of the present invention, when the UPS status monitoring services inspection of server node operation
When the active state for measuring UPS is alternating current power-down state, it can stop itself using electric energy provided by UPS and be run
Preset key service, to protect server data safety;When the active state for measuring UPS is alternating current power-up state
When, can resume operation preset key service, to improve degree of intelligence when server changes for power transmission.
The embodiment of the invention also provides a kind of servers, and as shown in Figure 10, which includes 601 He of processor
Machine readable storage medium 602, machine readable storage medium are stored with the machine-executable instruction that can be executed by processor, place
Reason device is promoted to perform the steps of by machine-executable instruction
The working condition of UPS is detected;
When the active state for detecting UPS is alternating current power-down state, preset key service out of service;
When the active state for detecting UPS is alternating current power-up state, preset key service of resuming operation.
A kind of server provided in an embodiment of the present invention, when server detects that the active state of UPS falls for alternating current
When electricity condition, it can stop itself running preset key service, to protect server using electric energy provided by UPS
Information Security, and when the active state for detecting UPS is alternating current power-up state, can resume operation preset key
Service improves degree of intelligence when server changes for power transmission.
The machine readable storage medium that above-mentioned server is mentioned may include random access memory (Random Access
Memory, abbreviation RAM), it also may include nonvolatile memory (non-volatile memory), for example, at least a magnetic
Disk storage.Optionally, memory can also be that at least one is located remotely from the storage device of aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
Abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor
(Digital Signal Processing, abbreviation DSP), specific integrated circuit (Application Specific
Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array,
Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
The embodiment of the invention also provides a kind of computer readable storage medium, it is stored in computer readable storage medium
Computer program, to execute following steps:
The working condition of UPS is detected;
When the active state for detecting UPS is alternating current power-down state, preset key service out of service;
When the active state for detecting UPS is alternating current power-up state, preset key service of resuming operation.
A kind of computer readable storage medium provided in an embodiment of the present invention, when the active state for detecting UPS is
When alternating current power-down state, it can stop itself running preset key service, to protect using electric energy provided by UPS
Server data safety, and when the active state for detecting UPS is alternating current power-up state, it can resume operation default
Key service, improve server for power transmission change when degree of intelligence.
For device/server/storage medium embodiment, since it is substantially similar to the method embodiment, so retouching
That states is fairly simple, and the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that the device of the embodiment of the present invention, server and storage medium are set using above-mentioned electronics respectively
Device, server and the storage medium of standby power-off protection method, then all realities of the power-off protection method of above-mentioned electronic equipment
It applies example and is suitable for the device, server and storage medium, and can reach the same or similar beneficial effect.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (16)
1. the power-off protection method of a kind of electronic equipment, which is characterized in that set applied to the electronics for being connected with uninterruptible power supply UPS
It is standby, which comprises
The working condition of the UPS is detected;
When the active state for detecting UPS is alternating current power-down state, preset key service out of service;
When the active state for detecting UPS is alternating current power-up state, the preset key service of resuming operation.
2. the power-off protection method of electronic equipment according to claim 1, which is characterized in that the work to the UPS
The step of being detected as state, comprising: obtain the alternating current status signal that UPS is sent;
It is described when detect UPS active state be alternating current power-down state when, the step of preset key service out of service
Suddenly, comprising: when acquired alternating current status signal is power-off signal, preset key service out of service;
It is described when detect UPS active state be alternating current power-up state when, the preset key service of resuming operation
The step of, comprising: when acquired alternating current status signal is power on signal, the preset key service of resuming operation.
3. the power-off protection method of electronic equipment according to claim 2, which is characterized in that described to obtain what UPS was sent
Alternating current status signal, comprising:
Periodically acquire the alternating current status signal of UPS transmission.
4. the power-off protection method of electronic equipment according to claim 1, which is characterized in that described out of service preset
Key service, comprising:
Obtain each preset currently running each process of key service;
Obtain the currently performed operation of each process and data;
Save the currently running each process of the preset key service and the currently performed operation of each process and data;
Close each preset currently running each process of key service.
5. the power-off protection method of electronic equipment according to claim 1, which is characterized in that it is described resume operation it is described pre-
If key service the step of, comprising:
Read operation and data that each process saved executes, the operation and data that saved each process executes
Are as follows: the operation and data of each preset key service;
Start each process of each preset key service;
The operation of read each process execution and data are loaded onto each process, the preset key of resuming operation
Service.
6. the power-down protection apparatus of a kind of electronic equipment, which is characterized in that set applied to the electronics for being connected with uninterruptible power supply UPS
Standby, described device includes:
Detection module is detected for the working condition to the UPS;
First execution module, for when detect UPS active state be alternating current power-down state when, it is out of service preset
Key service;
Second execution module, for resuming operation described pre- when the active state for detecting UPS is alternating current power-up state
If key service.
7. the power-down protection apparatus of electronic equipment according to claim 6, which is characterized in that the detection module, specifically
For: obtain the alternating current status signal of UPS transmission;
First execution module, is specifically used for: out of service default when acquired alternating current status signal is power-off signal
Key service;
Second execution module, is specifically used for: when acquired alternating current status signal is power on signal, resuming operation described default
Key service.
8. the power-down protection apparatus of electronic equipment according to claim 6, which is characterized in that the detection module, specifically
For: periodically acquire the alternating current status signal of UPS transmission.
9. the power-down protection apparatus of electronic equipment according to claim 6, which is characterized in that first execution module,
It is specifically used for:
Obtain each preset currently running each process of key service;
Obtain the currently performed operation of each process and data;
Save the currently running each process of the preset key service and the currently performed operation of each process and data;
Close each preset currently running each process of key service.
10. the power-down protection apparatus of electronic equipment according to claim 6, which is characterized in that second execution module,
It is specifically used for:
Read operation and data that each process saved executes, the operation and data that saved each process executes
Are as follows: the operation and data of each preset key service;
Open each process of each preset key service;
The operation of read each process execution and data are loaded onto each process, the preset key of resuming operation
Service.
11. a kind of server cluster, which is characterized in that include in the server cluster multiple server nodes and more not between
Power-off source UPS, each server node connect and carry out power transmission and network interaction, each service with an at least UPS
Device node, which is run, UPS status monitoring services, and the UPS status monitoring services are as claimed in claims 1-5 for executing
The power-off protection method of electronic equipment.
12. server cluster according to claim 11, which is characterized in that be connected with each other and carry out between each server node
Network interaction, the multiple server node include at least one primary server joint and from server node;
The primary server joint is issued to for obtaining the identification parameter of UPS, and by the identification parameter from server section
Point;
It is described from server node, for identifying that the identification parameter is corresponding by run UPS status monitoring services
UPS;The identification parameter includes: the internet protocol address and port numbers of UPS.
13. server cluster according to claim 11, which is characterized in that each server in the server cluster
Node is specifically used for sending acquisition alternating current status signal request to UPS by Simple Network Management Protocol SNMP;
The UPS, for receiving the acquisition alternating current status signal request by SNMP, and returning to server node includes city
The response of electricity condition signal;
Each server node specifically for receiving the response comprising alternating current status signal, and is taken by UPS status monitoring
Business obtains the alternating current status signal in the response.
14. server cluster according to claim 13, which is characterized in that the server node is specifically used for:
When city's electricity condition of acquisition is power-down state, the UPS status monitoring services run in the server node are monitored
Alternating current power down, the UPS status monitoring services close the preset key service of server node operation;
When city's electricity condition of acquisition is power-up state, the UPS status monitoring services run in the server node are monitored
Alternating current powers on, and the UPS status monitoring services restore preset key service.
15. a kind of server, which is characterized in that including processor and machine readable storage medium, the machine readable storage is situated between
Matter is stored with the machine-executable instruction that can be executed by the processor, and the processor is promoted by the machine-executable instruction
Make: realizing the described in any item method and steps of claim 1-5.
16. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-5 described in any item method and steps when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810432289.2A CN110456897A (en) | 2018-05-08 | 2018-05-08 | Power-off protection method, protective device and the server cluster of electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810432289.2A CN110456897A (en) | 2018-05-08 | 2018-05-08 | Power-off protection method, protective device and the server cluster of electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110456897A true CN110456897A (en) | 2019-11-15 |
Family
ID=68480470
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810432289.2A Pending CN110456897A (en) | 2018-05-08 | 2018-05-08 | Power-off protection method, protective device and the server cluster of electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110456897A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114564096A (en) * | 2022-02-28 | 2022-05-31 | 苏州浪潮智能科技有限公司 | Control method and system for standby power protection and related components |
TWI783410B (en) * | 2021-03-16 | 2022-11-11 | 瑞昱半導體股份有限公司 | Electronic device and hibernation recovery method thereof |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553297A (en) * | 2003-06-03 | 2004-12-08 | 大众电脑股份有限公司 | Data processing method and processor with state recovering function |
CN101183801A (en) * | 2007-12-07 | 2008-05-21 | 杭州华三通信技术有限公司 | Power-off protection method, system and device |
CN103921446A (en) * | 2014-05-07 | 2014-07-16 | 磐纹科技(上海)有限公司 | 3D printer capable of printing continuously at outage and method for controlling 3D printer to continue printing at outage |
CN104090527A (en) * | 2014-07-01 | 2014-10-08 | 深圳市英威腾电气股份有限公司 | Power-down protection device |
CN104238714A (en) * | 2013-06-09 | 2014-12-24 | 上海梅山钢铁股份有限公司 | Method for protecting computer systems after outage of uninterrupted power supply (UPS) |
CN204649940U (en) * | 2015-05-19 | 2015-09-16 | 上海航天有线电厂有限公司 | A kind of fault moment of Modular UPS records wave system system in real time |
CN105224477A (en) * | 2015-09-25 | 2016-01-06 | 浪潮电子信息产业股份有限公司 | Data protection method for storage system after abnormal power failure |
CN105739665A (en) * | 2016-01-26 | 2016-07-06 | 西安电子科技大学 | UPS (Uninterrupted Power Supply) monitoring management method |
CN107196404A (en) * | 2017-06-08 | 2017-09-22 | 许继电源有限公司 | A kind of UPS devices and its power supply method for handover control |
CN107544655A (en) * | 2016-09-30 | 2018-01-05 | 河南众联云科工程技术有限公司 | Computer system protection method after UPS power-off |
-
2018
- 2018-05-08 CN CN201810432289.2A patent/CN110456897A/en active Pending
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1553297A (en) * | 2003-06-03 | 2004-12-08 | 大众电脑股份有限公司 | Data processing method and processor with state recovering function |
CN101183801A (en) * | 2007-12-07 | 2008-05-21 | 杭州华三通信技术有限公司 | Power-off protection method, system and device |
CN104238714A (en) * | 2013-06-09 | 2014-12-24 | 上海梅山钢铁股份有限公司 | Method for protecting computer systems after outage of uninterrupted power supply (UPS) |
CN103921446A (en) * | 2014-05-07 | 2014-07-16 | 磐纹科技(上海)有限公司 | 3D printer capable of printing continuously at outage and method for controlling 3D printer to continue printing at outage |
CN104090527A (en) * | 2014-07-01 | 2014-10-08 | 深圳市英威腾电气股份有限公司 | Power-down protection device |
CN204649940U (en) * | 2015-05-19 | 2015-09-16 | 上海航天有线电厂有限公司 | A kind of fault moment of Modular UPS records wave system system in real time |
CN105224477A (en) * | 2015-09-25 | 2016-01-06 | 浪潮电子信息产业股份有限公司 | Data protection method for storage system after abnormal power failure |
CN105739665A (en) * | 2016-01-26 | 2016-07-06 | 西安电子科技大学 | UPS (Uninterrupted Power Supply) monitoring management method |
CN107544655A (en) * | 2016-09-30 | 2018-01-05 | 河南众联云科工程技术有限公司 | Computer system protection method after UPS power-off |
CN107196404A (en) * | 2017-06-08 | 2017-09-22 | 许继电源有限公司 | A kind of UPS devices and its power supply method for handover control |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI783410B (en) * | 2021-03-16 | 2022-11-11 | 瑞昱半導體股份有限公司 | Electronic device and hibernation recovery method thereof |
CN114564096A (en) * | 2022-02-28 | 2022-05-31 | 苏州浪潮智能科技有限公司 | Control method and system for standby power protection and related components |
CN114564096B (en) * | 2022-02-28 | 2023-08-22 | 苏州浪潮智能科技有限公司 | Control method and system for standby power protection and related components |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10649512B2 (en) | High efficient battery backup system | |
US10416202B1 (en) | Power management system | |
CN1770707B (en) | Apparatus and method for quorum-based power-down of unresponsive servers in a computer cluster | |
TWI571741B (en) | Server systems and methods for enhancing memory fault tolerance and non-transitory computer readable storage mediums thereof | |
TWI612415B (en) | System and management method of server and computer-readable storage medium | |
CN101542444B (en) | Security features in interconnect centric architectures | |
CN108369544A (en) | The server delayed in computing system restores | |
US10317985B2 (en) | Shutdown of computing devices | |
CN110456897A (en) | Power-off protection method, protective device and the server cluster of electronic equipment | |
CN108897646A (en) | A kind of switching method and baseboard management controller of BIOS chip | |
CN113965576A (en) | Container-based big data acquisition method and device, storage medium and equipment | |
CN108449225B (en) | System and method for determining and repairing network connection problems | |
US8533528B2 (en) | Fault tolerant power sequencer | |
CN109412819A (en) | Method and device for warning device power down | |
CN107948018A (en) | A kind of method and system that can detect mains failure and realize server soft-off | |
US20230359514A1 (en) | Operation-based event suppression | |
CN103716377B (en) | A kind of method and smart card for realizing UPS remote monitorings | |
Gautam et al. | A novel approach of fault management and restoration of network services in IoT cluster to ensure disaster readiness | |
Sun et al. | Modelling and evaluating a high serviceability fault tolerance strategy in cloud computing environments | |
CN113839961B (en) | Method and apparatus for controlling gateway device, and computer-readable storage medium | |
JP2017521802A (en) | Architecture for correlation events for supercomputer monitoring | |
CN108429644A (en) | network device management method, device and server | |
CN111934909B (en) | Main-standby machine IP resource switching method, device, computer equipment and storage medium | |
CN203084736U (en) | Computer network safety control system | |
US20210157384A1 (en) | Assigning power sources |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191115 |