Diskless Device Boot Failure Detection Method, Device, Diskless Device and Storage Medium
By detecting the initialization, network status and operating system startup process of diskless devices, abnormal results are automatically output, which solves the problem that diskless devices cannot start normally during network failure, and improves the fault detection efficiency.
Patent Information
- Application Number
- CN202111507930.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2041-12-10
AI Technical Summary
The diskless device cannot start normally when the network fails, making it difficult for maintenance personnel to detect and troubleshoot.
Provides a diskless device startup fault detection method, which automatically outputs abnormal results to help maintenance personnel troubleshoot faults by detecting network equipment initialization, network status and operating system startup process.
It can accurately locate abnormal situations during the startup process of diskless equipment, improve the fault detection efficiency of maintenance personnel, and ensure that diskless equipment can start and run normally.
Smart Images

Figure CN114218028B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of diskless devices, and particularly to a method and device for detecting startup faults of diskless devices, a diskless device, and a storage medium. Background Art
[0002] A diskless device is a computer device without a hard disk device. The operating system image required for its operation is stored in the cloud and needs to interact with the cloud server through the network to maintain normal operation. In related technologies, the startup of a diskless workstation is extremely dependent on the network. When a network fault occurs, the device cannot only not start normally, but even cannot load the operating system, resulting in the inability to perform manual fault detection, which brings obstacles to the troubleshooting work of maintenance personnel.
[0003] Therefore, how to detect the startup faults of such diskless devices is a technical problem that those skilled in the art need to face. Summary of the Invention
[0004] The purpose of the present invention is to provide a method and device for detecting startup faults of diskless devices, a diskless device, and a storage medium, which can detect each startup process of the operating system of the diskless device, and then can accurately locate the abnormal situations existing during startup, and can effectively improve the efficiency of maintenance personnel in troubleshooting the startup faults of diskless devices.
[0005] To solve the above technical problems, the present invention provides a method for detecting startup faults of diskless devices, including:
[0006] When it is detected that the diskless device starts to start the operating system, detecting whether the network device of the diskless device has completed initialization to obtain a first detection result;
[0007] If the first detection result is that the network device has completed initialization, detecting whether the network status of the diskless device is normal to obtain a second detection result;
[0008] If the second detection result is that the network status is normal, detecting whether the diskless device has completed the startup of the operating system to obtain a third detection result;
[0009] If the third detection result is that the operating system has completed startup, exiting the fault detection;
[0010] If there is an abnormal result among the first detection result, the second detection result, and the third detection result, outputting the abnormal result.
[0011] Preferably, after it is detected that the diskless device starts to start the operating system, it further includes:
[0012] Starting a TDI notification routine;
[0013] Correspondingly, detecting whether the network device of the diskless device is initialized includes:
[0014] Using the TDI notification routine to determine whether the network card of the diskless device has completed loading the network card driver;
[0015] If so, generate a first detection result indicating that the network device is initialized;
[0016] If not, generate a first detection result indicating that the network device is not initialized;
[0017] Correspondingly, detecting whether the network status of the diskless device is normal includes:
[0018] Using the TDI notification routine to obtain the network IP of the diskless device and determine whether the network IP is a preset default value;
[0019] If so, generate a second detection result indicating that the network status is abnormal;
[0020] If not, generate a second detection result indicating that the network status is normal.
[0021] Preferably, after determining that the network card has completed loading the network card driver, it further includes:
[0022] Determine whether the diskless device has completed loading the network disk driver;
[0023] If so, execute the step of generating the first detection result indicating that the network device is initialized;
[0024] If not, execute the step of generating the first detection result indicating that the network device is not initialized. Preferably, after detecting that the diskless device starts to boot the operating system, it further includes:
[0025] Start the process loading notification routine so that the process loading notification routine can obtain the processes loaded by the diskless device;
[0026] Correspondingly, detecting whether the diskless device has completed booting the operating system includes:
[0027] Determine whether the diskless device has completed mounting the system disk;
[0028] If completed, determine whether the system desktop process is included in the loaded processes; if so, generate a third detection result indicating that the operating system has completed booting; if not, generate a third detection result indicating that the system desktop process has not been started;
[0029] If not completed, generate a third detection result indicating that the system disk has not been mounted.
[0030] Preferably, outputting the abnormal result includes:
[0031] Invoking the Inbv interface in the system kernel of the diskless device, and outputting the abnormal result to the display device of the diskless device through the Inbv interface.
[0032] Preferably, after detecting that the diskless device starts to boot the operating system, it further includes:
[0033] Waiting for a preset time, and performing the step of detecting whether the network device of the diskless device is initialized after the waiting ends.
[0034] The present invention also provides a diskless device startup fault detection device, including:
[0035] An initialization detection module, configured to detect whether the network device of the diskless device is initialized when detecting that the diskless device starts to boot the operating system, and obtain a first detection result;
[0036] A network status detection module, configured to detect whether the network status of the diskless device is normal if the first detection result is that the network device is initialized, and obtain a second detection result;
[0037] A system startup detection module, configured to detect whether the diskless device has completed booting the operating system if the second detection result is that the network status is normal, and obtain a third detection result;
[0038] An exit module, configured to exit the fault detection if the third detection result is that the operating system has completed booting;
[0039] An output module, configured to output the abnormal result if there is an abnormal result among the first detection result, the second detection result, and the third detection result.
[0040] Preferably, it further includes:
[0041] A TDI notification routine startup module, configured to start the TDI notification routine;
[0042] Correspondingly, the initialization detection module includes:
[0043] A network card detection sub-module, configured to use the TDI notification routine to determine whether the network card of the diskless device has completed loading the network card driver;
[0044] A first result generation sub-module, configured to generate a first detection result indicating that the network device is initialized if so;
[0045] A second result generation sub-module, configured to, if not, generate a first detection result indicating that the network device has not completed initialization;
[0046] Correspondingly, the network status detection module includes:
[0047] An IP detection sub-module, configured to obtain the network IP of the diskless device by using the TDI notification routine, and determine whether the network IP is a preset default value;
[0048] A third result generation sub-module, configured to, if so, generate a second detection result indicating that the network status is abnormal;
[0049] A fourth result generation sub-module, configured to, if not, generate a second detection result indicating that the network status is normal.
[0050] The present invention further provides a diskless device, including:
[0051] A memory, configured to store a computer program;
[0052] A processor, configured to implement the diskless device startup fault detection method as described above when executing the computer program.
[0053] The present invention further provides a storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the diskless device startup fault detection method as described above is implemented.
[0054] The present invention provides a diskless device startup fault detection method, including: when it is detected that the diskless device starts to boot the operating system, detecting whether the network device of the diskless device has completed initialization to obtain a first detection result; if the first detection result is that the network device has completed initialization, detecting whether the network status of the diskless device is normal to obtain a second detection result; if the second detection result is that the network status is normal, detecting whether the diskless device has completed the startup of the operating system to obtain a third detection result; if the third detection result is that the operating system has completed startup, exiting the fault detection; if there is an abnormal result among the first detection result, the second detection result, and the third detection result, outputting the abnormal result.
[0055] It can be seen that when the present invention detects that a diskless device starts to boot the operating system, it will first automatically detect whether the network device of the device has been initialized and generate a first detection result. If the network device cannot be initialized, the diskless device cannot interact with the server for data; after determining that the network device has been initialized, the present invention will continue to detect whether the network status of the diskless device is normal, that is, determine whether the diskless device can interact with the server for data and generate a second detection result; after determining that the network status is normal, it will continue to detect whether the diskless device has started the system desktop process, that is, determine whether the diskless device has correctly loaded the operating system and can enter the operation interface, and generate a third detection result. If there is an abnormal result among the first detection result, the second detection result or the third detection result, the abnormal result will be automatically output. In other words, the present invention can detect each startup process of the diskless device operating system, can accurately locate the abnormal conditions existing during startup, and can automatically output the abnormal results, which can effectively improve the efficiency of maintenance personnel in detecting startup failures of diskless devices. The present invention also provides a diskless device startup failure detection device, a diskless device and a storage medium, which have the above beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.
[0057] Figure 1 It is a flowchart of a method for detecting startup failures of a diskless device provided by an embodiment of the present invention;
[0058] Figure 2 It is a flowchart of another method for detecting startup failures of a diskless device provided by an embodiment of the present invention;
[0059] Figure 3 It is a structural block diagram of a diskless device startup failure detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0060] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0061] A diskless device is a computer device without a hard disk device. The operating system image required for its operation is stored in the cloud and needs to interact with the cloud server through the network to maintain normal operation. In related technologies, the startup of a diskless workstation is extremely dependent on the network. When a network failure occurs, the device not only cannot start normally, but even cannot load the operating system, resulting in the inability to perform manual fault detection, which brings obstacles to the troubleshooting work of maintenance personnel. In view of this, the present invention provides a method for detecting startup faults of a diskless device, which can detect each startup process of the operating system of the diskless device, and then accurately locate abnormal situations existing during startup, and can effectively improve the efficiency of maintenance personnel in troubleshooting startup faults of the diskless device. Please refer to Figure 1 , Figure 1 is a flowchart of a method for detecting startup faults of a diskless device provided by an embodiment of the present invention. The method may include:
[0062] S101. When it is detected that the diskless device starts to boot the operating system, detect whether the network device of the diskless device is initialized to obtain a first detection result.
[0063] The embodiment of the present invention can be executed by a separate detection driver, which will start running at the system startup stage to detect each startup stage of the system. It should be noted that the embodiment of the present invention does not limit the specific form of the detection driver, and can be set with reference to the related technologies of the operating system and combined with actual application requirements.
[0064] Since the startup of diskless devices is extremely dependent on the network, it is understandable that when the operating system starts to boot, it first needs to start the network device to communicate with an external server through the network device and rely on the network device to run the operating system. It should be noted that the network device in the embodiments of the present invention may include network communication devices, such as network cards, or may include network storage devices, such as network disks; of course, the network device may also include other devices in the diskless device that work using the network, and reference may be made to the related technologies of diskless devices. Since network communication is very important for the startup of diskless devices, the detection driver in the embodiments of the present invention will first detect whether the network card of the diskless device has been initialized. Specifically, a separate TDI notification routine can be set to detect the initialization status of the network card device, where TDI (Transport Driver Interface) is the transport layer driver interface, and a routine is a collection of function interfaces or services provided by a certain system to the outside. It can be understood that the main content of the initialization of the network card device is to load the driver. Therefore, as long as the TDI notification routine detects that the network card device has completed driver loading, it can be determined that the network card device has been initialized. Of course, in order to start the work of the TDI notification routine, the detection driver needs to detect that the diskless device starts to boot the operating system and then register the TDI notification routine. It should be noted that the embodiments of the present invention do not limit the specific form of the TDI notification routine, and reference may be made to the related technologies of TDI, network card devices, and operating systems.
[0065] In a possible situation, after detecting that the diskless device starts to boot the operating system, it may further include:
[0066] Step 11: Start the TDI notification routine;
[0067] Correspondingly, detecting whether the network device of the diskless device has been initialized may include:
[0068] Step 21: Use the TDI notification routine to determine whether the network card of the diskless device has completed network card driver loading; if so, go to Step 22; if not, go to Step 23;
[0069] Step 22: Generate a first detection result indicating that the network device has been initialized;
[0070] Step 23: Generate a first detection result indicating that the network device has not been initialized.
[0071] It should be noted that the embodiments of the present invention do not limit the specific form of the first detection result. For example, it may be a high or low level, an identification symbol, or a small piece of code, and can be set according to actual application requirements as long as it can distinguish whether the network device has been initialized.
[0072] In addition, since diskless devices need to use network disks to run the operating system, after determining that the network card device is normal in the embodiments of the present invention, it is also possible to detect whether the network disk is normal. Specifically, since diskless devices need to rely on relevant drivers to mount and run network disks, the embodiments of the present invention can detect whether the corresponding network disk driver has been loaded. The embodiments of the present invention do not limit the specific network disk driver, nor the specific loading detection method of the driver, and relevant technologies of diskless devices can be referred to. It should be noted that the detection of the network disk driver is not performed by the TDI notification routine, but by other threads, routines, or the detection driver itself.
[0073] In a possible situation, after determining that the network card has completed the loading of the network card driver, it may further include:
[0074] Step 31: Determine whether the diskless device has completed the loading of the network disk driver; if so, proceed to Step 32; if not, proceed to Step 33;
[0075] Step 32: Execute the step of generating a first detection result indicating that the network device has completed initialization;
[0076] Step 33: Execute the step of generating a first detection result indicating that the network device has not completed initialization.
[0077] S102. Determine whether the first detection result is that the network device has completed initialization; if so, proceed to step S103; if not, proceed to step S108.
[0078] S103. If the first detection result is that the network device has completed initialization, detect whether the network status of the diskless device is normal to obtain a second detection result.
[0079] After the network device is initialized, after the diskless device completes the configuration of network information (such as IP, subnet mask, DNS server, etc.), it can communicate with an external server to perform the subsequent system startup process. However, during the network information configuration process, the diskless device may encounter configuration failure problems, such as IP acquisition failure or IP conflict. At this time, it is necessary to detect the network status between the diskless device and the outside world to determine whether the diskless device can communicate with the outside normally.
[0080] Specifically, since when the network device has a network configuration exception, it will automatically set the network IP to a preset default value (for example, 169.254.XX.XX), in the embodiments of the present invention, the network IP of the diskless device can be obtained, and it can be determined whether the diskless device can communicate with the outside normally by determining whether the network IP is the preset default value. Further, the network IP can be obtained by the TDI notification routine for detecting the network card device.
[0081] In a possible scenario, detecting whether the network status of a diskless device is normal may include:
[0082] Step 41: Use the TDI notification routine to obtain the network IP of the diskless device and determine whether the network IP is a preset default value; if so, proceed to Step 42; if not, proceed to Step 43;
[0083] Step 42: If so, generate a second detection result indicating an abnormal network status;
[0084] Step 43: If not, generate a second detection result indicating a normal network status.
[0085] It should be noted that the embodiments of the present invention do not limit the specific form of the second detection result. For example, it can be a high or low level, an identification symbol, or a short piece of code, which can be set according to actual application requirements as long as it can distinguish whether the network status of the diskless device is normal.
[0086] S104. Determine whether the second detection result indicates a normal network status; if so, proceed to Step S105; if not, proceed to Step S108.
[0087] S105. If the second detection result indicates a normal network status, detect whether the diskless device has completed the startup of the operating system to obtain a third detection result.
[0088] After initializing the network device and being able to communicate with the outside world, the diskless device can load system files from the target server and complete subsequent system startup. However, during this system startup phase, the diskless device may encounter situations where system file loading fails and system startup cannot be completed. At this time, it is necessary to determine whether the diskless device has correctly loaded the system files. Specifically, during the system startup process of the diskless device, the network disk driver should first be used to complete the mounting of the system disk. If the mounting cannot be done correctly, the operating system cannot be loaded. Therefore, it is necessary to detect the mounting situation of the system disk. It should be noted that the embodiments of the present invention do not limit the specific method of system disk mounting detection, and relevant technologies of the diskless device can be referred to. In addition, at the final stage of system loading, the operating system will start the system desktop process to output the user interface. Therefore, the embodiments of the present invention can also determine whether the diskless device has started the system desktop process, and further determine whether the diskless device has completed system loading. It can be understood that the embodiments of the present invention need to obtain which processes have been started by the diskless device during system loading, and then determine whether there is a system desktop process among these processes. To improve the detection efficiency, the embodiments of the present invention can use a separate process loading notification routine to perform the task of obtaining the processes that have been started by the diskless device. Specifically, the process loading notification routine will obtain all the processes that have been started by the diskless device and determine whether these processes include the system desktop process. If so, it is determined that the diskless device has completed system loading; otherwise, it is determined that the diskless device has not completed system loading. It can be understood that to start the work of the process loading notification routine, the detection driver needs to register the process loading notification routine after detecting that the diskless device starts to boot the operating system. It should be noted that the embodiments of the present invention do not limit the specific form of the process loading notification routine, and relevant technologies of the operating system can be referred to.
[0089] In a possible situation, after detecting that the diskless device starts to boot the operating system, it may further include:
[0090] Step 51: Start the process loading notification routine so that the process loading notification routine obtains the processes that have been loaded by the diskless device;
[0091] Correspondingly, detecting whether the diskless device has completed booting the operating system may include:
[0092] Step 61: Determine whether the diskless device has completed mounting the system disk; if so, go to step 63; if not, go to step 62; Step 62: Generate a third detection result indicating that the system disk is not mounted;
[0093] Step 63: Determine whether the system desktop process is included in the loaded processes; if so, go to step 64; if not, go to step 65;
[0094] Step 64: Generate a third detection result indicating that the operating system has completed startup;
[0095] Step 65: Generate a third detection result indicating that the system desktop process has not started.
[0096] It should be noted that the embodiments of the present invention do not limit the specific form of the third detection result. For example, it can be a high or low level, an identification symbol, or a small piece of code, which can be set according to actual application requirements.
[0097] S106. Determine whether the third detection result is that the operating system has completed startup; if so, proceed to step S107; if not, proceed to step S108;
[0098] S107. If the third detection result is that the operating system has completed startup, exit the fault detection.
[0099] S108. If there is an abnormal result among the first detection result, the second detection result, and the third detection result, output the abnormal result.
[0100] In the related art, if a diskless device fails to complete system loading, at this time, since the system cannot be entered, the administrator will be unable to troubleshoot the abnormality. Therefore, in the embodiments of the present invention, after the detection driver detects each stage of the system startup of the diskless device, if there is an abnormal result among the obtained first detection result, second detection result, and third detection result, the abnormal result will be output. Specifically, the Inbv interface of the operating system kernel can be called for output. The Inbv interface includes various display tools such as obtaining screen control rights, resetting the screen, turning on the display, outputting display text, installing a text filter, setting a scrolling area, setting the screen background color, and setting the display text color, which can ensure that the abnormal result can be effectively output to the display device of the diskless device.
[0101] In a possible situation, outputting the abnormal result may include:
[0102] Step 61: Call the Inbv interface in the system kernel of the diskless device and output the abnormal result to the display device of the diskless device through the Inbv interface.
[0103] Finally, to avoid occupying system startup resources and reducing the startup efficiency, the detection driver can also wait for a preset time after detecting that the diskless device starts to boot the operating system, and then perform a startup detection on the diskless device after the waiting ends. It should be noted that the embodiments of the present invention do not limit the specific value of the preset time, which can be set according to actual application requirements.
[0104] In a possible situation, after detecting that the diskless device starts to boot the operating system, it may further include:
[0105] Step 71: Wait for a preset time, and after the waiting ends, execute the step of detecting whether the network device of the diskless device has completed initialization.
[0106] Based on the above embodiments, when the present invention detects that the diskless device starts to boot the operating system, it will first automatically detect whether the network device of the device has completed initialization and generate a first detection result. If the network device fails to complete initialization, the diskless device cannot perform data interaction with the server; after determining that the network device has completed initialization, the present invention will continue to detect whether the network status of the diskless device is normal, that is, determine whether the diskless device can perform data interaction with the server and generate a second detection result; after determining that the network status is normal, it will continue to detect whether the diskless device has started the system desktop process, that is, determine whether the diskless device has correctly loaded the operating system and can enter the operation interface, and generate a third detection result. If there is an abnormal result among the first detection result, the second detection result, or the third detection result, the abnormal result will be automatically output. In other words, the present invention can detect each startup process of the diskless device operating system, accurately locate abnormal situations during startup, and automatically output abnormal results, which can effectively improve the efficiency of maintenance personnel in detecting startup failures of diskless devices.
[0107] The following introduces the specific process of the above diskless device startup failure detection method based on a specific example. Please refer to Figure 2 , Figure 2 FIG.
[0108] The detection driver (i.e., the red screen driver) will start running at the system startup stage. When the detection driver is initialized, a detection thread will be created and two notification routines will be registered, the TDI notification routine and the process loading notification routine.
[0109] The diskless client is most dependent on the network during startup. The TDI notification routine will send a notification after the network card initialization is completed, and at this time, the client IP address can be obtained. If the IP address is 169.254.x.x, it means that there is an IP conflict in the current network environment.
[0110] Since the operation of the diskless client depends on the network disk, it is necessary to detect whether the network disk of the diskless client has completed driver loading. If it is completed, it is determined that the diskless driver loading status is normal. After that, it is also necessary to determine that the diskless driver can correctly mount the system disk to ensure that the system disk can work properly.
[0111] The role of the process loading notification routine is to generate notifications whenever the system starts a process. By monitoring the loading of the EXPLORER.EXE process (the system desktop process), it determines whether the system has started successfully. When the EXPLORER.EXE process is successfully loaded, it can be considered that the Windows operating system has entered the desktop and the user can use it normally.
[0112] The detection thread has a timer. When 90 seconds have passed (if it exceeds 90s, it is defaulted that the diskless boot fails), the detection thread is activated. The detection thread has three detection rules: a) Detect whether the key boot drivers of the diskless system (network card driver, network disk driver) are successfully running; b) Detect the network status; c) Detect the system disk; d) Detect whether the EXPLORER.EXE process has started. If any one of the rules fails, the detection thread will call the Inbv series interfaces of the Windows kernel to initialize the screen, output the detection results, and extract the detailed logs of each key module stored in the registry and output them to the client screen terminal for quickly locating problems.
[0113] Next, the diskless device startup failure detection device, electronic device, and storage medium provided by the embodiments of the present invention will be introduced. The diskless device startup failure detection device, electronic device, and storage medium described below can be correspondingly referred to the diskless device startup failure detection method described above.
[0114] Please refer to Figure 3 , Figure 3 which is a structural block diagram of a diskless device startup failure detection device provided by an embodiment of the present invention. The device may include:
[0115] An initialization detection module 301, configured to detect whether the network device of the diskless device has been initialized when it is detected that the diskless device starts to boot the operating system, and obtain a first detection result;
[0116] A network status detection module 302, configured to detect whether the network status of the diskless device is normal if the first detection result is that the network device has been initialized, and obtain a second detection result;
[0117] A process loading detection module 303, configured to detect whether the diskless device has completed booting the operating system if the second detection result is that the network status is normal, and obtain a third detection result;
[0118] An exit module 304, configured to exit the failure detection if the third detection result is that the operating system has completed booting;
[0119] An output module 305, configured to output an abnormal result if there is an abnormal result among the first detection result, the second detection result, and the third detection result.
[0120] Preferably, the device may further include:
[0121] TDI notification routine startup module, used to start the TDI notification routine;
[0122] Correspondingly, the initialization detection module 301 may include:
[0123] Network card detection sub-module, used to determine whether the network card of the diskless device has completed the network card driver loading by using the TDI notification routine;
[0124] The first result generation sub-module, used to generate the first detection result indicating that the network device has completed initialization if so;
[0125] The second result generation sub-module, used to generate the first detection result indicating that the network device has not completed initialization if not;
[0126] Correspondingly, the network status detection module 302 may include:
[0127] IP detection sub-module, used to obtain the network IP of the diskless device by using the TDI notification routine and determine whether the network IP is the preset default value;
[0128] The third result generation sub-module, used to generate the second detection result indicating that the network status is abnormal if so;
[0129] The fourth result generation sub-module, used to generate the second detection result indicating that the network status is normal if not.
[0130] Preferably, the initialization detection module 301 may further include:
[0131] Network disk detection sub-module, used to determine whether the diskless device has completed the network disk driver loading;
[0132] The fifth result generation sub-module, used to execute the step of generating the first detection result indicating that the network device has completed initialization if so;
[0133] The sixth result generation sub-module, used to execute the step of generating the first detection result indicating that the network device has not completed initialization if not.
[0134] Preferably, the device may further include:
[0135] Process loading notification routine startup module, used to start the process loading notification routine so that the process loading notification routine obtains the processes loaded by the diskless device;
[0136] Correspondingly, the process loading detection module 303 may include:
[0137] A system disk mounting detection sub-module, used to determine whether a diskless device has completed the system disk mounting; a process loading detection sub-module, used to, if completed, determine whether the loaded processes include a system desktop process; if so, generate a third detection result indicating that the operating system has completed startup; if not, generate a third detection result indicating that the system desktop process has not started.
[0138] A seventh result generation sub-module, used to, if not completed, generate a third detection result indicating that the system disk is not mounted.
[0139] Preferably, the output module 305 may include:
[0140] An output sub-module, used to call the Inbv interface in the system kernel of the diskless device and output the exception result to the display device of the diskless device through the Inbv interface.
[0141] Preferably, the initialization detection module 301 may further include:
[0142] A waiting sub-module, used to wait for a preset time and execute the step of detecting whether the network device of the diskless device has completed initialization after the waiting ends.
[0143] An embodiment of the present invention further provides a diskless device, including:
[0144] A memory, used to store a computer program;
[0145] A processor, used to implement the steps of the diskless device startup fault detection method as described above when executing the computer program.
[0146] Since the embodiments of the diskless device part correspond to the embodiments of the diskless device startup fault detection method part, please refer to the description of the embodiments of the diskless device startup fault detection method part for the embodiments of the diskless device part, and will not be elaborated here for the time being.
[0147] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the diskless device startup fault detection method in any of the above embodiments.
[0148] Since the embodiments of the storage medium part correspond to the embodiments of the diskless device startup fault detection method part, please refer to the description of the embodiments of the diskless device startup fault detection method part for the embodiments of the storage medium part, and will not be elaborated here for the time being.
[0149] The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method section.
[0150] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0151] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0152] The above has introduced in detail the method, device, diskless device, and storage medium for detecting diskless device startup failures provided by the present invention. Specific examples are used herein to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for detecting startup faults of diskless devices, characterized in that, Applied to detection drive, including: When it is detected that the diskless device starts to boot the operating system, start the TDI notification routine and start the process loading notification routine, so that the process loading notification routine obtains the processes loaded by the diskless device and generates a notification whenever the system starts a process; Use the TDI notification routine to detect whether the network device of the diskless device has completed initialization to obtain a first detection result; If the first detection result is that the network device has completed initialization, then detect whether the network status of the diskless device is normal to obtain a second detection result; If the second detection result is that the network status is normal, then detect whether the diskless device has completed the boot of the operating system to obtain a third detection result; If the third detection result is that the operating system has completed booting, then exit the fault detection; If there is an abnormal result among the first detection result, the second detection result, and the third detection result, then output the abnormal result; The detection of whether the diskless device has completed the boot of the operating system includes: Judge whether the diskless device has completed system disk mounting; If it is completed, then judge whether the loaded processes include the system desktop process; if so, generate a third detection result indicating that the operating system has completed booting; if not, generate a third detection result indicating that the system desktop process has not been started; If it is not completed, then generate a third detection result indicating that the system disk has not been mounted; The output of the abnormal result includes: Call the Inbv interface in the system kernel of the diskless device and output the abnormal result to the display device of the diskless device through the Inbv interface.
2. The method for detecting the startup failure of a diskless device according to claim 1, wherein The detection of whether the network device of the diskless device has completed initialization includes: Use the TDI notification routine to judge whether the network card of the diskless device has completed network card driver loading; If so, generate a first detection result indicating that the network device has completed initialization; If not, generate a first detection result indicating that the network device has not completed initialization; Correspondingly, the detection of whether the network status of the diskless device is normal includes: Use the TDI notification routine to obtain the network IP of the diskless device and judge whether the network IP is a preset default value; If so, generate a second detection result indicating that the network status is abnormal; If not, generate a second detection result indicating that the network status is normal.
3. The method for detecting the startup failure of a diskless device according to claim 2, wherein After determining that the network card has completed the network card driver loading, it further includes: Judge whether the diskless device has completed network disk driver loading; If so, execute the step of generating the first detection result indicating that the network device has completed initialization; If not, execute the step of generating the first detection result indicating that the network device has not completed initialization.
4. The method for detecting the startup failure of a diskless device according to any one of claims 1 to 3, characterized in that, After detecting that the diskless device starts to boot the operating system, it further includes: Wait for a preset time and execute the step of detecting whether the network device of the diskless device has completed initialization after the waiting ends.
5. A diskless device startup failure detection device, characterized in that, Including: An initialization detection module, configured to, when detecting that a diskless device starts to boot an operating system, use a TDI notification routine to detect whether the network device of the diskless device has completed initialization, and obtain a first detection result; A network status detection module, configured to, if the first detection result indicates that the network device has completed initialization, detect whether the network status of the diskless device is normal, and obtain a second detection result; A system startup detection module, configured to, if the second detection result indicates that the network status is normal, detect whether the diskless device has completed booting the operating system, and obtain a third detection result; An exit module, configured to, if the third detection result indicates that the operating system has completed booting, exit the fault detection; An output module, configured to, if there is an abnormal result among the first detection result, the second detection result, and the third detection result, output the abnormal result; A TDI notification routine startup module, configured to start the TDI notification routine; A process loading notification routine startup module, configured to start a process loading notification routine, so that the process loading notification routine obtains the processes loaded by the diskless device, and generates a notification whenever the system starts a process; Correspondingly, the process loading detection module includes: A system disk mounting detection sub-module, configured to determine whether the diskless device has completed system disk mounting; if so, determine whether the system desktop process is included in the loaded processes; if so, generate a third detection result indicating that the operating system has completed booting; if not, generate a third detection result indicating that the system desktop process has not started; A seventh result generation sub-module, configured to, if not completed, generate a third detection result indicating that the system disk is not mounted; The output module includes: An output sub-module, configured to call the Inbv interface in the system kernel of the diskless device, and output the abnormal result to the display device of the diskless device through the Inbv interface.
6. The diskless device startup fault detection device according to claim 5, wherein The initialization detection module includes: A network card detection sub-module, configured to use the TDI notification routine to determine whether the network card of the diskless device has completed network card driver loading; A first result generation sub-module, configured to, if so, generate a first detection result indicating that the network device has completed initialization; A second result generation sub-module, configured to, if not, generate a first detection result indicating that the network device has not completed initialization; Correspondingly, the network status detection module includes: An IP detection sub-module, configured to use the TDI notification routine to obtain the network IP of the diskless device, and determine whether the network IP is a preset default value; A third result generation sub-module, configured to, if so, generate a second detection result indicating that the network status is abnormal; A fourth result generation sub-module, configured to, if not, generate a second detection result indicating that the network status is normal.
7. A diskless device, characterized in that, It includes: A memory, configured to store a computer program; A processor, configured to implement the diskless device startup fault detection method according to any one of claims 1 to 4 when executing the computer program.
8. A storage medium, characterized in that, The storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the diskless device startup fault detection method according to any one of claims 1 to 4 is implemented.