Cloud server diagnosis method, computer cluster system, electronic device, and medium
By combining online and offline diagnostic modes, the diagnostic capabilities for cloud server startup scenarios are enhanced, solving the problem of weak diagnostic capabilities in existing technologies and achieving an efficient diagnostic and repair solution.
Patent Information
- Application Number
- CN202310216597.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-03-02
AI Technical Summary
Existing technologies have weak diagnostic capabilities for cloud server startup scenarios, resulting in incomplete and inefficient diagnosis when startup instances fail.
By combining online and offline diagnostic modes, and by obtaining error information from the user's operating system and diagnosing the cloud server under the pre-installed operating system environment, the diagnostic capabilities are enhanced.
It enables centralized and efficient diagnosis of cloud server startup problems, saving resources and time, providing diagnostic reports and repair solutions, and supporting automatic or manual repair.
Smart Images

Figure CN116389226B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing, and more specifically, to a cloud server diagnostic method, a computer cluster system, an electronic device, a storage medium, and a computer program product. Background Technology
[0002] This section is intended to provide background or context for the embodiments of the invention set forth in the claims. The description herein is not an admission that it is prior art simply because it is included in this section.
[0003] When starting a cloud server, there is a problem where instance startup fails. One solution is to perform a comprehensive check on the instance in the console, including: local network checks, security group rule checks, account fee checks, instance storage checks, instance network checks, Linux host internal checks, Windows host internal checks, instance status checks, and instance performance checks. Of these, only the Linux host internal checks have three startup configuration-related diagnostic capabilities: binlib symbolic links, huge page memory configuration, and dynamic library hijacking configuration. However, this solution is a large and comprehensive diagnostic set, and its diagnostic capabilities for cloud server startup scenarios are weak. Summary of the Invention
[0004] This application provides a cloud server diagnostic method, a computer cluster system, an electronic device, a storage medium, and a computer program product to address the problem of weak diagnostic capabilities for cloud server startup scenarios in related technologies.
[0005] According to one aspect of the embodiments of this application, a cloud server diagnostic method is provided, including:
[0006] In response to a diagnostic request for a cloud server, corresponding diagnostic tasks are performed based on the cloud server's operating status, including:
[0007] When the cloud server is in the startup state, the cloud server is diagnosed based on the error information of the user operating system running on the cloud server;
[0008] When the cloud server is in a shutdown state, a pre-installed environment operating system is mounted on the cloud server, the cloud server is started using the pre-installed environment operating system, and the cloud server is diagnosed under the pre-installed environment operating system.
[0009] In some embodiments, the cloud server is diagnosed based on error information from the user operating system running on the cloud server, including:
[0010] Obtain a screenshot taken when the user's operating system reports an error, and obtain the error information based on the screenshot;
[0011] The error message indicates a problem with the user's operating system.
[0012] In some embodiments, obtaining the error information based on the screen snapshot includes:
[0013] Perform character recognition on the screenshot;
[0014] The identified text is processed using natural language processing to obtain the error message.
[0015] In some embodiments, the method further includes:
[0016] If, while the cloud server is in the startup state, no abnormality is diagnosed in the user operating system based on the error information, the cloud server is set to a shutdown state, the pre-installed environment operating system is mounted on the cloud server, the cloud server is started using the pre-installed environment operating system, and the cloud server is diagnosed under the pre-installed environment operating system.
[0017] In some embodiments, the cloud server is provided by a cloud platform, which includes a cloud management system. When the cloud server is in an offline state, the method further includes:
[0018] Obtain the logs of the cloud management system from the cloud platform;
[0019] The cloud platform is diagnosed based on the logs of the cloud management system.
[0020] In some embodiments, the cloud management system includes multiple sub-modules, each storing module logs. The logs of the cloud management system are retrieved from the cloud platform, including:
[0021] In response to a query request to the cloud server, the module logs of the target sub-module within a specified time range are obtained, wherein the target sub-module is the sub-module on which the cloud server depends.
[0022] In some embodiments, if the cloud management system is found to be free of abnormalities, the pre-installed environment operating system is mounted on the cloud server, the cloud server is started using the pre-installed environment operating system, and the cloud server is diagnosed under the pre-installed environment operating system.
[0023] In some embodiments, diagnostics are performed on the cloud server under the pre-installed operating system environment, including:
[0024] A diagnostic command is issued to the pre-installed environment operating system to execute a diagnostic script corresponding to the diagnostic command within the pre-installed environment operating system. This is achieved by, after the cloud server is started using the pre-installed environment operating system, mounting the disk containing the user's operating system as a data disk to the cloud server. The diagnostic script is used to diagnose the user's operating system on the data disk; and / or,
[0025] After diagnosing the cloud server under the pre-installed operating system, the pre-installed operating system is uninstalled from the cloud server.
[0026] In some embodiments, the method further includes:
[0027] After completing the diagnosis of the cloud server, a diagnostic report is generated, which includes: diagnostic results and / or repair solutions; the repair solutions include repair suggestion text and / or repair components, which are capable of responding to user input and generating repair instructions for running repair scripts in the operating system, which includes the user's operating system or the pre-installed environment operating system.
[0028] According to another aspect of the embodiments of this application, a computer cluster system is provided, including: a cloud server and a cloud management system, wherein the cloud management system is capable of executing the cloud server diagnosis method described above to diagnose the cloud server.
[0029] In some embodiments, the cloud management system includes a diagnostic module, a query module, and multiple sub-modules;
[0030] Each of the sub-modules stores module logs, and the cloud server depends on at least some of the sub-modules;
[0031] The diagnostic module is capable of executing the cloud server diagnostic method described above to diagnose the cloud server.
[0032] The query module can respond to query requests initiated by the diagnostic module and query the module logs of the target sub-module within a specified time range. The target sub-module is the sub-module on which the cloud server depends.
[0033] According to another aspect of the embodiments of this application, an electronic device is provided, including: a processor; and a memory storing a program, wherein the program includes instructions that, when executed by the processor, cause the processor to perform the steps of the cloud server diagnostic method described above.
[0034] According to another aspect of the embodiments of this application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to perform the steps of the cloud server diagnostic method described above.
[0035] According to another aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program, which, when executed by a processor, implements the steps of the cloud server diagnostic method described above.
[0036] The cloud server diagnostic method, computer cluster system, electronic device, storage medium, and computer program product provided in this application embodiment include: responding to a diagnostic request for a cloud server and executing corresponding diagnostic tasks based on the cloud server's operating status, including: when the cloud server is in a startup state, diagnosing the cloud server based on error information from the user operating system running on the cloud server; and when the cloud server is in a shutdown state, mounting a pre-installed operating system on the cloud server, starting the cloud server using the pre-installed operating system, and diagnosing the cloud server under the pre-installed operating system. This application combines online and offline diagnostic modes, concentrating resources on diagnosing cloud server startup problems, solving the problem of weak diagnostic capabilities for cloud server startup scenarios in related technologies, and achieving the beneficial effect of centralized and efficient diagnosis of cloud server startup problems. Attached Figure Description
[0037] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0038] Figure 1 An architecture diagram of a computer cluster system according to an embodiment of this application is shown;
[0039] Figure 2 A flowchart of a cloud server diagnostic method according to an embodiment of this application is shown;
[0040] Figure 3 A flowchart of another cloud server diagnostic method according to an embodiment of this application is shown;
[0041] Figure 4 A flowchart of another cloud server diagnostic method according to an embodiment of this application is shown;
[0042] Figure 5 This diagram illustrates an interactive principle of combining cloud platform diagnostics and offline diagnostics according to an embodiment of this application.
[0043] Figure 6A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0044] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0045] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0046] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0047] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0048] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0049] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:
[0050] vCPU: Virtual CPU.
[0051] PE disk: A disk containing a preinstallation environment (PE) operating system.
[0052] OCR: Character Recognition.
[0053] NLP: Natural Language Processing.
[0054] GuestOS: User operating system.
[0055] Fstab file: describes information about various file systems and stores data on the correspondence between file systems and directory structures.
[0056] Starting an instance is the first unavoidable step for users to use a cloud server, and it's also a high-frequency, critical operation. Occasionally, instance startup will fail, and the reasons for this are quite complex. Starting an instance often involves the user's operating system running on the cloud server and other systems on the cloud platform. Many factors can cause the instance to fail to start, including user-related issues such as image version or OS configuration problems, as well as issues on the cloud platform side. In emergency situations, such problems can also disrupt corresponding services.
[0057] Based on the above background, in one embodiment, please refer to Figure 1 This embodiment provides a computer cluster system, including a cloud server and a cloud management system. The cloud management system is capable of executing cloud server diagnostic methods to diagnose the cloud server. In some embodiments, the cloud management system includes a diagnostic module, a query module, and multiple sub-modules; each sub-module stores module logs, and the cloud server depends on at least some of the sub-modules; the diagnostic module is capable of executing cloud server diagnostic methods to diagnose the cloud server; the query module is capable of responding to query requests initiated by the diagnostic module and querying the module logs of a target sub-module within a specified time range, where the target sub-module is a sub-module that the cloud server depends on.
[0058] Cloud servers can include functional components such as instances, images, block storage, security groups, snapshots, and networks. An instance is essentially a virtual server, containing basic computing components such as vCPU, memory, operating system, network configuration, and disk. An image is like a "installation disk," providing the instance with an operating system and pre-installed software. Block storage is a distributed data storage device used for data storage, allowing random read and write operations. A security group is a virtual firewall that divides security isolation zones and implements network access control. A snapshot is a real-time copy of a cloud disk at a specific point in time, used for data backup, recovery, application disaster recovery, and image creation. A network can be a Virtual Private Cloud (VPC), a logically completely isolated private network in the cloud.
[0059] Please see Figure 2This is a flowchart of a cloud server diagnostic method provided in this embodiment, which is used to run the method on... Figure 1 Taking the diagnostic module in the example, the steps are as follows:
[0060] Step S101: In response to the diagnostic request for the cloud server, perform the corresponding diagnostic task according to the operating status of the cloud server, including: if the cloud server is in the startup state, perform step S102; if the cloud server is in the shutdown state, perform step S103.
[0061] The user's operating system generates a diagnostic request based on user input and sends it to the diagnostic module. User input can include selecting a problem scenario, such as "the cloud server cannot start." Upon receiving the diagnostic request, the diagnostic module initiates a diagnostic scan of the cloud server. Considering that the cloud server's operational status affects the diagnostic results, the diagnostic module first determines the cloud server's operational status and then selects an online / offline diagnostic mode based on that status.
[0062] Step S102: Diagnose the cloud server based on the error information from the user operating system running on the cloud server.
[0063] With the cloud server running, the diagnostic module will select online diagnostic mode. The module will query the database for error information related to the user's operating system and the error messages. In some embodiments, the diagnostic module may also query the database for repair solutions associated with the user's operating system error information. This database is specifically designed for cloud server startup issues and stores error messages related to cloud server startup problems, user operating system error information, and repair solutions.
[0064] Step S103: Mount the pre-installed environment operating system on the cloud server, start the cloud server using the pre-installed environment operating system, and perform diagnostics on the cloud server under the pre-installed environment operating system.
[0065] When the cloud server is offline, the diagnostic module will select offline diagnostic mode. The module mounts a pre-installed operating system (e.g., the user's operating system on a PE disk) on the cloud server. After booting the cloud server using the PE disk, the diagnostic module sends diagnostic commands to the pre-installed operating system, which then executes the corresponding diagnostic scripts. The disk containing the user's operating system is mounted as a data disk on the cloud server, and the diagnostic scripts are used to diagnose the user's operating system on the data disk.
[0066] In steps S101 to S103 above, based on the cloud server's operating status, and combining online and offline diagnostic modes, the diagnostic capabilities for cloud server startup scenarios are enhanced; resources are concentrated on diagnosing cloud server startup problems, avoiding unnecessary resource waste from full-scale diagnostics and saving diagnostic time. Thus, this embodiment can diagnose cloud server startup problems in a centralized and efficient manner.
[0067] In some embodiments, after diagnosing the cloud server under the pre-installed environment operating system, the diagnostic module will uninstall the pre-installed environment operating system from the cloud server.
[0068] In one embodiment, after executing step S102 or S103, i.e., after completing the diagnosis of the cloud server, the diagnostic module will generate a diagnostic report. The diagnostic report includes diagnostic results, repair solutions, or a combination of both. The repair solutions include repair suggestion text, repair components, or a combination of both. The repair components can respond to user input and generate repair instructions for running repair scripts in the operating system currently running on the cloud server. Repair instructions, i.e., computer script commands, can be executed within the operating system. The repair instructions can be encapsulated into a one-click repair tool. If the user clicks the "One-Click Repair" button in the operating system interface, the diagnostic module sends the corresponding repair instructions to the operating system. After the operating system completes the repair instructions, it returns the repair results to the diagnostic module. Specifically, for example, if the user's grub file is missing, the one-click repair tool can help the user install a pre-installed operating system, then use the pre-installed operating system to boot the cloud server. After restoring the grub boot file, the pre-installed operating system can be uninstalled. This setup eliminates any learning curve for users, offers comprehensive functionality and automated operation, diagnoses numerous issues, and provides users with manual repair suggestions or automated repair methods, thus achieving a complete closed loop in the problem-solving process.
[0069] In one embodiment, diagnosing a cloud server based on error messages from the user's operating system running on the cloud server can be achieved as follows: obtaining a screenshot of the user's operating system when an error occurs, retrieving the error message from the screenshot, and identifying the problem in the user's operating system based on the error message. When a pop-up appears on the user's operating system screen, the cloud server's snapshot component can be used to capture a screenshot, which the user's operating system then uploads to the diagnostic module. The diagnostic module performs character recognition (OCR) on the screenshot and natural language processing (NLP) on the recognized text to obtain the error message.
[0070] Taking the error message "1662001135: Windows system entered recovery environment due to an error" as an example, the diagnostic module matches the error message with the database to obtain a predefined error code. Then, it provides the repair solution and error code to the client, which can then repair the system using the repair documentation. An example of the repair documentation is as follows: The "Problem Description" states, "The Windows system instance runs normally for an extended period, but after restarting, it cannot enter the user's operating system. When accessing the instance via VNC, the desktop displays the system recovery option. Using previously backed-up automatic snapshots to restore the Windows system also fails." The "Possible Causes" state, "The Windows system may have entered the Windows recovery environment. When the Windows user operating system encounters an error or fails to boot, it will enter the recovery environment. This can be caused by various reasons, including: corrupted user registry, disk problems, driver problems, corrupted or missing system files, corrupted BCD (Boot Configuration Data) files, user error, viruses, third-party antivirus software, and abnormal forced restarts." The "Solution" states, "Regarding the system entering repair mode, we recommend using the solutions suggested by Microsoft's official technical support. For specific instructions, please refer to HowWindowsREWorks. To avoid the computer entering the system recovery interface after restarting and to ensure the system can recover from the failure, you can refer to the following in daily use to avoid problems: Store important data on a data disk. Regularly take snapshots of the system disk and data disk so that data can be recovered in case of problems. Back up the registry file before modifying the system registry to avoid modifying system files. Regularly run Windows Update to ensure that the latest Microsoft security updates are installed. Enable cloud security center or other commercial antivirus protection tools on ECS. Perform regular antivirus scans and regularly update the antivirus software version."
[0071] In one embodiment, see Figure 3 This is a flowchart of another cloud server diagnostic method provided in this embodiment, which is implemented using this method. Figure 1 Taking the diagnostic module in the example, the steps are as follows:
[0072] Step S201: Receive a diagnostic request for the cloud server;
[0073] Step S202: Determine whether the cloud server is running; if yes, proceed to step S203; otherwise, proceed to step S204.
[0074] Step S203: Diagnose the cloud server based on the error information from the user operating system running on the cloud server;
[0075] Step S204: Mount the pre-installed environment operating system on the cloud server, start the cloud server using the pre-installed environment operating system, and perform diagnostics on the cloud server under the pre-installed environment operating system; after completing the current step, proceed to step S207.
[0076] Step S205: Determine whether the error message from the user's operating system indicates an abnormality in the user's operating system; if yes, proceed to step S207; otherwise, proceed to step S206.
[0077] Step S206: Set the cloud server to a shutdown state; after completing the current step, proceed to step S204.
[0078] Step S207: Generate a diagnostic report.
[0079] In this embodiment, online and offline diagnostics are combined, both of which diagnose the user's operating system running on the cloud server. First, an online diagnostic is performed on the user's operating system. If the online diagnostic detects an anomaly, a diagnostic report is generated. If the online diagnostic fails to detect an anomaly, an offline diagnostic is performed. If the offline diagnostic detects an anomaly, a diagnostic report is generated.
[0080] In one embodiment, another cloud server diagnostic method is provided, wherein the cloud server is provided by a cloud platform, the cloud platform includes a cloud management system, and the cloud server depends on the cloud management system. The cloud server diagnostic method in this embodiment includes the following steps:
[0081] The diagnostic module responds to diagnostic requests for the cloud server and performs corresponding diagnostic tasks based on the cloud server's operating status. These tasks include: when the cloud server is running, diagnosing the cloud server based on error messages from the user operating system running on the cloud server; when the cloud server is shut down, retrieving logs from the cloud management system within the cloud platform; diagnosing the cloud platform based on the cloud management system logs; and generating a diagnostic report.
[0082] In some embodiments, the cloud management system includes multiple sub-modules, each storing module logs. Obtaining the cloud management system logs in the cloud platform includes: responding to a query request initiated by a client, obtaining the module logs of a target sub-module within a specified time range, wherein the target sub-module is a sub-module on which the cloud server depends.
[0083] In this embodiment, online diagnostics and cloud platform diagnostics are combined. Online diagnostics diagnose the user operating system of the cloud server, while cloud platform diagnostics diagnose the various sub-modules of the cloud management system on the cloud platform side. This approach provides diverse methods for locating problems and comprehensive coverage of issues.
[0084] In one embodiment, another cloud server diagnostic method is provided, wherein the cloud server is provided by a cloud platform, the cloud platform includes a cloud management system, and the cloud server depends on the cloud management system. The cloud server diagnostic method in this embodiment includes the following steps:
[0085] The diagnostic module responds to diagnostic requests for the cloud server and performs corresponding diagnostic tasks based on the cloud server's operating status. These tasks include: when the cloud server is in a downtime state, the diagnostic module mounts a pre-installed operating system on the cloud server, starts the cloud server using the pre-installed operating system, and performs diagnostics on the cloud server under the pre-installed operating system; the diagnostic module retrieves logs from the cloud management system in the cloud platform; performs diagnostics on the cloud platform based on the logs from the cloud management system; and the diagnostic module generates a diagnostic report.
[0086] In some embodiments, the cloud management system includes multiple sub-modules, each storing module logs. Obtaining the logs of the cloud management system in the cloud platform includes: in response to a query request to the cloud server, obtaining the module logs of a target sub-module within a specified time range, wherein the target sub-module is a sub-module on which the cloud server depends.
[0087] In one embodiment, another cloud server diagnostic method is provided, wherein the cloud server is provided by a cloud platform, the cloud platform includes a cloud management system, and the cloud server depends on the cloud management system. The cloud server diagnostic method in this embodiment includes the following steps:
[0088] The diagnostic module responds to diagnostic requests for the cloud server and performs corresponding diagnostic tasks based on the cloud server's operating status. These tasks include: if the cloud server is in a downtime state, the diagnostic module retrieves logs from the cloud management system within the cloud platform; performs diagnostics on the cloud platform based on the cloud management system logs; if the diagnosis indicates that the cloud management system is not abnormal, it mounts a pre-installed operating system on the cloud server, starts the cloud server using the pre-installed operating system, and performs diagnostics on the cloud server under the pre-installed operating system; and generates a diagnostic report.
[0089] In some embodiments, the cloud management system includes multiple sub-modules, each storing module logs. Obtaining the logs of the cloud management system in the cloud platform includes: in response to a query request to the cloud server, obtaining the module logs of a target sub-module within a specified time range, wherein the target sub-module is a sub-module on which the cloud server depends.
[0090] In one embodiment, see Figure 4 This is a flowchart of another cloud server diagnostic method provided in this embodiment, which is implemented using this method. Figure 1 Taking the diagnostic module in the example, the steps are as follows:
[0091] Step S301: Receive a diagnostic request for the cloud server;
[0092] Step S302: Determine whether the cloud server is running; if yes, proceed to step S303; otherwise, proceed to step S304.
[0093] Step S303: Diagnose the cloud server based on the error information from the user operating system running on the cloud server;
[0094] Step S304: Obtain the logs of the cloud management system in the cloud platform, and diagnose the cloud platform based on the logs of the cloud management system;
[0095] Step S305: Determine whether the error message from the user's operating system indicates an abnormality in the user's operating system; if yes, proceed to step S309; otherwise, proceed to step S306.
[0096] Step S306: Set the cloud server to a shutdown state; after completing the current step, proceed to step S304.
[0097] Step S307: Determine whether there is an anomaly in the cloud management system; if yes, proceed to step S309; otherwise, proceed to step S308.
[0098] Step S308: Mount the pre-installed environment operating system on the cloud server, start the cloud server using the pre-installed environment operating system, and perform diagnostics on the cloud server under the pre-installed environment operating system.
[0099] Step S309: Generate a diagnostic report.
[0100] In this embodiment, the diagnostic module responds to a query request to the cloud server by obtaining the module logs of the target sub-module within a specified time range. The target sub-module is the sub-module on which the cloud server depends.
[0101] In this embodiment, online diagnostics, offline diagnostics, and cloud platform diagnostics are combined. Both online and offline diagnostics involve diagnosing the user's operating system running on the cloud server, while cloud platform diagnostics involves diagnosing each sub-module of the cloud management system on the cloud platform side.
[0102] First, an online diagnostic is performed on the user's operating system on the cloud server. If the online diagnostic detects an anomaly in the user's operating system, a diagnostic report is returned to the client. If the online diagnostic fails to detect an anomaly in the user's operating system, a diagnostic is performed on the cloud platform. If the cloud management system is found to be faulty, a diagnostic report is returned to the client. If the cloud management system is functioning normally, an offline diagnostic is performed on the user's operating system on the cloud server. If the offline diagnostic detects an anomaly in the user's operating system, a diagnostic report is returned to the client. After completing these three processes—online diagnostic, cloud platform diagnostic, and offline diagnostic—if any problem is detected in any of the intermediate processes, the diagnostic process is terminated, and a diagnostic report and a repair plan are presented to the client.
[0103] This embodiment describes a diagnostic method for cloud server startup problems. It includes not only diagnosing the user's operating system running on the cloud server but also diagnosing the cloud platform itself, helping users comprehensively identify, locate, and resolve issues. The combination of offline and online diagnostics provides diverse problem-solving methods and comprehensive coverage. The targeted diagnostic set ensures clear user guidance and avoids wasting the diagnostic system's resources on meaningless diagnoses, saving both resources and diagnostic time. It can help users automatically repair problems and quickly restore system operation.
[0104] In one embodiment, see Figure 5 This embodiment provides an interactive principle diagram combining cloud platform diagnosis and offline diagnosis, such as... Figure 5 As shown, the diagnostic module first sends a query request to the query module. The query module searches for module logs within a specified time range in each submodule of the cloud management system. After the search is complete, it returns the search results to the diagnostic module. If the diagnostic module finds an anomaly in the cloud management system, it generates a diagnostic report, prompting the user to seek technical support from the cloud platform and sending an internal alarm. If the management system problem is resolved, the diagnostic module mounts a system repair disk (i.e., the pre-installed environment operating system) on the user's operating system (GuestOS). The cloud server is then started in repair mode using the system repair disk, with the user's original system disk mounted as a data disk. After the cloud server starts, the system repair disk reports a heartbeat to the diagnostic module. Upon receiving the heartbeat information, the diagnostic module sends diagnostic commands to the cloud server. The system repair disk runs the diagnostic commands on the user's original system disk and returns the results to the diagnostic module. Based on the returned diagnostic results, the diagnostic module generates a corresponding diagnostic report for the user, including repair suggestions or a one-click repair tool. If the user chooses one-click repair, the diagnostic module sends the corresponding repair commands to the cloud server. After the cloud server runs the repair commands, it returns the repair results to the diagnostic module. The diagnostic module uninstalls the system repair disk from the user's operating system.
[0105] For example, when a non-existent device appears in the device file Fstab of a Linux system, the Linux system loads the Fstab file during boot and loads devices according to the file. If the device does not exist, the system will freeze and report an error, failing to boot. The diagnostic module will first diagnose problems with the cloud platform. If no problems are found, it will mount a system repair disk on the cloud server to boot it in repair mode, and then run a fault detection program to perform a comprehensive check. If a non-existent device is found in the Fstab file, the module will obtain the error information and report it to the diagnostic module. After receiving the error information, the diagnostic module will return it to the user and provide corresponding repair solutions. If the cloud platform has the capability, it will also provide the user with a one-click repair tool.
[0106] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, which, when executed by the at least one processor, causes the electronic device to perform a cloud server diagnostic method according to embodiments of this disclosure.
[0107] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a cloud server diagnostic method according to embodiments of this disclosure.
[0108] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a computer's processor, the computer program is used to cause the computer to perform a cloud server diagnostic method according to embodiments of this disclosure.
[0109] refer to Figure 6 The present invention describes a structural block diagram of an electronic device 400 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0110] like Figure 6As shown, the electronic device 400 includes a computing unit 401, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 402 or a computer program loaded from a storage unit 408 into a random access memory (RAM) 403. The RAM 403 may also store various programs and data required for the operation of the device 400. The computing unit 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0111] Multiple components in electronic device 400 are connected to I / O interface 405, including: input unit 406, output unit 407, storage unit 408, and communication unit 409. Input unit 406 can be any type of device capable of inputting information to electronic device 400. Input unit 406 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 407 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 408 may include, but is not limited to, disks and optical discs. Communication unit 409 allows electronic device 400 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0112] The computing unit 401 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above. For example, in some embodiments, the aforementioned cloud desktop encoding method, cloud desktop reconstruction method, or cloud desktop display method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 400 via ROM 402 and / or communication unit 409. In some embodiments, the computing unit 401 can be configured to perform the cloud desktop encoding method, cloud desktop reconstruction method, or cloud desktop display method by any other suitable means (e.g., by means of firmware).
[0113] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0114] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0115] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0116] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display)) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0117] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0118] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0119] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A cloud server diagnostic method, characterized in that, include: In response to a diagnostic request for a cloud server, corresponding diagnostic tasks are performed based on the cloud server's operating status, including: When the cloud server is in the startup state, the cloud server is diagnosed based on the error information of the user operating system running on the cloud server; When the cloud server is in a shutdown state, a pre-installed environment operating system is mounted on the cloud server, the cloud server is started using the pre-installed environment operating system, and the cloud server is diagnosed under the pre-installed environment operating system; this includes: issuing diagnostic commands to the pre-installed environment operating system to execute a diagnostic script corresponding to the diagnostic commands in the pre-installed environment operating system, wherein, after the cloud server is started using the pre-installed environment operating system, the disk where the user operating system is located is mounted as a data disk on the cloud server, and the diagnostic script is used to diagnose the user operating system on the data disk.
2. The cloud server diagnostic method according to claim 1, characterized in that, Diagnosing the cloud server based on error information from the user operating system running on the cloud server includes: Obtain a screenshot taken when the user's operating system reports an error, and obtain the error information based on the screenshot; The error message indicates a problem with the user's operating system.
3. The cloud server diagnostic method according to claim 2, characterized in that, The error information is obtained based on the screenshot, including: Perform character recognition on the screenshot; The identified text is processed using natural language processing to obtain the error message.
4. The cloud server diagnostic method according to claim 1, characterized in that, The method further includes: If, while the cloud server is in the startup state, no abnormality is diagnosed in the user operating system based on the error information, the cloud server is set to a shutdown state, the pre-installed environment operating system is mounted on the cloud server, the cloud server is started using the pre-installed environment operating system, and the cloud server is diagnosed under the pre-installed environment operating system.
5. The cloud server diagnostic method according to claim 1, characterized in that, The cloud server is provided by a cloud platform, which includes a cloud management system. When the cloud server is in an offline state, the method further includes: Obtain the logs of the cloud management system from the cloud platform; The cloud platform is diagnosed based on the logs of the cloud management system.
6. The cloud server diagnostic method according to claim 5, characterized in that, The cloud management system includes multiple sub-modules, each storing module logs. The logs of the cloud management system are retrieved from the cloud platform, including: In response to a query request to the cloud server, the module logs of the target sub-module within a specified time range are obtained, wherein the target sub-module is the sub-module on which the cloud server depends.
7. The cloud server diagnostic method according to claim 5, characterized in that, If the diagnosis finds that the cloud management system has no abnormalities, then the pre-installed environment operating system is mounted on the cloud server, the cloud server is started using the pre-installed environment operating system, and the cloud server is diagnosed under the pre-installed environment operating system.
8. The cloud server diagnostic method according to any one of claims 1, 4, or 7, characterized in that, Diagnostic procedures are performed on the cloud server under the pre-installed operating system environment, including: After diagnosing the cloud server under the pre-installed operating system, the pre-installed operating system is uninstalled from the cloud server.
9. The cloud server diagnostic method according to any one of claims 1 to 7, characterized in that, The method further includes: After completing the diagnosis of the cloud server, a diagnostic report is generated, which includes: diagnostic results and / or repair solutions; the repair solutions include repair suggestion text and / or repair components, which are capable of responding to user input and generating repair instructions for running repair scripts in the operating system, which includes the user's operating system or the pre-installed environment operating system.
10. A computer cluster system, characterized in that, include: A cloud server and a cloud management system, wherein the cloud management system is capable of executing the cloud server diagnostic method according to any one of claims 1 to 9 to diagnose the cloud server.
11. The computer cluster system according to claim 10, characterized in that, The cloud management system includes a diagnostic module, a query module, and multiple sub-modules. Each of the sub-modules stores module logs, and the cloud server depends on at least some of the sub-modules; The diagnostic module is capable of executing the cloud server diagnostic method according to any one of claims 1 to 9 to diagnose the cloud server; The query module can respond to query requests initiated by the diagnostic module and query the module logs of the target sub-module within a specified time range. The target sub-module is the sub-module on which the cloud server depends.
12. An electronic device, comprising: processor; And a memory for storing programs, characterized in that the programs include instructions that, when executed by the processor, cause the processor to perform the steps of the cloud server diagnostic method according to any one of claims 1 to 9.
13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the steps of the cloud server diagnostic method according to any one of claims 1 to 9.
14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the cloud server diagnostic method according to any one of claims 1 to 9.
Citation Information
Patent Citations
System exception monitoring method and device, computer equipment and storage medium
CN111752793A