Hardware self-detection system and method based on Linux operating system and electronic equipment
By designing a hardware self-detection system on the Linux operating system, including the hardware interface layer, data analysis layer and service layer, the problem of limited application scope and difficult deployment of embedded Linux devices is solved, and simple and easy to use The cross-platform hardware self-test improves the stability and reliability of the computer.
Patent Information
- Application Number
- CN202410983117.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology cannot fully meet the needs of embedded Linux devices for simple and easy-to-use, cross-platform hardware self-test, and the existing hardware self-test technology has the problem of limited scope of application and difficult deployment.
Provide a hardware self-detection system based on Linux operating system, including hardware interface layer, data analysis layer and service layer. The hardware interface layer provides data acquisition interfaces that are adapted to multiple different hardware platforms, and the data analysis layer collects hardware and operating systems in real time. The status parameters of the service layer and generate self-detection results, the service layer sends alarm information and executes emergency plans to the user layer.
It realizes cross-platform hardware self-detection, expands the scope of application, simplifies the deployment process, and improves the availability and reliability of domestically produced reinforced or embedded computers.
Smart Images

Figure CN118897765A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a hardware self-detection system, method and electronic equipment based on Linux operating system. Background Art
[0002] As reinforced or embedded computers are gradually localized, the operating stability of domestic processors and other domestic chips has gradually exposed some problems. These problems often have the characteristics of low probability of occurrence and certain concealment. It is precisely because of this characteristic that domestic reinforced or embedded computers are prone to unstable and unreliable operation. In response to this phenomenon, the unstable or unreliable operation caused by typical deep-seated hardware failures can be discovered and recorded by analyzing and checking the underlying operating mechanism of the hardware, and then the problem can be solved or circumvented through the root cause. In the existing technology, automatic detection of hardware failures is often achieved through hardware self-test (Bit Self-test). At present, the hardware BIT function has been implemented on Windows and some embedded operating systems, but most of these solutions rely on specific hardware platforms or proprietary software interfaces and cannot be directly applied to domestic Linux operating systems.
[0003] The existing hardware self-check solutions for Linux systems in the industry mainly include: self-check mechanisms based on the Linux kernel, self-check solutions based on external monitoring software, and self-check solutions based on proprietary hardware. These solutions have their own limitations, which are as follows: the self-check mechanism based on the Linux kernel lacks dynamic monitoring and fault diagnosis capabilities; the deployment and configuration of the self-check solution based on external monitoring software are complex; the applicability of the self-check solution based on proprietary hardware is limited. Therefore, the existing technology cannot fully meet the needs of embedded Linux devices for simple, easy-to-use, and cross-platform hardware self-check. In other words, the existing hardware self-check technology has technical problems such as limited scope of application and difficulty in deployment. Summary of the invention
[0004] The purpose of the present invention is to provide a hardware self-detection system, method and electronic device based on Linux operating system, so as to alleviate the technical problems of limited application scope and great deployment difficulty existing in the existing hardware self-detection technology.
[0005] In the first aspect, an embodiment of the present invention provides a hardware self-detection system based on the Linux operating system, comprising: a hardware interface layer, a data analysis layer and a service layer; the hardware interface layer is used to provide a data acquisition interface adapted to multiple different hardware platforms; the data analysis layer is used to collect hardware status parameters of the hardware platform and operating status parameters of the Linux operating system in real time through the data acquisition interface; and the hardware status parameters and the operating status parameters are analyzed to generate self-detection results; the service layer is used to send alarm information to the user layer according to the self-detection results.
[0006] In some optional implementations, the data acquisition interface provided by the hardware interface layer and adapted to multiple different hardware platforms includes: a hardware attribute interface, a hardware status interface and a system kernel interface.
[0007] In some optional implementations, the data analysis layer includes a hardware status detection module and a software environment monitoring module; the hardware status detection module is used to collect the hardware status parameters of the hardware platform through the hardware attribute interface and the hardware status interface; the hardware status parameters include: hardware resource status, hardware performance indicators and environmental monitoring data; the software environment monitoring module is used to collect the operating status parameters of the Linux operating system through the system kernel interface; the operating status parameters include: kernel version and driver status, system service operation status, and file system health.
[0008] In some optional implementations, the data analysis layer also includes: a data analysis module; the data analysis module is used to analyze the hardware status parameters and the operating status parameters to determine the self-detection results; the self-detection results include: power-on self-detection results, periodic self-detection results and maintenance self-detection results.
[0009] In some optional implementations, the above-mentioned service layer includes: an alarm service module and an emergency processing module. The above-mentioned alarm service module is used to send alarm information to the user layer according to the above-mentioned self-detection results; the above-mentioned emergency processing module is used to generate fault reports and execute emergency plans; the above-mentioned emergency plans include: automatic recovery, sending emergency maintenance notifications, and taking restrictive measures to protect system safety.
[0010] In some optional implementations, the system further includes: a user layer; the user layer is used to receive the alarm information sent by the alarm service module and generate an alarm pop-up window; and display the fault report generated by the emergency processing module and the results of executing the emergency plan.
[0011] In the second aspect, an embodiment of the present invention provides a hardware self-detection method based on the Linux operating system, including: realizing connection with the hardware platform through a data acquisition interface adapted to multiple different hardware platforms provided by the hardware interface layer; using the data analysis layer to collect hardware status parameters of the above-mentioned hardware platform and operating status parameters of the Linux operating system; analyzing the above-mentioned hardware status parameters and the above-mentioned operating status parameters to generate self-detection results; and sending alarm information from the service layer to the user layer based on the above-mentioned self-detection results.
[0012] In some optional implementations, the above-mentioned hardware status parameters and the above-mentioned operating status parameters are analyzed to generate self-detection results, including: analyzing the above-mentioned hardware status parameters and the above-mentioned operating status parameters based on different self-detection modes to determine the self-detection results; the above-mentioned self-detection modes include: power-on self-detection, periodic self-detection and self-detection during maintenance.
[0013] In some optional implementations, the above method also includes: sending alarm information to the user layer through the above alarm service module based on the above self-detection results; the above emergency processing module generates a fault report and executes an emergency plan; the above emergency plan includes: automatic recovery, sending emergency maintenance notifications, and taking restrictive measures to protect system safety.
[0014] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, and when the processor executes the computer program, the steps of the method described in any one of the second aspects are implemented.
[0015] The present invention provides a hardware self-detection system, method and electronic device based on Linux operating system, the system comprises: a hardware interface layer, a data analysis layer and a service layer; the hardware interface layer is used for providing a data acquisition interface adapted to a plurality of different hardware platforms, thus realizing cross-platform hardware self-detection and expanding the scope of application; the data analysis layer is used for real-time acquisition of hardware status parameters of the hardware platform and running status parameters of the Linux operating system through the data acquisition interface, and for analyzing the hardware status parameters and the running status parameters to generate self-detection results; the service layer is used for sending alarm information to the user layer according to the self-detection results, and through the system, the technical problems of limited scope of application and great deployment difficulty existing in the prior art are solved, and the technical effects of being simple and easy to use and expanding the scope of application are achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A schematic diagram of the structure of a hardware self-detection system based on the Linux operating system provided by an embodiment of the present invention;
[0018] Figure 2 A schematic diagram of the structure of another hardware self-detection system based on the Linux operating system provided by an embodiment of the present invention;
[0019] Figure 3 A schematic diagram of a process flow of a hardware self-detection method based on a Linux operating system provided by an embodiment of the present invention;
[0020] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0022] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. Some embodiments of the present invention are described in detail below in conjunction with the drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.
[0024] Under the current market situation, the process of localization is in full swing. Whether it is the vigorous promotion of independent control and information innovation, or the continuous deepening of comprehensive localization in the military industry, around the current localization stage of chip design and production, the compatibility and stability of domestic chips under various domestic processor architectures have some problems, large or small. This is a necessary process in the current localization stage.
[0025] As a reinforced or embedded computer for a specific industry, stable and reliable long-term operation is an essential capability for such computers to complete specific computing tasks. As reinforced or embedded computers are gradually localized, the operation stability of domestic processors and other domestic chips has gradually exposed some problems, such as multi-core processors losing their cores after startup or long-term operation, high-speed serial computer expansion bus standard (peripheral component interconnect express, PCIe) devices losing or slowing down, SATA (Serial ATA) electronic disks losing or running at low speeds, Ethernet links failing to automatically handshake or negotiate, and CPU or core temperatures being too high during localization. These problems often have the characteristics of low probability of occurrence and certain concealment. Because of this characteristic, domestic reinforced or embedded computers are prone to unstable and unreliable operation, resulting in a negative impact that domestic computers have low performance and are not easy to use.
[0026] That is to say, due to some low-probability and hidden hardware failures, domestic reinforced or embedded computers may run unstably and have low performance. To solve this problem, the method of implementing hardware BIT self-detection on domestic operating systems can be adopted to discover and record computer hardware failures by analyzing and checking the underlying operating mechanism of the hardware, and then solve the failures in a targeted manner.
[0027] At present, hardware BIT functions have been implemented on Windows and some embedded operating systems, which can automatically detect hardware failures and alert users. However, most of these solutions rely on specific hardware platforms or proprietary software interfaces and cannot be directly applied to domestic Linux operating systems. The following are the main hardware self-check solutions for Linux systems in the industry:
[0028] (1) Based on the self-check mechanism of the Linux kernel, this self-check mechanism lacks dynamic monitoring and fault diagnosis capabilities. The hardware information acquisition tools provided by the Linux kernel, such as hwinfo and lshw, can only provide static hardware inventory information and cannot monitor the hardware status and diagnose faults in real time, which brings great inconvenience to system maintenance.
[0029] (2) Self-checking solutions based on external monitoring software, but this solution is complex to deploy and configure. Third-party monitoring software (such as Nagios, Zabbix, etc.) usually requires the installation of agents and complex configuration. For embedded Linux devices, the deployment cost is high and the operation and maintenance is difficult. At the same time, these monitoring software cannot be deeply optimized for the characteristics of the Linux system.
[0030] (3) The self-test solution based on proprietary hardware has limited applicability. Although the hardware self-test solution based on proprietary interfaces such as IPMI provided by some manufacturers is relatively powerful, it is usually bound to a specific hardware platform and cannot be applied across platforms. At the same time, this solution will increase equipment costs and is not conducive to the lightweight and integration of the system.
[0031] Therefore, the existing technology cannot fully meet the needs of embedded Linux devices for simple, easy-to-use, and cross-platform hardware self-test. In other words, the existing hardware self-test technology for domestic Linux operating systems has technical problems such as limited scope of application and difficult deployment. Based on this, the embodiment of the present invention provides a hardware self-test system, method, and electronic device based on the Linux operating system, which uses the design concept of BIT to analyze and check the underlying operating mechanism of the hardware to discover and record the unstable or unreliable phenomena caused by typical deep-seated hardware failures, and then solve or circumvent the problem through the root cause. Through this system and method, most common or typical hardware failures can be covered, and the application range is wide; the real-time operating status of the hardware can be discovered and recorded at any time, and the health status and operating status of the equipment can be controlled and traced, which greatly improves the availability and reliability of domestic reinforced or embedded computers.
[0032] To facilitate understanding of this embodiment, firstly, a hardware self-detection system based on a Linux operating system disclosed in an embodiment of the present invention is introduced in detail, see Figure 1 The structure diagram of a hardware self-detection system based on the Linux operating system is shown. The system mainly includes: a hardware interface layer 110, a data analysis layer 120 and a service layer 130.
[0033] Among them, the hardware interface layer 110 is used to provide a data acquisition interface that is adapted to multiple different hardware platforms; the data analysis layer 120 is used to collect the hardware status parameters of the hardware platform and the operating status parameters of the Linux operating system; the data analysis layer 120 is also used to analyze the hardware status parameters and operating status parameters to generate self-detection results; the service layer 130 is used to send alarm information to the user layer based on the self-detection results.
[0034] In one embodiment, see Figure 2As shown, the data collection interface provided by the hardware interface layer 110 and adapted to multiple different hardware platforms includes: a hardware attribute interface 211 , a hardware status interface 212 and a system kernel interface 213 .
[0035] As a specific example, the system can utilize the hardware interface layer to connect to the underlying hardware through the serial port, intelligent platform management bus IPMB, advanced configuration and power management interface ACPI, etc., without the need for additional hardware support, and can be directly deployed on various Linux-based embedded devices. It has strong cross-platform applicability and can cover most domestic processor architectures.
[0036] In one embodiment, the data analysis layer 120 includes a hardware status detection module 221 and a software environment monitoring module 222; the hardware status detection module is used to collect hardware status parameters of the hardware platform through a hardware attribute interface and a hardware status interface; the hardware status parameters include: hardware resource status, hardware performance indicators and environmental monitoring data; the software environment monitoring module is used to collect operating status parameters of the Linux operating system through a system kernel interface; the operating status parameters include: kernel version and driver status, system service operation status, and file system health.
[0037] That is to say, the hardware status detection module collects the hardware status parameters of the hardware platform in real time by accessing the interface provided by the hardware interface layer. As a specific example, the hardware resource status includes: the working status of the CPU, memory, storage devices, etc.; hardware performance indicators include: CPU frequency, memory latency, hard disk throughput, etc.; environmental monitoring data is generally hardware operating environment information, such as: CPU temperature, power supply voltage, etc.
[0038] The software environment monitoring module is responsible for checking the operating status of the Linux operating system. As a specific example, the operating status parameters include: kernel version and driver status, system service operation status, and file system health. Among them, the kernel version and driver status are used to ensure that the kernel and key drivers are loaded normally. The system service operation status is used to monitor whether there are abnormalities in the system's key services. Among them, key services can be customized according to user needs and are generally services that users are more concerned about, such as: self-developed program services. The health of the file system can be indicators such as detecting the reading and writing of the file system, context switching, etc.
[0039] In one embodiment, the data analysis layer 120 also includes: a data analysis module 223; the data analysis module is used to analyze hardware status parameters and operating status parameters to determine self-detection results; the self-detection results include: power-on self-detection results, periodic self-detection results and maintenance self-detection results.
[0040] That is to say, the data analysis module can analyze the hardware status parameters and operating status parameters based on different self-detection modes to determine the self-detection results; among them, the self-detection modes include: power-on self-detection, periodic self-detection and maintenance self-detection, and correspondingly generate power-on self-detection results, periodic self-detection results and maintenance self-detection results.
[0041] Different types of self-test results generated in different self-test modes can include the following types: critical hardware parameter exceeding the limit, software operation abnormality, and communication link failure. That is, the abnormal data analysis module of the data analysis layer is responsible for intelligent analysis of the monitoring data of the hardware status and software environment, and identifying possible abnormal situations, mainly including:
[0042] 1) Key hardware parameters exceed the limit, such as CPU temperature is too high, memory usage is too high, etc.;
[0043] 2) Software operation abnormalities, such as system service errors, memory leaks, etc.;
[0044] 3) Communication link failure, such as network connection interruption, serial port communication abnormality, etc.
[0045] In one embodiment, the service layer 130 includes: an alarm service module 231 and an emergency processing module 232. The alarm service module is used to send alarm information to the user layer based on the self-detection results; the emergency processing module is used to generate fault reports and execute emergency plans; the emergency plans include: automatic recovery, sending emergency maintenance notifications, and taking restrictive measures to protect system security.
[0046] As a specific example, the service layer may also include a logging module 233 .
[0047] In one embodiment, the system further includes a user layer 140; the user layer 140 is used to receive alarm information sent by the alarm service module and generate an alarm pop-up window; and display the fault report generated by the emergency processing module and the results of executing the emergency plan.
[0048] As a specific example, the user layer includes: a GTK alarm pop-up module 241, a user TCP interface 242, and a log document viewing module 243.
[0049] That is to say, once the data analysis module finds a problem, the alarm service module of the service layer will notify the GTK alarm window of the user layer through Socket, and the alarm will pop up in time. At the same time, the service layer also provides an emergency processing mechanism, which can take rapid recovery measures when a serious failure occurs:
[0050] 1) Generate a fault report immediately and record relevant diagnostic information;
[0051] 2) Try automatic recovery, such as restarting services, switching to backup resources, etc.;
[0052] 3) If automatic recovery fails, an emergency maintenance notice will be issued;
[0053] 4) Take restrictive measures to protect system security before maintenance personnel intervene.
[0054] The embodiment of the present invention provides a hardware self-detection system based on the Linux operating system, comprising: a hardware interface layer, a data analysis layer and a service layer; the hardware interface layer is used to provide a data acquisition interface adapted to multiple different hardware platforms; the data analysis layer is used to collect hardware status parameters of the hardware platform and operating status parameters of the Linux operating system in real time through the data acquisition interface; the data analysis layer is also used to analyze the hardware status parameters and the operating status parameters to generate a self-detection result; the service layer is used to send alarm information to the user layer according to the self-detection result. Through this system, the technical problems of limited application scope and high deployment difficulty existing in the prior art are solved, and the technical effect of being simple and easy to use and capable of performing comprehensive hardware self-detection across platforms is achieved.
[0055] The hardware self-detection system based on the Linux operating system provided in the embodiment of the present invention adopts a modular design and mainly includes the following core components: hardware status detection, software environment detection, communication interface module, abnormal data analysis module, early warning alarm module, emergency processing module. The low coupling and high cohesion between the functional modules provide a good foundation for subsequent functional expansion and customized optimization.
[0056] Among them, the hardware status detection module is responsible for collecting the operating status parameters of the CPU, memory, storage and other hardware through the hardware interface layer. Some are static parameters, such as the link speed and bandwidth of some PCIe devices. This parameter is generally fixed in the operating status, or the network link status is generally stable to establish a connection, and there are also the number of display interfaces, the number of serial ports, etc. Some parameters are dynamic, such as CPU temperature, graphics card temperature, storage usage, etc.
[0057] The software environment monitoring module is responsible for checking the normality of the software environment, including the operating system kernel, drivers, system services, etc. It can be done by checking system logs, including rsyslog and service logs or specific logs of certain software. Under Linux, systemctl can be used to check whether all services are running normally. You can also use top to check the status of all running processes to see if there are any zombie processes, and pmap to check whether key processes have any memory overflow risks, etc.
[0058] The data analysis module intelligently analyzes the collected hardware and software data to identify possible abnormalities. Generally, it records which parameters are detected through a list, and then makes judgments on the collected data. For example, hardware collection: CPU frequency, memory frequency, CPU temperature, memory usage, storage usage, etc.; the data analysis module determines whether the CPU frequency is reasonable, whether the memory frequency is pre-stored data, whether the CPU temperature exceeds 90, whether the storage usage exceeds 95%, etc.
[0059] The alarm service module is responsible for notifying the upper-level GTK alarm interface of abnormal conditions through Socket. The emergency handling module provides rapid recovery measures for serious faults to ensure the continuous and stable operation of the system. Some serious faults, such as: key system services (if failed, try to restart the service, and restart the system if the service restart fails), serious kernel operation errors (such as: kernel errors, kernel panic, the system can no longer run normally, so it will be restarted directly, mainly through the kernel log judgment. The kernel has many fault levels, and kernel panic is the highest level of fault. Once it occurs, it is generally unable to recover by itself. This level can trigger a restart); or the file system is read-only, which can also trigger a restart, and then repair the file system; the storage usage rate is too high, and the system will generally fail when the storage is full. At this time, the storage area can be forcibly mounted as read-only.
[0060] The embodiment of the present invention provides a hardware self-test system based on the Linux operating system, which realizes dynamic monitoring and fault diagnosis of multiple aspects of Linux system hardware resources, software environment, communication interface, etc., and covers multiple self-test modes such as power-on self-test, periodic self-test, and maintenance self-test. Compared with the existing Linux kernel tools that can only provide static hardware information, it has more comprehensive and real-time self-test capabilities.
[0061] The embodiment of the present invention can analyze the system status in real time, and once an abnormal situation is found, the alarm information is sent to the lnxGuard program through the socket to achieve rapid fault notification and response, which greatly improves the timeliness and efficiency of system maintenance.
[0062] The embodiment of the present invention does not require additional hardware support and can be directly deployed on various Linux-based embedded devices, and has strong cross-platform applicability. Compared with a proprietary self-checking solution bound to a specific hardware platform, it has better versatility.
[0063] With modular design, each functional module is decoupled and independent, which is convenient for integration with other components of the Linux system. At the same time, it is also convenient for users to customize and optimize for specific hardware platforms, further improving adaptability. Compared with third-party monitoring software that requires the installation of complex agents, there is no need for cumbersome deployment and configuration, which greatly reduces the cost of system maintenance. At the same time, modular design is also conducive to reducing the cost of customization and optimization.
[0064] In summary, the present invention provides a comprehensive, real-time, efficient, and easy-to-integrate solution to the pain points of Linux system hardware self-check, which has obvious technical advantages and application value.
[0065] Next, a hardware self-detection method based on Linux operating system disclosed in an embodiment of the present invention is described in detail. Figure 3 The flowchart of a hardware self-detection method based on the Linux operating system is shown. The method can be executed by an electronic device and mainly includes the following steps S110 to S130:
[0066] S110: connecting to the hardware platform through a data acquisition interface provided by the hardware interface layer and adapted to multiple different hardware platforms;
[0067] S120: using the data analysis layer to collect hardware status parameters of the hardware platform and operating status parameters of the Linux operating system;
[0068] S130: Analyze the hardware status parameters and the operation status parameters to generate a self-test result;
[0069] S140: The service layer sends an alarm message to the user layer according to the self-detection result.
[0070] In one embodiment, the above S130 analyzes the hardware status parameters and the operating status parameters to generate a self-detection result, including: analyzing the hardware status parameters and the operating status parameters based on different self-detection modes to determine the self-detection result; the self-detection mode includes: power-on self-detection, periodic self-detection and self-detection during maintenance.
[0071] In one embodiment, the above method also includes: sending alarm information to the user layer through the alarm service module according to the self-detection results; the emergency processing module generates a fault report and executes the emergency plan; the emergency plan includes: automatic recovery, sending emergency maintenance notifications, and taking restrictive measures to protect system safety.
[0072] In one embodiment, the above method also includes: the user layer receives the alarm information sent by the alarm service module and generates an alarm pop-up window; the user layer displays the fault report generated by the emergency processing module and the results of executing the emergency plan.
[0073] The hardware self-detection method based on the Linux operating system provided in this embodiment observes and records the operation status of key domestic chips from the hardware bottom logic; adopts modular design, and each functional module is decoupled and independent, which is convenient for integration with other components of the Linux system; it has scalability, and according to this idea, it can be expanded to check other hardware faults that can be checked; a file format for hardware operation status (a file format for storing logs in BIT software, a file format mounted with tmpfs) is designed to store and check hardware changes; the hardware self-detection process runs completely in the memory, can be run on demand or on a scheduled basis, and the operation record does not occupy the user's storage resources; it can not only monitor the system status in real time, but also has the ability to analyze abnormal information and trigger fault warnings; once a problem is found, it can actively alarm and record, support backtracking query, and realize rapid fault notification and response. This greatly improves the timeliness and efficiency of system maintenance, and also makes the whole process of hardware bottom operation status monitorable.
[0074] An embodiment of the present application further provides an electronic device. Specifically, the electronic device includes a processor and a storage device. The storage device stores a computer program, and when the computer program is executed by the processor, it executes the method described in any one of the above-mentioned embodiments.
[0075] Figure 4 A structural schematic diagram of an electronic device provided in an embodiment of the present application, the electronic device 400 includes: a processor 40, a memory 41, a bus 42 and a communication interface 43, wherein the processor 40, the communication interface 43 and the memory 41 are connected via the bus 42; the processor 40 is used to execute an executable module stored in the memory 41, such as a computer program.
[0076] The memory 41 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 43 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.
[0077] The bus 42 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0078] Among them, the memory 41 is used to store programs, and the processor 40 executes the program after receiving the execution instruction. The method executed by the process definition device disclosed in any embodiment of the above-mentioned embodiment of the present invention can be applied to the processor 40 or implemented by the processor 40.
[0079] The processor 40 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 40. The above processor 40 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present invention can be directly embodied as a hardware decoding processor to execute, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 41, and the processor 40 reads the information in the memory 41 and completes the steps of the above method in combination with its hardware.
[0080] Corresponding to the above method, an embodiment of the present application also provides a computer-readable storage medium, which stores machine-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to execute the steps of the above method.
[0081] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0082] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0083] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0084] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0085] It should be noted that similar numbers and letters represent similar items in the accompanying drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A hardware self-detection system based on Linux operating system, characterized in that: include: Hardware interface layer, data analysis layer and service layer; The hardware interface layer is used to provide a data acquisition interface adapted to multiple different hardware platforms; The data analysis layer is used to collect hardware status parameters of the hardware platform and operating status parameters of the Linux operating system in real time through the data acquisition interface; and analyze the hardware status parameters and the operating status parameters to generate self-detection results; The service layer is used to send alarm information to the user layer according to the self-detection result.
2. The hardware self-detection system based on the Linux operating system according to claim 1, characterized in that: The data acquisition interface provided by the hardware interface layer is adapted to multiple different hardware platforms, including: a hardware attribute interface, a hardware status interface and a system kernel interface.
3. The hardware self-detection system based on the Linux operating system according to claim 2, characterized in that: The data analysis layer includes a hardware status detection module and a software environment monitoring module; The hardware status detection module is used to collect hardware status parameters of the hardware platform through the hardware attribute interface and the hardware status interface; The hardware status parameters include: hardware resource status, hardware performance indicators and environmental monitoring data; The software environment monitoring module is used to collect the operating status parameters of the Linux operating system through the system kernel interface; the operating status parameters include: kernel version and driver status, system service operation status, and file system health.
4. The hardware self-detection system based on the Linux operating system according to claim 3, characterized in that: The data analysis layer also includes: a data analysis module; The data analysis module is used to analyze the hardware status parameters and the operating status parameters to determine the self-detection results; the self-detection results include: power-on self-detection results, periodic self-detection results and maintenance self-detection results.
5. The hardware self-detection system based on Linux operating system according to claim 1, characterized in that: The service layer includes: an alarm service module and an emergency processing module; The alarm service module is used to send alarm information to the user layer according to the self-detection result; The emergency processing module is used to generate a fault report and execute an emergency plan; the emergency plan includes: automatic recovery, sending an emergency maintenance notice, and taking restrictive measures to protect system safety.
6. The hardware self-detection system based on Linux operating system according to claim 5, characterized in that: The system further comprises: a user layer; The user layer is used to receive the alarm information sent by the alarm service module and generate an alarm pop-up window; and to display the fault report generated by the emergency processing module and the result of executing the emergency plan.
7. A hardware self-detection method based on Linux operating system, characterized in that: include: The hardware interface layer provides a data acquisition interface that is compatible with multiple hardware platforms to achieve connection with the hardware platform; The data analysis layer is used to collect hardware status parameters of the hardware platform and operating status parameters of the Linux operating system; Analyzing the hardware status parameters and the operating status parameters to generate a self-test result; The service layer sends an alarm message to the user layer according to the self-detection result.
8. The hardware self-detection method based on the Linux operating system according to claim 7, characterized in that: Analyzing the hardware status parameters and the operating status parameters to generate a self-test result includes: The hardware status parameters and the operating status parameters are analyzed based on different self-detection modes to determine the self-detection results; the self-detection modes include: power-on self-detection, periodic self-detection and maintenance self-detection.
9. The hardware self-detection method based on Linux operating system according to claim 8, characterized in that: The method further comprises: Sending alarm information to the user layer through the alarm service module according to the self-detection result; The emergency processing module generates a fault report and executes an emergency plan; the emergency plan includes: automatic recovery, sending an emergency maintenance notice, and taking restrictive measures to protect system safety.
10. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 7 to 9 are implemented.
Citation Information
Patent Citations
Homemade computer based build in test system and method
CN105183593A
Method and system for automatically generating running state monitoring self-inspection report of measurement and control device
CN114676015A
Intelligent self-checking method and system, storage medium and electronic equipment
CN117608953A
Method for deploying containerized security technologies on embedded devices
US20220171863A1
Cited By
System problem analysis method and device based on Linux system
CN120872754A
