CN114784950A - Server control method and device based on UPS power supply - Google Patents
Server control method and device based on UPS power supply Download PDFInfo
- Publication number
- CN114784950A CN114784950A CN202210484632.4A CN202210484632A CN114784950A CN 114784950 A CN114784950 A CN 114784950A CN 202210484632 A CN202210484632 A CN 202210484632A CN 114784950 A CN114784950 A CN 114784950A
- Authority
- CN
- China
- Prior art keywords
- time
- power
- servers
- ups
- real
- 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
Images
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J9/00—Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting
- H02J9/04—Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source
- H02J9/06—Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems
- H02J9/061—Circuit arrangements for emergency or stand-by power supply, e.g. for emergency lighting in which the distribution system is disconnected from the normal source and connected to a standby source with automatic change-over, e.g. UPS systems for DC powered loads
Abstract
The invention provides a server control method and a device based on UPS power supply, wherein the method comprises the following steps: acquiring battery information of a UPS battery and real-time power consumption data of all servers in real time; calculating the control output power of the UPS battery according to the battery information, and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all the servers; wherein the real-time power consumption data comprises power of a server; and when the power supply available time is less than the preset time, closing the plurality of servers according to the priority of the servers, so that the total power of the power connection servers is less than the control output power. Compared with the prior art, the UPS power supply time is calculated according to the UPS battery information and the real-time power consumption data of the server, so that the overall control of the server is realized, the operation efficiency of the server is improved globally, the maximum power supply time of the UPS is considered, and meanwhile the service processing efficiency of the server is considered.
Description
Technical Field
The invention relates to the field of server power supply, in particular to a server control method and device based on UPS power supply.
Background
When the power supply of the machine room fails, the machine room is usually switched to a standby UPS. In order to ensure the operation of important services and prolong the power supply time of the UPS as far as possible, some non-important equipment is shut down. In the prior art, the power supply time of the UPS is prolonged by manually shutting down non-important servers through scripts or people and operating the servers as few as possible. However, there is no better data basis for how many servers are turned off, how long the UPS remaining power can supply power. Therefore, in the prior art, too many servers may be turned off to cause low operation efficiency of the machine room, or too few servers may be turned off to cause insufficient power supply time of the UPS of the servers, so that unreasonable power supply control of the servers causes low overall operation efficiency of the servers of the machine room.
Disclosure of Invention
The invention provides a server control method and device based on UPS power supply, which improve the overall operation efficiency of multiple servers.
In order to solve the above technical problem, an embodiment of the present invention provides a server control method based on UPS power supply, including:
acquiring battery information of a UPS battery and real-time power consumption data of all servers in real time;
calculating the control output power of the UPS battery according to the battery information, and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all the servers; wherein the real-time power consumption data comprises power of a server;
and when the power supply available time is less than the preset time, closing the plurality of servers according to the priority of the servers, so that the total power of the power connection servers is less than the control output power.
As a preferred scheme, the calculating the control output power of the UPS battery according to the battery information specifically includes:
the battery information comprises the current output power, the remaining power supply time and the power factor of the UPS battery; wherein the remaining power supply time corresponds to the current output power;
calculating the residual capacity of the UPS battery according to the residual power supply time and the current output power;
and calculating the control output power according to the residual electric quantity and the power factor and by combining the preset time.
As a preferred scheme, the calculating the available power supply time of the UPS battery according to the real-time power consumption data of all the servers specifically includes:
calculating the overall total power consumption data of the server according to the real-time power consumption data of all the servers, converting the total power consumption data into time data, and determining the power supply available time of the UPS battery according to the time data.
As a preferred scheme, the turning off the servers according to the priorities of the servers so that the total power of the powered servers is smaller than the control output power specifically comprises:
all servers divide priority order according to the type and importance of the service;
and sequentially closing the servers according to the sequence from low priority to high priority so that the total power of the power-on servers is smaller than the control output power.
As a preferred scheme, the obtaining of the battery information of the UPS battery and the real-time power consumption data of all servers in real time specifically includes;
battery information of the UPS battery is inquired in real time through a UPS protocol;
respectively acquiring real-time power consumption data of each server in real time based on an out-of-band protocol of each server; wherein the protocol comprises ssh, http, ipmi, snmp.
Correspondingly, the embodiment of the invention provides a server control device based on UPS power supply, which comprises an acquisition module, a calculation module and a control module; wherein, the first and the second end of the pipe are connected with each other,
the acquisition module is used for acquiring battery information of the UPS battery and real-time power consumption data of all the servers in real time;
the calculation module is used for calculating the control output power of the UPS battery according to the battery information and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all the servers; wherein the real-time power consumption data comprises power of a server;
and when the power supply available time is less than the preset time, the control module is used for closing the plurality of servers according to the priorities of the servers, so that the total power of the power-connected servers is less than the control output power.
As a preferred scheme, the calculating module calculates the control output power of the UPS battery according to the battery information, specifically:
the battery information comprises the current output power, the remaining power supply time and the power factor of the UPS battery; wherein the remaining power supply time corresponds to the current output power;
the calculation module calculates the residual capacity of the UPS battery according to the residual power supply time and the current output power;
and calculating the control output power according to the residual electric quantity and the power factor and by combining the preset time.
As a preferred scheme, the calculating module calculates the available power supply time of the UPS battery according to the real-time power consumption data of all servers, specifically:
the calculation module calculates the overall total power consumption data of the server according to the real-time power consumption data of all the servers, converts the total power consumption data into time data, and determines the power supply available time of the UPS battery according to the time data.
As a preferred scheme, the control module closes a plurality of servers according to priorities of the servers, so that the total power of the power-connected servers is smaller than the control output power, specifically:
all servers divide priority order according to the type and importance of the service;
and the control module sequentially closes the servers according to the sequence of the priority levels from low to high so that the total power of the power-connected servers is smaller than the control output power.
As a preferred scheme, the acquisition module acquires battery information of the UPS battery and real-time power consumption data of all servers in real time, specifically;
the acquisition module queries the battery information of the UPS battery in real time through a UPS protocol;
respectively acquiring real-time power consumption data of each server in real time based on a protocol out of a band of each server; wherein the protocol comprises ssh, http, ipmi, snmp.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a server control method and a device based on UPS power supply, wherein the method comprises the following steps: acquiring battery information of a UPS battery and real-time power consumption data of all servers in real time; calculating the control output power of the UPS battery according to the battery information, and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all the servers; wherein the real-time power consumption data comprises power of a server; and when the power supply available time is less than the preset time, closing the plurality of servers according to the priority of the servers, so that the total power of the power-connected servers is less than the control output power. Compared with the prior art, the UPS power supply time is calculated according to the UPS battery information and the real-time power consumption data of the server, so that the overall control of the server is realized, the operation efficiency of the server is improved globally, the maximum power supply time of the UPS is considered, and meanwhile the service processing efficiency of the server is considered.
Drawings
FIG. 1: the present invention provides a flow chart of an embodiment of a method for controlling a server based on UPS power supply.
FIG. 2: the invention provides a schematic structural diagram of an embodiment of a server control device based on UPS power supply.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments of the present invention, are within the scope of protection of the present invention.
The first embodiment is as follows:
referring to fig. 1, fig. 1 shows a UPS-based server control method according to an embodiment of the present invention, including steps S1 to S3, wherein,
and step S1, acquiring battery information of the UPS battery and real-time power consumption data of all servers in real time.
Specifically, in this embodiment, through a protocol that the UPS itself passes, battery information of the battery of the UPS may be queried, where the battery information includes a current output power, a remaining power supply time, and a power factor of the battery of the UPS, where the remaining power supply time is a remaining time used by the battery of the UPS under the current power.
Meanwhile, the real-time power consumption data of each server are respectively acquired in real time through the out-of-band protocol of each server. The servers may have interfaces for providing power consumption data to the outside, and different servers may provide data via different protocols, including but not limited to ssh, http, ipmi, snmp, etc. Therefore, according to each server, the power consumption data of each server can be respectively obtained by using the corresponding protocol.
Step S2, calculating the control output power of the UPS battery according to the battery information, and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all servers; wherein the real-time power consumption data comprises power of a server.
In this embodiment, the calculating the control output power of the UPS battery according to the battery information specifically includes:
calculating the residual capacity of the UPS battery according to the residual power supply time and the current output power, and then: and the UPS residual capacity (kw) is equal to the UPS residual power supply time (hour) multiplied by the current output total power (kw/h).
Further, according to the remaining capacity and the power factor, in combination with a preset time, calculating the control power, specifically: controlling the output power (kw/h) to be UPS remaining capacity (kv) x power factor/preset time (h).
In this embodiment, the preset time is determined according to an actual application scenario. When using a UPS battery, it is generally planned to restore the power supply time or the latest time that the server needs to work. When performing circuit repair, it is typically determined that circuit repair is performed within a certain period of time, for example, at 9: 00-12: and 00 time. The preset time is three hours. Alternatively, the server is assigned explicit work tasks, from 9: 00, it needs to be calculated at 12: the job task is completed before 00 hours, and the preset time is three hours.
And step S3, when the power supply available time is less than the preset time, closing a plurality of servers according to the priority of the servers, so that the total power of the power-connected servers is less than the control output power.
In this embodiment, when the available power time is less than the preset time, that is, the power of the UPS battery is not sufficient to enable the server to continuously operate to the target time, a part of the servers needs to be shut down. Different servers are usually allocated with different work tasks, the different work tasks have different importance, and the values of the different servers may be different, so that the priorities of the servers can be divided according to any standard or a combination of at least two standards. The criteria may be, for example, the value of the server, the importance of the work task, the importance of the server, the value of the server, the operating power of the server, etc. The present embodiment preferably prioritizes the servers according to the service types and the importance, and sequentially turns off the servers according to the priority from low to high, so that the total power of the powered-on servers (the servers connected to the UPS battery and in the running state) is smaller than the control output power.
And when the power supply time is more than or equal to the preset time, the electric quantity of the UPS battery can ensure that the power is continuously output until the server finishes working or recovers normal power supply, and the server does not need to be controlled. By implementing the embodiment of the application, besides providing a server control method based on UPS power supply, a determination method is provided, that is, it is possible to determine whether the UPS battery can be continuously output to the preset time by acquiring information such as the electric quantity of the UPS battery and combining energy consumption data (not limited to one type of server) of each server. In practical application, the server may be allocated to different tasks, and the different tasks are difficult to process, so that different computing resources may be occupied, and the energy consumption data of the server may change correspondingly, so that the power supply available time of the UPS battery is affected.
Correspondingly, referring to fig. 2, an embodiment of the present invention provides a server control apparatus based on UPS power supply, including an obtaining module 101, a calculating module 102, and a control module 103; wherein the content of the first and second substances,
the acquisition module 101 is used for acquiring battery information of the UPS battery and real-time power consumption data of all servers in real time;
the calculating module 102 is configured to calculate a control output power of the UPS battery according to the battery information, and calculate a power available time of the UPS battery according to real-time power consumption data of all servers; wherein the real-time power consumption data comprises power of a server;
when the power supply available time is less than the preset time, the control module 103 is configured to close the plurality of servers according to the priorities of the servers, so that the total power of the powered servers is less than the control output power.
In this embodiment, the calculating module 102 calculates the control output power of the UPS battery according to the battery information, specifically:
the battery information comprises the current output power, the remaining power supply time and the power factor of the UPS battery; wherein the remaining power supply time corresponds to the current output power;
the calculation module 102 calculates the remaining power of the UPS battery according to the remaining power supply time and the current output power;
and calculating the control output power according to the residual electric quantity and the power factor and by combining the preset time.
In this embodiment, the calculating module 102 calculates the available power supply time of the UPS battery according to the real-time power consumption data of all the servers, specifically:
the calculation module 102 calculates total power consumption data of the whole server according to the real-time power consumption data of all the servers, converts the total power consumption data into time data, and determines the power supply available time of the UPS battery according to the time data.
In this embodiment, the control module 103 closes a plurality of servers according to priorities of the servers, so that a total power of the powered servers is smaller than the control output power, specifically:
all servers divide priority order according to the type and importance of the service;
the control module 103 sequentially closes the plurality of servers according to the sequence from low priority to high priority, so that the total power of the power-connected servers is smaller than the control output power.
In this embodiment, the obtaining module 101 obtains, in real time, battery information of a UPS battery and real-time power consumption data of all servers, specifically;
the acquisition module 101 queries battery information of the UPS battery in real time through a UPS protocol;
respectively acquiring real-time power consumption data of each server in real time based on an out-of-band protocol of each server; wherein the protocol comprises ssh, http, ipmi, snmp.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a server control method and a device based on UPS power supply, wherein the method comprises the following steps: acquiring battery information of a UPS battery and real-time power consumption data of all servers in real time; calculating the control output power of the UPS battery according to the battery information, and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all the servers; wherein the real-time power consumption data comprises power of a server; and when the power supply available time is less than the preset time, closing the plurality of servers according to the priority of the servers, so that the total power of the power connection servers is less than the control output power. Compared with the prior art, the UPS power supply time is calculated according to the UPS battery information and the real-time power consumption data of the server, so that the overall control of the server is realized, the operation efficiency of the server is improved globally, the maximum power supply time of the UPS is considered, and meanwhile the service processing efficiency of the server is considered.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and are not intended to limit the scope of the present invention. It should be understood that any modifications, equivalents, improvements and the like, which come within the spirit and principle of the invention, may occur to those skilled in the art and are intended to be included within the scope of the invention.
Claims (10)
1. A server control method based on UPS power supply is characterized by comprising the following steps:
acquiring battery information of a UPS battery and real-time power consumption data of all servers in real time;
calculating the control output power of the UPS battery according to the battery information, and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all the servers; wherein the real-time power consumption data comprises power of a server;
and when the power supply available time is less than the preset time, closing the plurality of servers according to the priority of the servers, so that the total power of the power-connected servers is less than the control output power.
2. The method according to claim 1, wherein the calculating, according to the battery information, the control output power of the UPS battery includes:
the battery information comprises the current output power, the remaining power supply time and the power factor of the UPS battery; wherein the remaining power supply time corresponds to the current output power;
calculating the residual capacity of the UPS battery according to the residual power supply time and the current output power;
and calculating the control output power according to the residual electric quantity and the power factor and by combining the preset time.
3. The method according to claim 1, wherein the calculating of the available power time of the UPS battery according to the real-time power consumption data of all servers is specifically:
calculating the overall total power consumption data of the servers according to the real-time power consumption data of all the servers, converting the total power consumption data into time data, and determining the power supply available time of the UPS battery according to the time data.
4. The method according to claim 1, wherein the powering down of the servers according to the priority of the servers is performed such that the total power of the powered-on servers is smaller than the control output power, and specifically:
all servers divide priority order according to the type and importance of the service;
and sequentially closing the servers according to the sequence of the priority levels from low to high so that the total power of the power-on servers is smaller than the control output power.
5. The method for controlling the server according to any one of claims 1 to 4, wherein the battery information of the UPS battery and the real-time power consumption data of all the servers are obtained in real time, specifically;
battery information of the UPS battery is inquired in real time through a UPS protocol;
respectively acquiring real-time power consumption data of each server in real time based on a protocol out of a band of each server; wherein the protocol comprises ssh, http, ipmi, snmp.
6. A server control device based on UPS power supply is characterized by comprising an acquisition module, a calculation module and a control module; wherein, the first and the second end of the pipe are connected with each other,
the acquisition module is used for acquiring battery information of the UPS battery and real-time power consumption data of all the servers in real time;
the calculation module is used for calculating the control output power of the UPS battery according to the battery information and calculating the power supply available time of the UPS battery according to the real-time power consumption data of all the servers; wherein the real-time power consumption data comprises power of a server;
and when the power supply available time is less than the preset time, the control module is used for closing the servers according to the priorities of the servers, so that the total power of the power connection servers is less than the control output power.
7. The apparatus according to claim 6, wherein the calculating module calculates the control output power of the UPS battery according to the battery information, specifically:
the battery information comprises the current output power, the remaining power supply time and the power factor of the UPS battery; wherein the remaining power supply time corresponds to the current output power;
the calculation module calculates the residual capacity of the UPS battery according to the residual power supply time and the current output power;
and calculating the control output power according to the residual electric quantity and the power factor and by combining the preset time.
8. The device according to claim 6, wherein the calculating module calculates the available power time of the UPS battery according to the real-time power consumption data of all servers, specifically:
the calculation module calculates the overall total power consumption data of the server according to the real-time power consumption data of all the servers, converts the total power consumption data into time data, and determines the power supply available time of the UPS battery according to the time data.
9. The UPS-based server control device as claimed in claim 6, wherein the control module shuts down the servers according to the priorities of the servers so that the total power of the powered servers is less than the control output power, specifically:
all servers divide priority order according to the type and importance of the service;
the control module closes the plurality of servers in sequence according to the sequence of the priority from low to high, so that the total power of the power-connected servers is smaller than the control output power.
10. The device according to any one of claims 6 to 9, wherein the obtaining module obtains battery information of a battery of the UPS and real-time power consumption data of all servers in real time, specifically;
the acquisition module queries the battery information of the UPS battery in real time through a UPS protocol;
respectively acquiring real-time power consumption data of each server in real time based on a protocol out of a band of each server; wherein the protocol comprises ssh, http, ipmi, snmp.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210484632.4A CN114784950A (en) | 2022-05-05 | 2022-05-05 | Server control method and device based on UPS power supply |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210484632.4A CN114784950A (en) | 2022-05-05 | 2022-05-05 | Server control method and device based on UPS power supply |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114784950A true CN114784950A (en) | 2022-07-22 |
Family
ID=82435282
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210484632.4A Pending CN114784950A (en) | 2022-05-05 | 2022-05-05 | Server control method and device based on UPS power supply |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114784950A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115877254A (en) * | 2023-03-03 | 2023-03-31 | 樊氏科技发展股份有限公司 | UPS running state online self-checking system |
CN117435442A (en) * | 2023-12-21 | 2024-01-23 | 石家庄学院 | Automatic matching monitoring method and system for online computer resources and computing UPS |
-
2022
- 2022-05-05 CN CN202210484632.4A patent/CN114784950A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115877254A (en) * | 2023-03-03 | 2023-03-31 | 樊氏科技发展股份有限公司 | UPS running state online self-checking system |
CN117435442A (en) * | 2023-12-21 | 2024-01-23 | 石家庄学院 | Automatic matching monitoring method and system for online computer resources and computing UPS |
CN117435442B (en) * | 2023-12-21 | 2024-03-12 | 石家庄学院 | Automatic matching monitoring method and system for online computer resources and computing UPS |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114784950A (en) | Server control method and device based on UPS power supply | |
US8473768B2 (en) | Power control apparatus and method for cluster system | |
CN103188277B (en) | load energy consumption management system, method and server | |
US8648607B2 (en) | Monitoring power usage | |
CN108521837B (en) | Micro-energy acquisition-based power supply management method and device and micro-energy power supply | |
CN105098965A (en) | Servo system and power supply switching method thereof | |
WO2015123071A1 (en) | Backup power management for computing systems | |
RU2669004C2 (en) | Method and apparatus for controlling direct-current voltage | |
CN108667135B (en) | Method and device for realizing power dispatching | |
CN109683550B (en) | Control method of startup and shutdown system | |
WO2016197856A2 (en) | Method and device for managing active ethernet terminal power source | |
WO2019080807A1 (en) | Method and system for managing energy supply device, and terminal device | |
CN115115133B (en) | Parallel operation control method and device of generator and computer program product | |
CN106708668A (en) | BBU accumulator mode switching method based on Rack machine cabinet | |
CN112214303A (en) | Kubernetes cluster automatic scaling system | |
CN116027868A (en) | Heat dissipation control method and device of server, storage medium and electronic device | |
CN106951060B (en) | Control method and device and electronic equipment | |
CN103338257B (en) | Management control method of electrical power units of multimedia conference | |
US9812899B2 (en) | Method for automatically strengthening energy-saving and electrical safety | |
CN113378393A (en) | Server product reliability test method and device | |
EP3190518A1 (en) | Method and apparatus for acquiring power consumption of network element device | |
CN109391027B (en) | Energy-saving control method for power supply system of data center and terminal equipment | |
RU2813336C2 (en) | Power source hibernation method and device, method and device for power source hibernation and hibernation apparatus | |
Wong et al. | A retrospective look back on the road towards energy proportionality | |
Tang et al. | Closed-loop power-control governor for multimedia mobile devices |
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 |