Edge server diagnosis method, device, equipment and storage medium
Patent Information
- Application Number
- CN202311277208.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2043-09-28
AI Technical Summary
[0014]The edge server diagnostic method provided in this invention responds to the power-on of the edge server by controlling the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file. By using the graphical user interface, the black screen program error bug that occurs when performing edge server diagnostics in the command line interface is avoided. When the name of the first terminal is determined to be the target name, the network connection status between the edge server and the production line diagnostic server is judged. If the network connection status is normal, the program directory of the production line diagnostic server is mounted to the edge server, the production line diagnostic program is copied from the program directory and executed automatically. By automatically executing the production line diagnostic program, the efficiency of production line operation is improved, manpower is saved, and production capacity is increased. This avoids the problem that edge server diagnostics cannot be performed due to the lack of a baseboard management controller and basic input/output system firmware.
Smart Images

Figure CN117278442B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of server diagnostic technology, and in particular to a method, apparatus, device, and storage medium for diagnosing edge servers. Background Technology
[0002] In recent years, with the advent of the Internet of Things and the widespread adoption of wireless networks, the number of devices at the network edge and the amount of data they generate have increased dramatically. In this context, centralized processing models, such as cloud computing, are unable to efficiently handle the data generated by edge devices, leading to the emergence of edge servers. For example, an EIS860 edge server can meet the high-computing demands of intelligent transportation scenarios. As a core device in edge computing, the performance and stability of edge servers have a significant impact on the operation of the entire system. Therefore, the requirements for the diagnostic quality and efficiency of edge servers at the OEM factory are becoming increasingly stringent.
[0003] Diagnostic testing of general-purpose servers at the OEM factory typically relies on firmware such as BMC (Baseboard Management Controller) and BIOS (Basic Input Output System), as well as using PXE (Preboot Execution Environment) to boot the operating system, in order to achieve automated diagnostic testing at the OEM factory. Compared to general-purpose servers, the EIS860 edge server model has several differences: The EIS860 lacks BMC and BIOS firmware, so diagnostic testing cannot rely on them. It uses an NVIDIA Jetson AGX Orin module and runs Jetpack 5.1 (a customized operating system based on Ubuntu 20.04), which does not support PXE installation. Therefore, operator assistance is required to install the operating system on the EIS860. Furthermore, the NVIDIA Jetson AGX Orin module on the EIS860 has a bug that causes a black screen in the command-line interface. Therefore, how to automate the diagnostic testing of the EIS860 model at the server assembly plant is a problem that needs to be considered. Summary of the Invention
[0004] The purpose of this invention is to provide an edge server diagnostic method, apparatus, device, and storage medium, solving the problems of existing edge servers being unable to rely on BMC and BIOS firmware for diagnostic testing, not supporting PXE installation of the operating system, and experiencing a black screen in the command-line interface. The specific technical solution is as follows: In a first aspect of the present invention, an edge server diagnostic method is provided, characterized in that the method comprises: In response to the power-on of the edge server, the root user is controlled to log in to the graphical user interface and open the first terminal through the operating system configuration file. The first terminal is used to print the logs of the production line diagnostic output. If the name of the first terminal is determined to be the target name, the network connection status between the edge server and the production line diagnostic server is determined. If the network connection is normal, the program directory of the production line diagnostic server is mounted to the edge server. Copy the production line diagnostic program from the program directory and execute it automatically. The production line diagnostic program is used to refresh the firmware version of the field replaceable unit (FRU), hard disk and microcontroller unit (MCU), check the various components of the machine, system logs and multiple status lights, and perform stress tests on the Reboot, CPU, memory and hard disk.
[0005] Optionally, after responding to the power-on of the edge server and controlling the root user to log in to the graphical user interface and open the first terminal through the operating system's configuration file, the method further includes: Obtain the name of the first terminal; If it is determined that the name of the first terminal is inconsistent with the target name, the diagnosis of the edge server is terminated.
[0006] Optionally, after determining the network connection status between the edge server and the production line diagnostic server when the name of the first terminal is determined to be the target name, the method further includes: If the network connection status is abnormal, an automatic IP acquisition command is executed and a counter is used to record the number of times the automatic IP acquisition command is executed, wherein the automatic IP acquisition command is used to obtain the IP address of the edge server; After waiting for a preset time period, the network connection status between the edge server and the production line diagnostic server is checked again. If the network status is normal, then the program directory of the production line diagnostic server is mounted to the edge server; If the network connection status is still abnormal, execute the automatic IP acquisition command again and increment the counter by one; If the counter value is detected to be greater than the target preset value and the network connection status between the edge server and the production line diagnostic server is still abnormal, a network abnormality log will be printed to the first terminal.
[0007] Optionally, before controlling the root user to log in to the graphical user interface and open the first terminal through the operating system's configuration file, the method further includes: Control the edge server to enter Recovery mode; In the Recovery mode, the operating system is burned into the edge server.
[0008] Optionally, before controlling the edge server to enter recovery mode, the method further includes: Pre-configure the operating system installation package on the target device; When it is determined that there are multiple edge servers to be configured with the operating system installation package, a one-to-one connection relationship is established with multiple edge servers through multiple USB connection cables, wherein the multiple USB connection cables are configured through USB expansion devices; The target device and multiple edge servers are connected via multiple USB cables.
[0009] Optionally, before controlling the root user to log in to the graphical user interface and open the first terminal through the operating system's configuration file, the method further includes: Obtain the configuration file of the operating system; Set the startup interface in the operating system's configuration file to the graphical user interface; Set the automatic login user in the operating system's configuration file to the Root user; Comment out the options in the operating system's configuration file that are disabled for the Root user; Comment out the system idle wait time option in the operating system's configuration file; Add a configuration to automatically open the first terminal in the operating system's configuration file; Add configuration to the operating system's configuration file to automatically execute production line diagnostic programs, including: Add name recognition configuration for the first terminal to the configuration file of the operating system; Based on the name recognition configuration, add a configuration for detecting the network connection status of the edge server and the production line diagnostic program server; Based on the network connection status detection configuration, add a configuration to obtain and automatically execute production line diagnostic programs from the production line diagnostic server.
[0010] Optionally, after copying the diagnostic program from the program directory and executing it automatically, the method further includes: While retaining the setting of the boot screen in the operating system's configuration file as the graphical user interface, the modifications in the operating system's configuration file are restored to their initial settings.
[0011] In a second aspect of the invention, an edge server diagnostic device is also provided, characterized in that it comprises: The first control module is used to respond to the power-on of the edge server and control the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file. The first terminal is used to print the logs output by the production line diagnostics. The first judgment module is used to determine the network connection status between the edge server and the production line diagnostic server when the name of the first terminal is determined to be the target name. The first mounting module is used to mount the program directory of the production line diagnostic server to the edge server if the network connection status is normal. The copy module is used to copy the production line diagnostic program from the program directory and execute it automatically. The production line diagnostic program is used to refresh the firmware version of the field replaceable unit (FRU), hard disk and microcontroller unit (MCU), check various machine components, system logs and multiple status lights, and perform stress tests on the Reboot, CPU, memory and hard disk.
[0012] In a third aspect of the invention, an electronic device is also provided, comprising: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the edge server diagnostic method as described in the first aspect.
[0013] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, which, when the instructions in the storage medium are executed by a processor, implements the edge server diagnostic method as described in the first aspect of this application.
[0014] The edge server diagnostic method provided in this invention responds to the power-on of the edge server by controlling the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file. By using the graphical user interface, the black screen program error bug that occurs when performing edge server diagnostics in the command line interface is avoided. When the name of the first terminal is determined to be the target name, the network connection status between the edge server and the production line diagnostic server is judged. If the network connection status is normal, the program directory of the production line diagnostic server is mounted to the edge server, the production line diagnostic program is copied from the program directory and executed automatically. By automatically executing the production line diagnostic program, the efficiency of production line operation is improved, manpower is saved, and production capacity is increased. This avoids the problem that edge server diagnostics cannot be performed due to the lack of a baseboard management controller and basic input / output system firmware. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0016] Figure 1 A flowchart illustrating the steps of an edge server diagnostic method provided in an embodiment of the present invention; Figure 2 This is a flowchart of another edge server diagnostic method provided in an embodiment of the present invention; Figure 3 This is a flowchart of another edge server diagnostic method provided in an embodiment of the present invention; Figure 4 This is a flowchart of another edge server diagnostic method provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of an edge server diagnostic device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the various embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details are presented in the various embodiments of the present invention to facilitate a better understanding of this application. However, the technical solutions claimed in this application can be implemented even without these technical details and various changes and modifications based on the following embodiments. The division of the various embodiments below is for ease of description and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined with and referenced by each other without contradiction.
[0018] Reference Figure 1 The diagram illustrates a flowchart of a method for diagnosing an edge server according to an embodiment of the present invention. The method may include: Step 101: In response to the power-on of the edge server, the root user is controlled to log in to the graphical user interface and open the first terminal through the operating system configuration file.
[0019] This invention relates to diagnostics of edge servers. Typically, edge servers do not have a BMC and BIOS firmware, but instead use NVIDIA Jetson AGX Orin modules with Jetpack 5.1 as the operating system. The NVIDIA Jetson AGX Orin module is NVIDIA's smallest, most powerful, and most energy-efficient AI supercomputer, used for edge embedded computing in robotics, autonomous machines, medical devices, and other applications. Jetpack 5.1 is a customized operating system based on Ubuntu 20.04, a Linux distribution primarily focused on desktop applications.
[0020] It should be noted that when the edge server uses the NVIDIA Jetson AGX Orin module, a black screen error will occur if diagnostics are performed in the command-line interface. Therefore, in this embodiment of the invention, a login graphical user interface is set in the operating system configuration file. A graphical user interface is an interface that presents and operates computer programs through visual elements such as graphics, icons, buttons, and menus and user interaction methods. It is usually composed of various controls such as windows, menus, buttons, text boxes, check boxes, and scroll bars. The user interface can be constructed by laying out and arranging these controls.
[0021] In addition, this embodiment of the invention also pre-packages the configuration for automatically executing production line diagnostic programs on edge servers into the operating system installation package, that is, modifies the operating system configuration file. The modifications include: allowing the root user to directly log in to the graphical user interface; adding logic to automatically open a terminal in the file executed automatically by the root user to print the logs output by the diagnostic program; and adding logic to automatically execute the production line diagnostic program in the file executed automatically by the root user. The specific configuration steps include: Obtain the operating system's configuration file; Set the boot screen in the operating system's configuration file to a graphical user interface; Set the automatic login user to the root user in the operating system's configuration file; Comment out the options in the operating system's configuration file that disable root users; Comment out the system idle time option in the operating system's configuration file; Add a configuration to automatically open the first terminal in the operating system's configuration file; Add a configuration to the operating system's configuration file to automatically execute production line diagnostic programs; This includes adding configuration to the operating system's configuration file to automatically execute production line diagnostic programs, including: Add name recognition configuration for the first terminal to the operating system's configuration file; Based on the name recognition configuration, add configuration for detecting the network connection status of the edge server and the production line diagnostic program server; Based on the network connectivity status detection configuration, add a configuration to obtain and automatically execute production line diagnostic programs from the production line diagnostic server.
[0022] Setting the startup interface to a graphical user interface is achieved through the command statement (ln -sf / lib / systemd / system / graphical.target / etc / systemd / system / default.target systemctl set-default graphical.target). AutomaticLogin=root is changed to AutomaticLogin=Root to set the automatic login user as the root user. Options disabling the root user in the operating system's configuration file are commented out (e.g., through commands (1) and (2): (1) auth required pam_succeed_if.souser != Root quiet_success, (2) auth required pam_succeed_if.souser user != Root quiet_success). The system idle waiting time option is commented out by modifying the configuration file and commenting out exportTMOUT=600. exportTMOUT=600 means the user has no activity (operation) within a specified number of seconds. Adding the configuration to automatically open the first terminal involves commenting out: mesg n 2> / dev / null || With `true` set, adding the command statement `tty -s&&mesg n || true; gnome-terminal` will automatically open a terminal after the edge server is powered on.
[0023] Among the modifications to the operating system configuration files mentioned above, setting the startup interface to a graphical user interface avoids black screen errors that may occur during diagnostics in the command-line interface. Setting the automatic login user to the root user and commenting out options that disable the root user allows for modifications to various operating system configurations. Commenting out these disabled options makes them available. Commenting out the system idle time selection avoids the cumbersome operation caused by restarting the page after the wait time expires. Opening the first terminal allows for printing logs output by the diagnostic program. Adding the configuration to automatically execute production line diagnostic programs improves production line efficiency, saves manpower, and increases production capacity.
[0024] It's important to note that the root user, also known as the superuser or administrator, is the user with the highest privileges in the operating system. In Unix-like operating systems (such as Linux and Mac OS X), the root user has full access to all files and settings in the system. This allows root to perform system-wide operations, such as installing software, changing system configurations, and managing other users. The first terminal refers to the interface of the Terminal command-line window on the edge server.
[0025] Step 102: If the name of the first terminal is determined to be the target name, determine the network connection status between the edge server and the production line diagnostic server.
[0026] The production line diagnostic server in this embodiment of the invention deploys a database and multiple program codes. The diagnostic content that can be achieved through the production line diagnostic server includes: firmware updates (e.g., MCU (Microcontroller Unit), hard drives, etc.), configuration checks of edge servers (e.g., 4G and 5G configuration checks in edge servers, fan speed checks), log checks (e.g., OSE and Message), and stress tests (e.g., stress tests on NVIDIA Jetson AGX Orin modules, stress tests on hard drives) to detect aging and other problems. Therefore, it is necessary to establish a connection between the edge server and the production line diagnostic server, and thus, it is necessary to determine the network connection status between the edge server and the production line diagnostic server.
[0027] It should be noted that, besides the case where the terminal automatically opens upon power-up, sometimes the terminal interface can also be opened manually. In this case, the device name of the opened terminal is different from that of the automatically opened terminal. The device name of the automatically opened terminal is / dev / pts / 0, and because it opens automatically every time the power-up is completed, this / dev / pts / 0 device name is always occupied. When the terminal is opened manually later, the terminal device name changes to an unoccupied name such as / dev / pts / 1. To avoid repeatedly executing the production line diagnostic program, this embodiment of the invention sets the production line diagnostic program to be automatically executed only when the terminal / dev / pts / 0 is automatically opened by the root user. That is, subsequent judgments are performed when the name of the first terminal is the target name; when the name of the first terminal is not the target name, the edge server diagnostic is terminated. Specifically, this includes: Get the name of the first terminal; If the name of the first terminal is determined to be inconsistent with the target name, the diagnosis of the edge server will be terminated.
[0028] By making the above judgments, we can avoid repeatedly executing production line diagnostic procedures and reduce unnecessary resource consumption.
[0029] Step 103: If the network connection is normal, mount the program directory of the production line diagnostic server to the edge server.
[0030] In this embodiment of the invention, when the network connection status is determined to be normal, the program directory of the production line diagnostic server is mounted to the edge server using the Mount command. Mounting refers to the process by which the operating system makes computer files and directories on a storage device (such as a hard drive, CD-ROM, or shared resource) accessible to users through the computer's file system. Therefore, by mounting, the program directory of the production line diagnostic server can be displayed on the edge server, which is convenient for the edge server to perform subsequent copying.
[0031] Step 104: Copy the production line diagnostic program from the program directory and execute it automatically.
[0032] In this embodiment of the invention, the required production line diagnostic program is found from the mounted program directory, and this program is copied to the edge server. When the copy is detected to be complete, the production line diagnostic program is automatically executed. The production line diagnostic program is used to refresh the firmware version of the field replaceable unit (FRU), hard disk and microcontroller unit (MCU), check the various components of the machine, system logs and multiple status lights, and perform stress tests on reboot, CPU, memory and hard disk.
[0033] It should be noted that after the diagnostic is complete, the operating system needs to be restored to its factory default settings. However, not all modifications will be restored; the setting to "set the boot screen in the operating system configuration file to a graphical user interface" will be retained, while all other modifications will be restored to their initial settings. Specifically, this includes: While retaining the setting of the boot screen in the operating system's configuration file as a graphical user interface, the modifications in the operating system's configuration file will be restored to their initial settings.
[0034] The above operations allow subsequent users to perform various operations on the edge server more clearly and intuitively. In addition, to reduce space usage, the logs and directories generated during the edge server diagnosis will also be deleted if the diagnosis is confirmed to be correct.
[0035] The edge server diagnostic method provided in this invention responds to the power-on of the edge server by controlling the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file. By using the graphical user interface, the black screen program error bug that occurs when performing edge server diagnostics in the command line interface is avoided. When the name of the first terminal is determined to be the target name, the network connection status between the edge server and the production line diagnostic server is judged. If the network connection status is normal, the program directory of the production line diagnostic server is mounted to the edge server, the production line diagnostic program is copied from the program directory and executed automatically. By automatically executing the production line diagnostic program, the efficiency of production line operation is improved, manpower is saved, and production capacity is increased. This avoids the problem that edge server diagnostics cannot be performed due to the lack of a baseboard management controller and basic input / output system firmware.
[0036] Reference Figure 2 The flowchart illustrates another edge server diagnostic method provided by an embodiment of the present invention, specifically including: Step 201: In response to the power-on of the edge server, the root user is controlled to log in to the graphical user interface and open the first terminal through the operating system configuration file.
[0037] Step 202: If the name of the first terminal is determined to be the target name, determine the network connection status between the edge server and the production line diagnostic server.
[0038] The above steps 201-202 refer to the content of steps 101-102 discussed in the preceding paragraph, and will not be repeated here.
[0039] Step 203: If the network connection status is abnormal, execute the command to automatically obtain an IP address and record the number of times the command to automatically obtain an IP address is executed using a counter.
[0040] In this embodiment of the invention, there may be abnormal situations when detecting network connection status. When an abnormality occurs, an automatic IP acquisition command will be executed and a counter will be used to record the number of times the automatic IP acquisition command is executed. The automatic IP acquisition command is used to obtain the IP address of the edge server. The counter is used to record the number of times the automatic IP acquisition command is executed so that other operations can be triggered later if the number of times the automatic IP acquisition command is executed exceeds a certain value.
[0041] Step 204: After waiting for a preset time period, check the network connection status between the edge server and the production line diagnostic server again.
[0042] In this embodiment of the invention, since executing the automatic IP acquisition command takes a certain amount of time, the network connection status between the edge server and the production line diagnostic server is detected after waiting for a preset time period. The preset time period can be obtained by statistically analyzing the execution time of multiple automatic IP acquisition commands. Usually, the maximum or larger value among these times is taken, such as 3 seconds or 5 seconds. This invention does not make a specific limitation here.
[0043] Step 205: If the network status is normal, mount the program directory of the production line diagnostic server to the edge server.
[0044] In this embodiment of the invention, when the network connection status between the edge server and the production line diagnostic server is checked again after the automatic IP acquisition command is executed, if the network status is detected to be normal, the execution continues to the next stage, that is, the program directory of the production line diagnostic server is mounted to the edge server.
[0045] Step 206: If the network connection status is still abnormal, execute the automatic IP acquisition command again and increment the counter.
[0046] In this embodiment of the invention, when the network connection status between the edge server and the production line diagnostic server is checked again after executing the automatic IP acquisition command, if the network status is still abnormal, the automatic IP acquisition command needs to be executed again, and the counter is incremented by one. Since the counter was already counted the first time, the counter value is 2 this time. Then, steps 204, 205, and 206 are repeated until the counter count reaches a certain value.
[0047] Step 207: If the counter value is detected to be greater than the target preset value and the network connection status between the edge server and the production line diagnostic server is still abnormal, a network abnormality log will be printed to the first terminal.
[0048] In this embodiment of the invention, the value of the counter can indicate the number of times the automatic IP acquisition command is executed. However, this number of executions is not unlimited. This embodiment of the invention sets a target preset value. When the value of the counter exceeds the target preset value, the automatic IP acquisition command can no longer be executed to avoid wasting time. If the network connection status between the edge server and the production line diagnostic server is still detected to be abnormal, then the diagnosis will be considered to have failed. Then, the network abnormality log will be printed through the first terminal to prompt the staff to check the reason for the connection failure and repair it in time.
[0049] Reference Figure 3 The flowchart illustrates another edge server diagnostic method provided by an embodiment of the present invention, specifically including: Step 301: Control the edge server to enter recovery mode.
[0050] In this embodiment of the invention, before installing the operating system, a laptop needs to be prepared, and the necessary environment and tools for installing the operating system need to be set up. Then, a USB cable is used to connect the laptop and the edge server where the operating system needs to be installed. First, press and hold the recovery button on the edge server to power it on. Press and hold the recovery button for 10 seconds to put the edge server into recovery mode. Recovery refers to a mode that allows modification of the data or system inside the edge server. In this mode, the existing system can be backed up or upgraded, or the factory settings can be restored.
[0051] Step 302: In Recovery mode, flash the operating system to the edge server.
[0052] In this embodiment of the invention, the operating system is burned by entering the command statement (sudo . / tools / kernel_flash / l4t_initrd_flash.sh –flash-only -massflash 1). After the burning is completed, the edge server can automatically execute the production line diagnostic program after powering on.
[0053] It should be noted that if you are simultaneously flashing the operating system to multiple edge servers, connect the laptop to a USB expansion device, which then branches into multiple USB cables. Connect these cables to the various edge servers and use the method of booting a single edge server into recovery mode to bring all edge servers into recovery mode. Commands for simultaneously flashing the operating system to multiple machines (using 4 machines as an example): (sudo . / tools / kernel_flash / l4t_initrd_flash.sh –flash-only -massflash4), if there are 8 servers, the last parameter value is 8. The specific number to be flashed is not specifically limited in this invention. Specifically, the steps to be performed before flashing multiple edge servers include: Pre-configure the operating system installation package on the target device; When it is determined that there are multiple edge servers to be configured with the operating system installation package, a one-to-one connection relationship is established with multiple edge servers through multiple USB connection cables, wherein the multiple USB connection cables are configured through USB expansion devices; The target device and multiple edge servers are connected via multiple USB cables.
[0054] In addition, after the USB cable successfully establishes a connection with the edge server, a message indicating a successful USB connection can be displayed, and the USB identifier indicating a successful connection can be stored in the USB connection list. By checking the USB connection list, problematic lines can be detected in a timely manner, ensuring the success of subsequent burning.
[0055] Step 303: In response to the power-on of the edge server, the root user is controlled to log in to the graphical user interface and open the first terminal through the operating system configuration file.
[0056] Step 304: If the name of the first terminal is determined to be the target name, determine the network connection status between the edge server and the production line diagnostic server.
[0057] Step 305: If the network connection is normal, mount the program directory of the production line diagnostic server to the edge server.
[0058] Step 306: Copy the production line diagnostic program from the program directory and execute it automatically.
[0059] The above steps 303-306 refer to the content of steps 101-104 discussed earlier, and will not be repeated here.
[0060] In summary, the steps of the edge server diagnostic method in this embodiment of the invention are as follows: Figure 4As shown, firstly, the operating system's configuration file is modified and packaged into the operating system installation package. Then, in response to the power-on of the edge server, the root user is controlled to log in to the graphical user interface and open the first terminal through the operating system's configuration file. It is then determined whether the first terminal name matches the target name. If they do not match, the edge server diagnosis is considered a failure. If they match, the network connection status between the edge server and the production line diagnosis server is checked. If it is not normal, the automatic IP acquisition command is attempted. If the number of times the automatic IP acquisition command is executed exceeds the target preset number and the network connection status between the edge server and the production line diagnosis server is still detected to be abnormal, the edge server diagnosis is considered a failure. If the server diagnostic fails within the target preset number of times, wait for the preset time period and then check the network connection status between the edge server and the production line diagnostic server again. Then, loop through the process to check whether the network connection status between the edge server and the production line diagnostic server is normal. If it is normal, mount the program directory of the production line diagnostic server to the edge server, copy the production line diagnostic program from the program directory and execute it automatically. Then, check whether the production line diagnostic program executes normally. If it is normal, while keeping the startup interface set to a graphical user interface in the operating system configuration file, restore the modified items in the operating system configuration file to the initial settings. If it is not normal, the edge server diagnostic is considered to have failed.
[0061] Reference Figure 5 The diagram illustrates the structure of an edge server diagnostic device provided in an embodiment of the present invention. Figure 5 As shown, the device may include: The first control module 401 is used to respond to the power-on of the edge server, and control the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file. The first terminal is used to print the logs of the production line diagnostic output.
[0062] The first judgment module 402 is used to determine the network connection status between the edge server and the production line diagnostic server when the name of the first terminal is determined to be the target name.
[0063] The first mounting module 403 is used to mount the program directory of the production line diagnostic server to the edge server if the network connection status is normal.
[0064] The copy module 404 is used to copy the production line diagnostic program from the program directory and execute it automatically. The production line diagnostic program is used to refresh the firmware version of the field replaceable unit (FRU), hard disk and microcontroller unit (MCU), check various machine components, system logs and multiple status lights, and perform stress tests on the Reboot, CPU, memory and hard disk.
[0065] Optionally, the edge server diagnostic device also includes: The first acquisition module is used to acquire the name of the first terminal.
[0066] The determination module is used to terminate the diagnosis of the edge server if it determines that the name of the first terminal is inconsistent with the target name.
[0067] The first execution module is used to execute an automatic IP acquisition command and record the number of times the automatic IP acquisition command is executed if the network connection status is abnormal. The automatic IP acquisition command is used to obtain the IP address of the edge server.
[0068] The first detection module is used to re-detect the network connection status between the edge server and the production line diagnostic server after waiting for a preset time period.
[0069] The second mounting module is used to mount the program directory of the production line diagnostic server to the edge server if the network status is normal.
[0070] The second execution module is used to execute the automatic IP acquisition command again and increment the counter if the network connection status is still abnormal.
[0071] The printing module is used to print network anomaly logs to the first terminal when the detected counter value is greater than the target preset value and the network connection status between the edge server and the production line diagnostic server is still abnormal.
[0072] The second control module is used to control the edge server to enter Recovery mode.
[0073] The flashing module is used to flash the operating system to the edge server in Recovery mode.
[0074] The configuration module is used to pre-configure the operating system installation package on the target device.
[0075] The first connection module is used to establish a one-to-one connection with multiple edge servers via multiple USB connection cables when it is determined that there are multiple edge servers to be configured with the operating system installation package. The multiple USB connection cables are configured through USB expansion devices.
[0076] The second connection module is used to establish connections between the target device and multiple edge servers via multiple USB cables.
[0077] The second acquisition module is used to acquire the operating system's configuration file.
[0078] The first settings module is used to set the boot screen in the operating system's configuration file to a graphical user interface.
[0079] The second settings module is used to set the automatic login user in the operating system's configuration file to the root user.
[0080] The first comment module is used to comment out options in the operating system's configuration files that are disabled for the root user.
[0081] The second comment module is used to comment out the options for system idle wait time in the operating system's configuration file.
[0082] The first module is used to add configuration to the operating system's configuration file to automatically open the first terminal.
[0083] The second module is used to add configurations for automatically executing production line diagnostic programs to the operating system's configuration file.
[0084] Optionally, the second added module also includes: The first addition submodule is used to add name recognition configuration for the first terminal to the operating system's configuration file.
[0085] The second submodule is used to add network connection status detection configurations for the edge server and production line diagnostic program server, based on the name recognition configuration.
[0086] The third submodule is used to add configurations for retrieving and automatically executing production line diagnostic programs from the production line diagnostic server, based on the network connection status detection configuration.
[0087] Optionally, the edge server diagnostic device also includes: The recovery module is used to restore the modified settings in the operating system's configuration file to their initial settings while preserving the fact that the boot screen in the operating system's configuration file is set to a graphical user interface.
[0088] The edge server diagnostic method provided in this invention responds to the power-on of the edge server by controlling the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file. By using the graphical user interface, the black screen program error bug that occurs when performing edge server diagnostics in the command line interface is avoided. When the name of the first terminal is determined to be the target name, the network connection status between the edge server and the production line diagnostic server is judged. If the network connection status is normal, the program directory of the production line diagnostic server is mounted to the edge server, the production line diagnostic program is copied from the program directory and executed automatically. By automatically executing the production line diagnostic program, the efficiency of production line operation is improved, manpower is saved, and production capacity is increased. This avoids the problem that edge server diagnostics cannot be performed due to the lack of a baseboard management controller and basic input / output system firmware.
[0089] This invention also provides an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement any edge server diagnostic method.
[0090] Figure 6 This is a block diagram illustrating an electronic device 500 according to an exemplary embodiment. For example, the electronic device 500 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0091] Reference Figure 6 The electronic device 500 may include one or more of the following components: processing component 502, memory 504, power supply component 506, multimedia component 508, audio component 510, input / output interface 512, sensor component 514, and communication component 516.
[0092] Processing component 502 typically controls the overall operation of device 500, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 502 may include one or more modules to facilitate interaction between processing component 502 and other components. For example, processing component 502 may include a multimedia module to facilitate interaction between multimedia component 508 and processing component 502.
[0093] Memory 504 is configured to store various types of data to support the operation of device 500. Examples of this data include instructions for any application or method operating on device 500, contact data, phonebook data, messages, pictures, videos, etc. Memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0094] Power supply component 506 provides power to various components of electronic device 500. Power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 500.
[0095] Multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 508 includes a front-facing camera and / or a rear-facing camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0096] Audio component 510 is configured to output and / or input audio signals. For example, audio component 510 includes a microphone (MIC) configured to receive external audio signals when electronic device 500 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 504 or transmitted via communication component 516. In some embodiments, audio component 510 also includes a speaker for outputting audio signals.
[0097] Input / output interface 512 provides an interface between processing component 502 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, start buttons, and lock buttons.
[0098] Sensor assembly 514 includes one or more sensors for providing state assessments of various aspects of electronic device 500. For example, sensor assembly 514 may detect the on / off state of electronic device 500, the relative positioning of components such as the display and keypad of electronic device 500, changes in position of electronic device 500 or a component of electronic device 500, the presence or absence of user contact with electronic device 500, orientation or acceleration / deceleration of electronic device 500, and temperature changes of electronic device 500. Sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 514 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0099] Communication component 516 is configured to facilitate wired or wireless communication between electronic device 500 and other devices. Electronic device 500 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 516 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 516 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0100] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the aforementioned edge server diagnostic method.
[0101] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, which can be executed by a processor 520 of an electronic device 500 to complete the aforementioned edge server diagnostic method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0102] As the device embodiment is basically similar to the method embodiment, the description is relatively simple. For relevant details, please refer to the description of the method embodiment.
[0103] The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. The structure required to construct such a device is readily apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0104] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0105] Similarly, it should be understood that, in order to simplify the invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof. However, this method of disclosure should not be construed as reflecting an intention that the claimed invention requires more features than expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into this detailed description, wherein each claim itself is a separate embodiment of the invention.
[0106] Those skilled in the art will understand that modules in the device of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0107] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present invention. The present invention can also be implemented as a device or apparatus program for performing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0108] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0109] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0110] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0111] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
[0112] It should be noted that the various data-related processes in the embodiments of this application are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with the authorization granted by the owner of the corresponding device.
Claims
1. A method for diagnosing edge servers, characterized in that, The method includes: In response to the power-on of the edge server, the root user is controlled to log in to the graphical user interface and open the first terminal through the operating system configuration file. The first terminal is used to print the logs of the production line diagnostic output. If the name of the first terminal is determined to be the target name, the network connection status between the edge server and the production line diagnostic server is determined. If the network connection is normal, the program directory of the production line diagnostic server is mounted to the edge server. Copy the production line diagnostic program from the program directory and execute it automatically. The production line diagnostic program is used to refresh the firmware version of the field replaceable unit (FRU), hard disk and microcontroller unit (MCU), check the various components of the machine, system logs and multiple status lights, and perform stress tests on the Reboot, CPU, memory and hard disk.
2. The method according to claim 1, characterized in that, The response to the power-on of the edge server, after controlling the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file, also includes: Obtain the name of the first terminal; If it is determined that the name of the first terminal is inconsistent with the target name, the diagnosis of the edge server is terminated.
3. The method according to claim 1, characterized in that, After determining that the name of the first terminal is the target name, and following the determination of the network connection status between the edge server and the production line diagnostic server, the method further includes: If the network connection status is abnormal, an automatic IP acquisition command is executed and a counter is used to record the number of times the automatic IP acquisition command is executed, wherein the automatic IP acquisition command is used to obtain the IP address of the edge server; After waiting for a preset time period, the network connection status between the edge server and the production line diagnostic server is checked again. If the network status is normal, then the program directory of the production line diagnostic server is mounted to the edge server; If the network connection status is still abnormal, execute the automatic IP acquisition command again and increment the counter by one; If the counter value is detected to be greater than the target preset value and the network connection status between the edge server and the production line diagnostic server is still abnormal, a network abnormality log will be printed to the first terminal.
4. The method according to claim 1, characterized in that, Before controlling the root user to log in to the graphical user interface and open the first terminal via the operating system's configuration file, the method further includes: Control the edge server to enter Recovery mode; In the Recovery mode, the operating system is burned into the edge server.
5. The method according to claim 4, characterized in that, Before controlling the edge server to enter recovery mode, the method further includes: Pre-configure the operating system installation package on the target device; When it is determined that there are multiple edge servers to be configured with the operating system installation package, a one-to-one connection relationship is established with multiple edge servers through multiple USB connection cables, wherein the multiple USB connection cables are configured through USB expansion devices; The target device and multiple edge servers are connected via multiple USB cables.
6. The method according to claim 1, characterized in that, Before controlling the root user to log in to the graphical user interface and open the first terminal via the operating system's configuration file, the method further includes: Obtain the configuration file of the operating system; Set the startup interface in the operating system's configuration file to the graphical user interface; Set the automatic login user in the operating system's configuration file to the Root user; Comment out the options in the operating system's configuration file that are disabled for the Root user; Comment out the system idle wait time option in the operating system's configuration file; Add a configuration to automatically open the first terminal in the operating system's configuration file; Add configuration to the operating system's configuration file to automatically execute production line diagnostic programs, including: Add name recognition configuration for the first terminal to the configuration file of the operating system; Based on the name recognition configuration, add a configuration for detecting the network connection status of the edge server and the production line diagnostic program server; Based on the network connection status detection configuration, add a configuration to obtain and automatically execute production line diagnostic programs from the production line diagnostic server.
7. The method according to claim 6, characterized in that, After copying the diagnostic program from the program directory and executing it automatically, the process further includes: While retaining the setting of the boot screen in the operating system's configuration file as the graphical user interface, the modifications in the operating system's configuration file are restored to their initial settings.
8. An edge server diagnostic device, characterized in that, Applied to programmable logic devices, including: The first control module is used to respond to the power-on of the edge server and control the root user to log in to the graphical user interface and open the first terminal through the operating system configuration file. The first terminal is used to print the logs output by the production line diagnostics. The first judgment module is used to determine the network connection status between the edge server and the production line diagnostic server when the name of the first terminal is determined to be the target name. The first mounting module is used to mount the program directory of the production line diagnostic server to the edge server if the network connection status is normal. The copy module is used to copy the production line diagnostic program from the program directory and execute it automatically. The production line diagnostic program is used to refresh the firmware version of the field replaceable unit (FRU), hard disk and microcontroller unit (MCU), check various machine components, system logs and multiple status lights, and perform stress tests on the Reboot, CPU, memory and hard disk.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to execute the instructions to implement the edge server diagnostic method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor, the edge server diagnostic method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
FPGA reliability test method and system, terminal and storage medium
CN109885438A
Security protection method and device for operating system mirror image and electronic equipment
CN111414612A