Disclosure of Invention
In order to solve the problem that the prior art can not quickly and effectively test the power supply of the server, the invention provides an automatic power supply test system and a method, and the specific technical scheme is as follows:
the utility model provides an automatic test system of power, includes computer and server, be provided with a plurality of redundant power supplies in the server, automatic test system of power still includes the multi-channel relay module, the computer is connected with the input electricity of multi-channel relay module, the output of multi-channel relay module is connected with a plurality of redundant power supplies one-to-one in the server, the computer includes control module and collection module, control module is used for generating test instruction and test time, and collection module is used for receiving test instruction and the test time that control module generated and through controlling one or the multichannel break-make in the multi-channel relay module so that the power in the server carries out the break-make test according to test instruction and test time.
Optionally, the computer further includes a sending module, the server further includes a testing module, the sending module is configured to generate and send a power-on instruction and a power-off instruction to the testing module, and the testing module is configured to control the server to perform power-on and power-off operations according to the power-on instruction and the power-off instruction, respectively.
Optionally, the test module is further configured to send a test success result to the computer when the running time of the server after the boot operation according to the boot instruction reaches a preset time threshold.
Optionally, the computer further includes a receiving module, where the receiving module is configured to receive a test success result sent by the server.
Optionally, when the receiving module receives a successful test result sent by the server, the sending module sends a shutdown instruction to the testing module.
Optionally, the test module is further configured to generate boot information and send the boot information to the computer after controlling the server to perform boot operation according to the boot instruction.
Optionally, the computer further includes a judging module, where the judging module is configured to receive the boot information generated by the testing module and judge whether the server completes the boot operation, and when the server does not complete the boot operation, the judging module generates a boot failure result.
Optionally, the computer further includes a recording module, and the recording module is configured to record a boot failure result.
Correspondingly, the invention also provides an automatic power supply testing method, which comprises a computer, a server and a multi-path relay module, wherein a plurality of redundant power supplies are arranged in the server, the computer is electrically connected with the input end of the multi-path relay module, the output end of the multi-path relay module is correspondingly connected with the plurality of redundant power supplies in the server one by one, and the method comprises the following steps:
step 1, a computer controls one path or multiple paths of a multi-path relay module to be switched on and off according to a generated test instruction and test time so that a power supply in a server sends a starting instruction to the server while the power supply in the server is subjected to on-off test according to the test instruction and the test time;
step 2, the server carries out starting operation according to the starting instruction, and when the running time reaches a preset time threshold value, a successful test result is sent to the computer;
step 3, the computer receives the successful test result and sends a shutdown instruction to the server;
and 4, the server receives the shutdown instruction and performs shutdown operation according to the shutdown instruction.
A computer-readable storage medium in which a computer program is stored which, when being executed by a processor, implements the automatic power supply test method according to claim 9.
The beneficial effects obtained by the invention are as follows: the on-off test of the redundant power supply in the server is carried out according to the test instruction and the test time by controlling the on-off of one path or multiple paths in the multi-path relay module, only the test instruction, the test time and the preset time interval need to be set, the on-off of the redundant power supply of the server does not need to be manually controlled by a tester in the whole process, the working efficiency is improved, and the redundant power supply of the server can be tested better and more comprehensively.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to embodiments thereof.
The invention relates to an automatic power supply testing system and a method, which explain the following embodiments according to the attached drawings:
as shown in fig. 1, an automatic power supply testing system comprises a computer and a server, wherein a plurality of redundant power supplies are arranged in the server, the automatic power supply testing system further comprises a multi-path relay module, the computer is electrically connected with the input end of the multi-path relay module, and the output end of the multi-path relay module is connected with the plurality of redundant power supplies in the server in a one-to-one correspondence manner. Specifically, the output of the multiplex relay module is electrically connected to a plurality of redundant power supplies in the server. For a multi-relay module, each output comprises three ports, a normally open port, a normally closed port, and a common port. In the invention, each power supply of the server is electrically connected with the normally open port and the common port of the multi-circuit breaker module respectively. When the computer controls one path of relay to be closed, the normally open port and the shared port are closed, and the power supply corresponding to the path of relay module supplies power to the server.
As shown in fig. 1, the computer includes a control module and an acquisition module, the control module is configured to generate a test instruction and test time, and the acquisition module is configured to receive the test instruction and the test time generated by the control module and control on/off of one or more paths in the multi-path relay module to enable the redundant power supply in the server to perform an on/off test according to the test instruction and the test time. The test instruction and the test time form a test signal square wave, and one path or multiple paths in the multi-path relay module are controlled to be switched according to the test instruction at a preset time interval. Specifically, the on-off test can be performed according to the test time by controlling one path of the multi-path relay module to test the functions and the reliability of the plurality of redundant power supplies of the server, or the on-off test can be performed according to the test time by controlling two or more paths of the multi-path relay module to test the functions and the reliability of the plurality of redundant power supplies of the server. The on-off test is carried out by controlling two paths in the multi-path relay module according to the test time, namely the on-off test is carried out by controlling any two paths in the multi-path relay module according to the test time, and all two paths of multi-path output of the multi-path relay module are combined.
The test instruction comprises a relay closing instruction and a relay opening instruction, the test time is relay closing time, and the preset time interval is interval time for switching one path or multiple paths in the multi-path relay module according to the test instruction. For example, the server has 5 redundant power supplies in total, the relay closing time is 5 seconds, and the preset time interval is 10 seconds. When the computer controls one path of the multi-path relay module to carry out on-off test according to the test time so as to test the functions and the reliability of a plurality of redundant power supplies of the server, one path of the multi-path relay module is controlled to be closed for 5 seconds and other paths are opened, one path of the multi-path relay module is closed for 5 seconds and then opened, and then the other path of the multi-path relay module is closed for 10 seconds and then opened, and so on, so that the on-off test of the redundant power supplies of the server is completed. When the on-off test is carried out on two paths of the multi-path relay module according to the test time to test the functions and the reliability of a plurality of redundant power supplies of the server, the two paths of the multi-path relay module are controlled to be closed for 5 seconds at the same time, other rest paths are disconnected after the two paths are closed for 5 seconds, then the other two paths of the multi-path relay module are closed and disconnected for 10 seconds, and the like, so that the on-off test of the redundant power supplies of the server is completed.
Before testing the server power supply, a plurality of redundant power supplies of the server are randomly numbered, and the serial numbers of the output ends of the multi-path relays correspond to the serial numbers of the redundant power supplies of the server one by one. The random numbering is carried out on the plurality of redundant power supplies of the server, so that the possible accidental situations of the redundant power supplies of the server can be simulated, and the function test can be better carried out on the redundant power supplies of the server.
The on-off test of the redundant power supply in the server is carried out according to the test instruction and the test time by controlling the on-off of one path or multiple paths in the multi-path relay module, only the test instruction, the test time and the preset time interval need to be set, the on-off of the redundant power supply of the server does not need to be manually controlled by a tester in the whole process, the working efficiency is improved, and the redundant power supply of the server can be tested better and more comprehensively.
In some embodiments, the computer further includes a sending module, the server further includes a testing module, the sending module is configured to generate and send a power-on instruction and a power-off instruction to the testing module, and the testing module is configured to control the server to perform power-on and power-off operations according to the power-on instruction and the power-off instruction, respectively. When the computer is ready to test the redundant power supply of the server, a starting instruction is sent to the test module through the sending module, and the test module controls the server to start according to the starting instruction. When the server is in the running state, the computer side performs the function test on the redundant power supply of the server by controlling the on-off of one path or multiple paths in the multi-path relay. And after the test is finished, the sending module sends a shutdown instruction to the test module, and the test module closes the server according to the shutdown instruction. Therefore, the server redundant power supply can be tested under the condition that the server is started, and the reliability of the server redundant power supply test is improved. Meanwhile, the server can be closed after the test is finished, and excessive energy loss is avoided.
In some embodiments, the test module is further configured to send a test success result to the computer when the running time of the server after the boot operation according to the boot instruction reaches a preset time threshold. When the acquisition module controls the on-off of one path or multiple paths of the multi-path relay module to enable the redundant power supply in the server to carry out on-off test according to the test instruction and the test time, the server does not generate a downtime or power-off condition in a preset time threshold value, which indicates that the redundant condition of the redundant power supply of the server is good, and the server can continuously provide power supply. The server sends a test success result, and the test result of the redundant power supply of the server is truly reflected.
The computer further comprises a receiving module, wherein the receiving module is used for receiving the test success result sent by the server, and when the receiving module receives the test success result sent by the server, the sending module sends a shutdown instruction to the testing module.
The test module is also used for generating startup success information and sending the information to the computer after controlling the server to perform startup operation according to the startup instruction. The computer also comprises a judging module which is used for receiving the starting-up information generated by the testing module and judging whether the server completes the starting-up operation or not, and when the server does not complete the starting-up operation, the judging module generates a starting-up failure result. When the judgment module judges that the server completes the startup operation, the computer performs function and reliability test on the redundant power supply of the server by controlling the multi-path relay module
The computer also comprises a recording module, and the recording module is used for recording the starting failure result, the starting success information and the test success result.
In some embodiments, the automatic power supply test system further comprises a client, the computer further comprises a communication module, and the computer is in communication connection with the client through the communication module. The client is a smart phone which is provided with a WeChat APP, and a small program is installed in the WeChat APP. The testing personnel set the testing instruction, the testing time and the preset time interval through the small program and send the testing instruction, the testing time and the preset time interval to the computer. And the computer sends the test success result, the boot failure result and the boot success information to the client, and the client presents the test success result, the boot failure result and the boot success information on the small program interface. Therefore, testers can remotely test the redundant power supply of the server, and the whole process is more visual and convenient.
In some embodiments, the automatic power test system further comprises a temperature measurement module, which is installed in the multi-way relay module and is used for measuring the working temperature of the multi-way relay module and feeding the working temperature of the multi-way relay module back to the computer. When the working temperature of the multi-path relay module is higher than a first preset temperature threshold value, the computer sends a shutdown instruction to the server to enable the server to perform shutdown operation, so that the problem that the multi-path relay module cannot normally work due to overhigh working temperature and causes the server to be powered off suddenly to cause data loss is avoided.
Correspondingly, the invention also provides an automatic power supply testing method, which comprises a computer, a server and a multi-path relay module, wherein a plurality of redundant power supplies are arranged in the server, the computer is electrically connected with the input end of the multi-path relay module, the output end of the multi-path relay module is correspondingly connected with the plurality of redundant power supplies in the server one by one, as shown in fig. 2, the method comprises the following steps:
step 1, a computer controls one path or multiple paths of a multi-path relay module to be switched on and off according to a generated test instruction and test time so that a power supply in a server sends a starting instruction to the server while the power supply in the server is subjected to on-off test according to the test instruction and the test time;
step 2, the server carries out starting operation according to the starting instruction, and when the running time reaches a preset time threshold value, a successful test result is sent to the computer;
step 3, the computer receives the successful test result and sends a shutdown instruction to the server;
and 4, the server receives the shutdown instruction and performs shutdown operation according to the shutdown instruction.
A computer-readable storage medium in which a computer program is stored which, when being executed by a processor, implements the automatic power supply test method according to claim 9.
In summary, the system and method for automatically testing power supply disclosed by the present invention have the following beneficial technical effects: the on-off test of the redundant power supply in the server is carried out according to the test instruction and the test time by controlling the on-off of one path or multiple paths in the multi-path relay module, only the test instruction, the test time and the preset time interval need to be set, the on-off of the redundant power supply of the server does not need to be manually controlled by a tester in the whole process, the working efficiency is improved, and the redundant power supply of the server can be tested better and more comprehensively.
The above examples are to be construed as merely illustrative and not limitative of the remainder of the disclosure. After reading the description of the invention, the skilled person can make various changes or modifications to the invention, and these equivalent changes and modifications also fall into the scope of the invention defined by the claims.