A system-on-chip (SoC) power-on self-test (POST) method, apparatus, device, and medium
Patent Information
- Application Number
- CN202211642996.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-20
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-12-20
AI Technical Summary
但是忽略了智能网卡的状态,单纯的进行宿主机的开关机测试,而智能网卡内部的出现异常是不会被该方案识别到的.容易导致遗漏发现Bug
[0039]上述整系统开关机测试方法、装置、设备及介质,通过提前预设智能设备内置操作系统的启动完成时间,在该时间段后通过智能设备内置操作系统的网络功能借助安全外壳协议识别智能设备的运行状态,进一步判断其电源状态;同时通过硬件PCIE供电状态识别智能设备是否处于异常,针对供电正常的情况再次确认智能设备操作系统工作状态是否异常,有效避免了错误监测智能设备状态的情况,提高了监测智能设备状态的准确度。
Smart Images

Figure CN116107821B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to a method, apparatus, equipment and medium for testing the power-on and power-off of an entire system. Background Technology
[0002] The increasing number of virtual machines and containers, constantly changing application requirements, and the growing emphasis on network security have placed enormous pressure on the CPUs of server infrastructure computing nodes. In the post-Moore's Law era, the growth rate of CPU computing power has slowed, and the gap between the growth rate and the growth rate of data center network transmission speeds is gradually widening. This necessitates new architectures to enhance performance in areas such as computing power and network transmission, thus driving the demand for smart network interface cards (NICs). In the development of smart NICs integrated with server systems, overall system stability testing has become a crucial test item for ensuring the quality of the entire server product.
[0003] Generally, smart network interface cards (NICs) need to be used in conjunction with a host machine (server) to form a complete system and interact with the server to realize their application value. However, the host machine has three states: S0 (host machine is in working state), pseudo-S5 (host machine is in shutdown state, but the motherboard 12V DC power is still available), and S5 (host machine is in shutdown state, but the motherboard 12V DC power supply has stopped). The smart network interface card (NIC) has two power states: S0 and S5. The two can only work normally under specific state combinations. The state correspondence between the smart network interface card and the host machine is shown in Table 1. How to ensure the quality of effective state coordination between the two in actual business applications poses a new challenge to the relevant testing methods.
[0004] In existing technology, a power-on / off test script is invoked to perform power-on / off tests on the server. When the server crashes, an electronic paper recorder captures the screen image at the time of the crash, and a power-on / off test fixture forces the server to shut down. After power is restored, the process returns to invoking the power-on / off test script to perform the test again. This avoids the problem of having to stop the test, retain the screen image at the time of the crash, and then resume the power-on / off test after the testers have finished investigating and analyzing the problem when the server crashes during the power-on / off test, thus improving the efficiency of server power-on / off testing. However, this approach ignores the status of the smart network interface card (NIC), simply performing a power-on / off test on the host machine. Anomalies within the smart NIC will not be detected by this solution, potentially leading to missed bugs. Summary of the Invention
[0005] Therefore, it is necessary to provide a system power-on / off test method, device, equipment, and medium that can effectively identify the current status of the smart network card in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a method for testing the power-on / off operation of an entire system, the method comprising:
[0007] Send power on / off commands to the host machine and record the expected power state of the host machine;
[0008] Monitor the actual power status of the host machine;
[0009] In response to obtaining the actual power status of the host machine, monitor the actual power status of the smart device;
[0010] In response to obtaining the actual power state of the smart device, the current power state of the smart device is recorded as the first state;
[0011] Match the expected power state of the host machine with the actual power state of the host machine;
[0012] The test should be terminated based on the matching results and the current power status of the smart device.
[0013] In one embodiment, determining whether to terminate the test based on the matching result and the current power state of the smart device includes:
[0014] If the matching results are consistent, the power status of the current smart device is compared with the preset status library, and the test is terminated based on the comparison results. The preset status library includes the correspondence between the power status of the smart device and the power status of the host machine.
[0015] If the matching results are inconsistent, the test will stop.
[0016] In one embodiment, the power state of the current smart device is compared with a preset state database, and a determination is made based on the comparison result to terminate the test, including:
[0017] If the comparison results are consistent, resend the power on / off command to perform the power on / off test again;
[0018] If the comparison results are inconsistent, the test should be stopped.
[0019] In one embodiment, the method further includes:
[0020] The test stops in response to the failure to obtain the actual power status of the host machine.
[0021] In one embodiment, the method further includes:
[0022] In response to the failure to obtain the actual power status of the smart device, the voltage status of the PCIe slot where the smart device is located is monitored;
[0023] If the voltage state of the PCIe slot is the first preset voltage, then the power state of the current smart device is recorded as the second state.
[0024] In one embodiment, the method further includes:
[0025] If the voltage state of the PCIe slot is the second preset voltage, then wait for a preset time and then re-monitor the actual power state of the smart device.
[0026] The preset time refers to the time taken from when the smart device is powered on until the smart device's built-in operating system is fully loaded.
[0027] In one embodiment, the method further includes:
[0028] In response to the re-monitoring and acquisition of the actual power status of the smart device, the current power status of the smart device is recorded as the first state;
[0029] If the actual power status of the smart device is not detected upon re-monitoring, the smart device is considered to have malfunctioned, and the test is stopped.
[0030] Secondly, this application provides a system power-on / off testing device, the device comprising:
[0031] The power-on / off command module is used to send power-on / off commands to the host machine and record the expected power state of the host machine.
[0032] The first monitoring module is used to monitor the actual power status of the host machine;
[0033] The second monitoring module is used to monitor the actual power status of the smart device in response to obtaining the actual power status of the host machine.
[0034] The recording module is used to record the current power state of the smart device as the first state in response to obtaining the actual power state of the smart device;
[0035] A matching module is used to match the expected power state of the host machine with the actual power state of the host machine;
[0036] The judgment module is used to determine whether to terminate the test based on the matching result and the current power status of the smart device.
[0037] Thirdly, this application provides a computer device including one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, which, when read and executed by the one or more processors, perform the steps of the whole system power-on / off test method as described in any of the first aspects above.
[0038] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, wherein when executed by a processor, the computer program performs the system power-on / off test steps as described in any one of the first aspects above.
[0039] The aforementioned system power-on / off test method, apparatus, equipment, and medium, by pre-setting the startup completion time of the intelligent device's built-in operating system, identifies the intelligent device's operating status through the network function of the built-in operating system using the Secure Enclosure Protocol after that time period, and further determines its power status; simultaneously, it identifies whether the intelligent device is abnormal by checking the hardware PCIe power supply status, and if the power supply is normal, it reconfirms whether the intelligent device's operating system is abnormal, effectively avoiding erroneous monitoring of the intelligent device's status and improving the accuracy of monitoring the intelligent device's status.
[0040] By matching the host power state with the smart device power state in the preset state library, the actual power state of the host is matched with the expected power state of the host, and the actual power state of the smart device is compared with the corresponding smart device power state in the preset library to determine the correctness of the actual state. This ensures the overall stability and quality of the product's power-on and power-off, and improves product competitiveness and customer satisfaction. Attached Figure Description
[0041] Figure 1 This is a flowchart illustrating a system power-on / off test method in one embodiment;
[0042] Figure 2 This is a schematic diagram of the overall process of the system power-on / off test method;
[0043] Figure 3 This is a schematic diagram of the overall system power-on / off test device in one embodiment;
[0044] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0046] The intelligent device in this application includes a smart network interface card (NIC). This smart NIC differs from a regular NIC; it no longer merely handles Layer 2 forwarding between the server and the outside world, but instead takes on a greater role in assisting the server CPU in processing network-related tasks. In other words, the smart NIC must be used in conjunction with the entire server system to function. Therefore, during the operation of the entire system, it is necessary to simultaneously monitor the status of the smart NIC itself, and also analyze the status of the host machine in conjunction with this monitoring to determine whether the entire system is operating normally. This is the technical problem that this invention aims to solve.
[0047] The single host power-on / off test method ignores the identification of the smart network card status, resulting in the smart network card not being detected when it is in an abnormal state. This application provides a method that pre-sets the startup completion time of the smart device's built-in operating system, and after that time period, uses the network function of the smart device's built-in operating system with the help of the Secure Shell protocol to identify the smart device's operating status and further determine its power status. This method can promptly detect abnormalities of the smart network card in the power-on / off cycle test.
[0048] Based on identifying the operating status of a smart device through the network function of its built-in operating system within a preset time period using the Secure Shell Protocol, this application also provides a method for secondary confirmation of the smart network card status. This method can effectively identify whether the current smart network card is in the S0 or S5 state.
[0049] Based on monitoring and acquiring the power status of the host machine and the power status of the smart device, this application also provides a method for matching the status of the smart network card with the host machine. Only when the matching rules are met can the whole system be determined to be in a healthy state.
[0050] The following will further explain the system power-on / off test method, apparatus, equipment, and medium with reference to specific embodiments.
[0051] Example 1
[0052] In one embodiment, such as Figure 1 , Figure 2 As shown, this application provides a method for testing the power-on and power-off of an entire system, the method comprising the following steps:
[0053] S11. Send power on / off commands to the host machine and record the expected power status of the host machine;
[0054] Specifically, power on / off commands are sent to the host machine. Typically, the power on / off commands are sent out-of-band to the host machine's BMC using the IPMI (Intelligent Platform Management Interface) protocol. After sending the power on / off commands to the host machine, the expected host machine power status is recorded.
[0055] S12. Monitor the actual power status of the host machine;
[0056] Specifically, after the host BMC receives the power-on / off command, it monitors the actual power status of the host machine by communicating with the host BMC out of band via the IPMI protocol.
[0057] S13. In response to obtaining the actual power status of the host machine, monitor the actual power status of the smart device;
[0058] Specifically, after the host BMC receives the power-on / off command, it remotely accesses the OS (Operation System) built into the smart network card via SSH (Secure Shell) within a preset time to obtain its running status. The preset time refers to the time taken from the smart network card's power-on to the completion of loading the smart network card's built-in operating system.
[0059] Specifically, within a preset time period, the system remotely accesses the operating system built into the smart network card via the SSH protocol to obtain its running status: ssh root@smartnic_osip service snap status, where smartnic_osip is the IP address of the smart network card's operating system.
[0060] S14. In response to obtaining the actual power state of the smart device, record the current power state of the smart device as the first state;
[0061] Specifically, the first state is S0. If the state can be obtained, it means that the smart network card is already in the S0 state (the smart network card is in working state). If the state cannot be obtained, it means that the smart network card may be malfunctioning and further operation is required by a method for secondary confirmation of the smart network card state.
[0062] S15. Match the expected power state of the host machine with the actual power state of the host machine;
[0063] Specifically, the host machine has three states: S0 (host machine is in working state), pseudo-S5 (host machine is in shutdown state, but the motherboard 12V DC power is still available), and S5 (host machine is in shutdown state, but the motherboard 12V DC power supply has stopped). The smart network card has two states: S0 (smart network card is in working state) and S5 (smart network card is in abnormal state).
[0064] S16. Determine whether to terminate the test based on the matching result and the current power status of the smart device.
[0065] The implementation process of step S16 above, which determines whether to terminate the test based on the matching result and the current power state of the smart device, may include the following steps:
[0066] S161. If the matching results are consistent, the power state of the current smart device is compared with the preset state library, and it is determined whether to terminate the test based on the comparison results. The preset state library includes the correspondence between the power state of the smart device and the power state of the host machine.
[0067] S162. If the matching results are inconsistent, stop the test.
[0068] Specifically, the correspondence between the host machine's power state and the smart network card's power state is shown in Table 1, the preset state library:
[0069] Table 1:
[0070] Smart device power status S0 S0 S5
[0071] Specifically, if the matching results are inconsistent, the subsequent loop test is stopped via the SSH protocol.
[0072] The process of comparing the current power state of the smart device with a preset state database in step S161 and determining whether to terminate the test based on the comparison result may include the following steps:
[0073] S1611. If the comparison results are consistent, resend the power on / off command to perform the power on / off test again.
[0074] S1612. If the comparison results are inconsistent, stop the test.
[0075] Specifically, if the comparison results match, the power control module is notified to perform the next power-on / off test; if they do not match, the current abnormal state is retained, and subsequent loop tests are stopped via the SSH protocol.
[0076] In one embodiment, the method further includes the following steps:
[0077] S1. In response to the failure to obtain the actual power status of the host machine, the test is stopped.
[0078] Specifically, in response to the failure to obtain the actual power status of the host machine, the subsequent loop test is stopped via the SSH protocol.
[0079] In one embodiment, the method further includes the following steps:
[0080] S2. In response to the failure to obtain the actual power status of the smart device, monitor the voltage status of the PCIe slot where the smart device is located;
[0081] S3. If the voltage state of the PCIe slot is the first preset voltage, then record the current power state of the smart device as the second state.
[0082] Specifically, the first preset voltage is 0V, and the second state is S5.
[0083] Specifically, if the running status of the built-in operating system of the smart network card cannot be obtained within a preset time through the SSH protocol, a method for secondary confirmation of the smart network card status is used for further operation. That is, the voltage status of the PCIe slot where the smart network card is located is obtained by accessing the host BMC through the IPMI protocol. If the voltage status of the PCIe slot of the smart network card is 0V, then the current power status of the smart network card is S5.
[0084] In one embodiment, the method further includes the following steps:
[0085] S4. If the voltage state of the PCIe slot is the second preset voltage, then wait for a preset time and then re-monitor the actual power state of the smart device.
[0086] The preset time is the time taken from the moment the smart network card is powered on until the smart network card's built-in operating system is fully loaded.
[0087] Specifically, the second preset voltage is 12V.
[0088] Specifically, if the voltage of the smart network card's PCIe slot is 12V, the smart network card status will be retrieved again via the SSH protocol after waiting for the preset time.
[0089] In one embodiment, the method further includes the following steps:
[0090] S5. In response to re-monitoring and obtaining the actual power status of the smart device, record the current power status of the smart device as the first state.
[0091] S6. In response to the failure to re-monitor the actual power status of the smart device, the smart device malfunctions, and the test is stopped.
[0092] Specifically, the first state is S0.
[0093] Specifically, if the smart network card operating system status can be obtained through re-monitoring, the smart network card power supply is considered to be in state S0; if the smart network card operating status is still not obtained through re-monitoring, the smart network card itself is considered to be faulty and unable to enter the operating system, and the subsequent loop test is stopped via SSH protocol.
[0094] In the above-mentioned system power-on / off test method, based on obtaining the actual power status of the host machine, the startup completion time of the built-in operating system of the smart device is preset in advance. After this time period, the network function of the built-in operating system of the smart device is used to identify the operating status of the smart device with the help of the secure shell protocol, and further determine its power status to identify whether the current smart device is abnormal.
[0095] By matching the expected power state of the host machine with the actual power state of the host machine, comparing the power state of the current smart device with the preset state database, and determining whether to terminate the test based on the matching and comparison results, the system verifies the actual power state of the host machine and the power state of the current smart device through the corresponding relationship in the preset relationship database to determine the correctness of the actual state and ensure the stability of the entire system's power-on and power-off.
[0096] By monitoring the PCIe voltage status of the smart device, the power status of the smart device is reconfirmed. If the PCIe voltage is normal, the actual power status of the smart device is re-monitored, which effectively avoids the situation of erroneous monitoring of the smart device status and improves the accuracy of monitoring the smart device status.
[0097] It should be understood that, although Figure 1 , Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0098] Example 2
[0099] In one embodiment, such as Figure 3As shown, a system power-on / off testing device is provided, comprising: a transmission recording module, a first monitoring module, a second monitoring module, a recording module, and a matching judgment module, wherein:
[0100] The recording module 31 is used to send power on / off commands to the host machine and record the expected power state of the host machine.
[0101] The first monitoring module 32 is used to monitor the actual power status of the host machine;
[0102] The second monitoring module 33 is used to monitor the actual power status of the smart device in response to obtaining the actual power status of the host machine.
[0103] Recording module 34 is used to record the current power state of the smart device as the first state in response to obtaining the actual power state of the smart device;
[0104] The matching module 35 is used to match the expected power state of the host machine with the actual power state of the host machine;
[0105] The judgment module 36 is used to determine whether to terminate the test based on the matching result and the current power status of the smart device.
[0106] Specifically, the monitoring module is remotely notified to start working via the SSH protocol: ssh root@monitoringmodule_IPservice monitor start, where monitoringmodule_IP is the IP address of the monitoring module server, and monitor service is the monitoring module.
[0107] Specifically, after receiving the power-on / off command, the monitoring module communicates with the host BMC out-of-band via the IPMI protocol to obtain the host power status as Sx,ipmitool–I lanplus–H HOST_BMC_ip–U admin–P admin chassispower status.
[0108] The aforementioned judgment module 36 is used to determine whether to terminate the test based on the matching result and the current power status of the smart device, and includes the following sub-modules:
[0109] The comparison and judgment submodule 361 is used to compare the power status of the current smart device with the preset status library if the matching results are consistent, and determine whether to terminate the test based on the comparison results. The preset status library includes the correspondence between the power status of the smart device and the power status of the host machine.
[0110] The stop submodule 362 is used to stop the test if the matching results are inconsistent.
[0111] The comparison and judgment submodule 361 is used to compare the power state of the current smart device with a preset state database if the matching results are consistent, and to determine whether to terminate the test based on the comparison results. It includes the following units:
[0112] The resend unit 3611 is used to resend the power-on / off command to perform the power-on / off test again if the comparison results are consistent.
[0113] Stop unit 3612: If the comparison results are inconsistent, stop the test.
[0114] In one embodiment, the device further includes:
[0115] The first stop module 37 is used to stop the test in response to the failure to obtain the actual power status of the host machine.
[0116] In one embodiment, the device further includes:
[0117] The third monitoring module 38 is used to monitor the voltage status of the PCIe slot where the smart device is located in response to the failure to obtain the actual power status of the smart device;
[0118] The second recording module 39 is used to record the current power state of the smart device as the second state if the voltage state of the PCIe slot is the first preset voltage.
[0119] In one embodiment, the device further includes:
[0120] The re-monitoring module 3A is used to re-monitor the actual power status of the smart device after waiting for a preset time if the voltage status of the PCIe slot is a second preset voltage.
[0121] The preset time is the time taken from the moment the smart device is powered on until the smart device's built-in operating system is fully loaded.
[0122] In one embodiment, the device further includes:
[0123] The third recording module 3B is used to record the current power state of the smart device as the first state in response to the re-monitoring and acquisition of the actual power state of the smart device.
[0124] The second stop module 3C is used to stop the test if the smart device malfunctions and the actual power status of the smart device is not detected upon re-monitoring.
[0125] Specific limitations regarding the overall system power-on / off test device can be found in the limitations of the overall system power-on / off test method described above, and will not be repeated here. Each module in the aforementioned overall system power-on / off test device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0126] Example 3
[0127] Corresponding to Embodiments 1 and 2 above, this embodiment provides a computer device for testing the power-on and power-off of an entire system. In one example, such as... Figure 4 As shown, this application provides a computer device, which includes:
[0128] One or more processors;
[0129] and a memory associated with the one or more processors, the memory storing program instructions that, when read and executed by the one or more processors, perform the following steps:
[0130] Send power on / off commands to the host machine and record the expected power state of the host machine;
[0131] Monitor the actual power status of the host machine;
[0132] In response to obtaining the actual power status of the host machine, monitor the actual power status of the smart device;
[0133] In response to obtaining the actual power state of the smart device, the current power state of the smart device is recorded as the first state;
[0134] Match the expected power state of the host machine with the actual power state of the host machine;
[0135] The test should be terminated based on the matching results and the current power status of the smart device.
[0136] When the program instructions are read and executed by the one or more processors, the processors, when executing the computer program, also perform the following steps:
[0137] If the matching results are consistent, the power status of the current smart device is compared with the preset status library, and the test is terminated based on the comparison results. The preset status library includes the correspondence between the power status of the smart device and the power status of the host machine.
[0138] If the matching results are inconsistent, the test will stop.
[0139] When the program instructions are read and executed by the one or more processors, the processors, when executing the computer program, also perform the following steps:
[0140] If the comparison results are consistent, resend the power on / off command to perform the power on / off test again;
[0141] If the comparison results are inconsistent, the test should be stopped.
[0142] When the program instructions are read and executed by the one or more processors, the processors, when executing the computer program, also perform the following steps:
[0143] The test stops in response to the failure to obtain the actual power status of the host machine.
[0144] When the program instructions are read and executed by the one or more processors, the processors, when executing the computer program, also perform the following steps:
[0145] In response to the failure to obtain the actual power status of the smart device, the voltage status of the PCIe slot where the smart device is located is monitored;
[0146] If the voltage state of the PCIe slot is the first preset voltage, then the power state of the current smart device is recorded as the second state.
[0147] When the program instructions are read and executed by the one or more processors, the processors, when executing the computer program, also perform the following steps:
[0148] If the voltage state of the PCIe slot is the second preset voltage, then wait for a preset time and then re-monitor the actual power state of the smart device.
[0149] The preset time refers to the time taken from when the smart device is powered on until the smart device's built-in operating system is fully loaded.
[0150] When the program instructions are read and executed by the one or more processors, the processors, when executing the computer program, also perform the following steps:
[0151] In response to the re-monitoring and acquisition of the actual power status of the smart device, the current power status of the smart device is recorded as the first state;
[0152] If the actual power status of the smart device is not detected upon re-monitoring, the smart device is considered to have malfunctioned, and the test is stopped.
[0153] When the program instructions are read and executed by the one or more processors, they can also perform operations corresponding to the steps in the above method embodiments, as described above, and will not be repeated here. (Reference) Figure 4 This exemplifies the architecture of a computer device, which may specifically include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420 can communicate with each other via a communication bus 430.
[0154] The processor 410 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in this application.
[0155] The memory 420 can be implemented as a read-only memory (ROM), random access memory (RAM), static storage device, dynamic storage device, etc. The memory 420 can store the operating system 421 for controlling the operation of the computer device 400, and the basic input / output system (BIOS) 422 for controlling the low-level operations of the computer device 400. Additionally, it can store a web browser 423, data storage management 424, and an icon font processing system 425, etc. The aforementioned icon font processing system 425 can be the application program that specifically implements the aforementioned steps in this embodiment. In summary, when the technical solution provided in this application is implemented through software or firmware, the relevant program code is stored in the memory 420 and executed by the processor 410.
[0156] Input / output interface 413 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.
[0157] Network interface 414 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0158] Bus 430 includes a pathway for transmitting information between various components of the device, such as processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420.
[0159] In addition, the computer device 400 can also obtain information on specific acquisition conditions from the virtual resource object acquisition condition information database 441 for condition judgment, etc.
[0160] It should be noted that although the computer device 400 described above only shows a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, a memory 420, and a bus 430, in specific implementations, the computer device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above device may only include the components necessary for implementing the solution of this application, and does not necessarily include all the components shown in the figures.
[0161] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, cloud server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0162] Example 4
[0163] Corresponding to Embodiments 1 to 3 above, this embodiment provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps of the system power-on / off test method in the above embodiments, such as other extensions and related steps of steps S11 to S16. Alternatively, when executed by a processor, the computer program implements the functions of each module / unit of the shared serial port identification device in the above embodiments, such as the functions of modules 31 to 3C. To avoid repetition, further details are omitted here.
[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0165] Specifically, when the computer program is executed by the processor, it performs the following steps:
[0166] Send power on / off commands to the host machine and record the expected power state of the host machine;
[0167] Monitor the actual power status of the host machine;
[0168] In response to obtaining the actual power status of the host machine, monitor the actual power status of the smart device;
[0169] In response to obtaining the actual power state of the smart device, the current power state of the smart device is recorded as the first state;
[0170] Match the expected power state of the host machine with the actual power state of the host machine;
[0171] The test should be terminated based on the matching results and the current power status of the smart device.
[0172] When the computer program is executed by the processor, it also performs the following steps:
[0173] If the matching results are consistent, the power status of the current smart device is compared with the preset status library, and the test is terminated based on the comparison results. The preset status library includes the correspondence between the power status of the smart device and the power status of the host machine.
[0174] If the matching results are inconsistent, the test will stop.
[0175] When the computer program is executed by the processor, it also performs the following steps:
[0176] If the comparison results are consistent, resend the power on / off command to perform the power on / off test again;
[0177] If the comparison results are inconsistent, the test should be stopped.
[0178] When the computer program is executed by the processor, it also performs the following steps:
[0179] The test stops in response to the failure to obtain the actual power status of the host machine.
[0180] When the computer program is executed by the processor, it also performs the following steps:
[0181] In response to the failure to obtain the actual power status of the smart device, the voltage status of the PCIe slot where the smart device is located is monitored;
[0182] If the voltage state of the PCIe slot is the first preset voltage, then the power state of the current smart device is recorded as the second state.
[0183] When the computer program is executed by the processor, it also performs the following steps:
[0184] If the voltage state of the PCIe slot is the second preset voltage, then wait for a preset time and then re-monitor the actual power state of the smart device.
[0185] The preset time refers to the time taken from when the smart device is powered on until the smart device's built-in operating system is fully loaded.
[0186] When the computer program is executed by the processor, it also performs the following steps:
[0187] In response to the re-monitoring and acquisition of the actual power status of the smart device, the current power status of the smart device is recorded as the first state;
[0188] If the actual power status of the smart device is not detected upon re-monitoring, the smart device is considered to have malfunctioned, and the test is stopped.
[0189] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0190] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for testing the power-on / off operation of an entire system, characterized in that, The entire system includes intelligent devices and a host machine, and the testing method includes: Send power on / off commands to the host machine and record the expected power state of the host machine corresponding to the power on / off commands; Monitor the actual power status of the host machine; In response to obtaining the actual power status of the host machine, monitor the actual power status of the smart device; In response to obtaining the actual power state of the smart device, the current power state of the smart device is determined as the first state; In response to the failure to obtain the actual power status of the smart device, the voltage status of the PCIe slot where the smart device is located is monitored; If the voltage state of the PCIe slot is a first preset voltage, then the power state of the current smart device is determined to be the second state. If the voltage state of the PCIe slot is the second preset voltage, then after waiting for a preset time, the actual power state of the smart device will be monitored again. The preset time is the time taken from the start of powering on the smart device to the completion of loading the built-in operating system of the smart device. In response to the re-monitoring and acquisition of the actual power status of the smart device, the current power status of the smart device is determined as the first status; If the actual power status of the smart device is not detected upon re-monitoring, it is determined that the smart device has malfunctioned, and the test is stopped. Match the expected power state of the host machine with the actual power state of the host machine; The test should be terminated based on the matching results and the current power status of the smart device.
2. The method according to claim 1, characterized in that, The step of determining whether to terminate the test based on the matching result and the current power status of the smart device includes: If the matching results are consistent, the power status of the current smart device is compared with the preset status library, and the test is terminated based on the comparison results. The preset status library includes the correspondence between the power status of the smart device and the power status of the host machine. If the matching results are inconsistent, the test will stop.
3. The method according to claim 2, characterized in that, The current power state of the smart device is compared with a preset state database, and the test is terminated based on the comparison result, including: If the comparison results are consistent, resend the power on / off command to perform the power on / off test again; If the comparison results are inconsistent, the test should be stopped.
4. The method according to claim 1, characterized in that, The method further includes: The test stops in response to the failure to obtain the actual power status of the host machine.
5. A system power-on / off testing device for implementing the method of claim 1, characterized in that, The device includes: The sending and recording module is used to send power on / off commands to the host machine and record the expected power state of the host machine corresponding to the power on / off commands; The first monitoring module is used to monitor the actual power status of the host machine; The second monitoring module is used to monitor the actual power status of the smart device in response to obtaining the actual power status of the host machine. The recording module is used to determine the current power state of the smart device as the first state in response to obtaining the actual power state of the smart device; A matching module is used to match the expected power state of the host machine with the actual power state of the host machine; The judgment module is used to determine whether to terminate the test based on the matching result and the current power status of the smart device.
6. A computer device, characterized in that, The computer device includes: One or more processors; And a memory associated with the one or more processors, the memory being used to store program instructions that, when read and executed by the one or more processors, perform the steps of the whole system power-on / off test method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the whole system power-on / off test method according to any one of claims 1 to 4.
Citation Information
Patent Citations
ACPI test method and system for network card, and test machine
CN107908511A
Power source cyclic test device and method based on IPMI platform
CN107943637A