CN111061612A - Embedded system state monitoring method - Google Patents
Embedded system state monitoring method Download PDFInfo
- Publication number
- CN111061612A CN111061612A CN201911275650.6A CN201911275650A CN111061612A CN 111061612 A CN111061612 A CN 111061612A CN 201911275650 A CN201911275650 A CN 201911275650A CN 111061612 A CN111061612 A CN 111061612A
- Authority
- CN
- China
- Prior art keywords
- monitoring
- program
- main program
- embedded system
- starting
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 31
- 238000012544 monitoring process Methods 0.000 title claims abstract description 24
- 230000008569 process Effects 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 abstract description 5
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000011835 investigation Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000002245 particle Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3013—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is an embedded system, i.e. a combination of hardware and software dedicated to perform a certain function in mobile devices, printers, automotive or aircraft systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3055—Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
- G06F11/3093—Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
- G06F11/3096—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/324—Display of status information
- G06F11/327—Alarm or error message display
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method for monitoring the state of an embedded system, which comprises the following steps: s1, adding a monitoring program and a main program into the equipment starting script; the two programs automatically start to run after the system is started; s2, starting the monitoring program first and then starting the main program process; s3, the monitoring program enters a loop and reads resource information of various devices; and S4, when the monitoring program reads that the utilization rate of the equipment resource information reaches 90%, alarming to an administrator. The invention aims to provide a scheme for monitoring the utilization rate of a system and adjusting the utilization rate of the system in real time, which is commonly used by embedded equipment, so that the current resource use condition of the system can be monitored and the main program can be adjusted under the conditions of not increasing the hardware cost and not influencing the service processing efficiency of the main program, and the aim of improving the stability of the system is fulfilled.
Description
Technical Field
The invention belongs to the field of embedded systems, and particularly relates to a state monitoring method of an embedded system.
Background
The existing embedded device is limited by an application scene, hardware resources are limited, and only one CPU, one memory particle, one FLASH and one network port are provided, so that the size of the available memory of a program and the size of the space of the FLASH occupied by the program are calculated before programming, the calculation process is repeated when the program is changed and upgraded each time, manpower and time are consumed, the load is dynamically changed during the program operation, and the power consumption and the voltage of the CPU are directly influenced by the load, so that the hidden stability trouble is generated.
In terms of system monitoring, the current solutions generally include:
1. through hardware circuit design, increase sensor and relay and carry out the restriction of electric current and voltage to CPU voltage, when the load was too high, the sensor was enlargied voltage signal and is transmitted the relay, and the relay receives to force to cut off the power supply circuit to CPU after the high voltage. The mode belongs to passive monitoring, the service life of a working CPU is influenced by sudden power failure, a running program is suddenly interrupted, and if the program has unfinished tasks, data is completely lost and cannot be recovered; and hardware costs may increase.
2. Adding an interface for acquiring a system state into a main program: and acquiring the real-time CPU utilization rate, acquiring the residual size of the memory, acquiring the residual available size of the FLASH and the network bandwidth utilization rate. The method can reduce the efficiency of the main program executing service, and the monitoring function can be recompiled once when the main program is compiled to update the function every time, so that more time can be consumed.
Disclosure of Invention
In view of the above, the present invention provides a method for monitoring the status of an embedded system, which is provided to overcome the above-mentioned drawbacks in the prior art.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a method for monitoring the state of an embedded system comprises the following steps:
s1, adding a monitoring program and a main program into the equipment starting script; the two programs automatically start to run after the system is started;
s2, starting the monitoring program first and then starting the main program process;
s3, the monitoring program enters a loop and reads resource information of various devices;
s4, when the monitoring program reads that the utilization rate of the equipment resource information reaches 90%, the monitoring program starts to give an alarm to the administrator, sends an alarm signal to the main program and records the resource utilization data in a file within 1 hour;
s5, after the main program receives the alarm signal, judging the use condition of the equipment resource information;
s6, when the utilization rates of various resources are judged to be between 90% and 95%, the main program is suspended for a certain time, and then the main program is restarted to be executed;
and S7, when the utilization rates of various resources are judged to exceed 95%, the main program directly exits, the main program is closed, and the task is ended.
Further, the monitoring program starting process in step S3 is as follows: after the system kernel is started, the monitoring program is started first, and the information of the remaining available resources of the system is read circularly.
Further, the device resource information in step S3 includes a CPU usage rate, a remaining memory size, and an ethernet port load rate.
Further, the specific method for alerting the administrator in step S4 is as follows: and sending the alarm information to an administrator in a mail or short message mode.
Further, the method for sending the alarm signal to the main program in step S5 includes: and sending an alarm signal to the main program in a pipeline or memory sharing mode.
Further, the main routine is suspended for 100 milliseconds in step S8, and then the execution is resumed.
Compared with the prior art, the invention has the following advantages:
the invention aims to provide a scheme for monitoring the utilization rate of a system and adjusting the utilization rate of the system in real time, which is commonly used by embedded equipment, so that the current resource use condition of the system can be monitored and the main program can be adjusted under the conditions of not increasing the hardware cost and not influencing the service processing efficiency of the main program, and the aim of improving the stability of the system is fulfilled.
The method provided by the invention does not need to add a separate voltage and current sensor and a relay, and only monitors through software, thereby being beneficial to reducing the hardware cost; real-time monitoring is carried out through an independent process, so that the efficiency of the main program for processing the service is not reduced; by alarm setting, the abnormal operation state information of the equipment can be remotely acquired in real time; the file that the warning produced can be saved the data of equipment operation process, makes things convenient for the analysis and the investigation in later stage.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the invention without limitation. In the drawings:
fig. 1 is a flowchart of a method for monitoring a state of an embedded system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a monitoring process of an embedded device according to an embodiment of the present invention.
Detailed Description
It should be noted that the embodiments and features of the embodiments of the present invention may be combined with each other without conflict.
In the description of the present invention, it is to be understood that the terms "central," "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are used in the orientation or positional relationship indicated in the drawings, which are merely for convenience in describing the invention and to simplify the description, and are not intended to indicate or imply that the referenced device or element must have a particular orientation, be constructed and operated in a particular orientation, and are therefore not to be construed as limiting the invention. Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the invention, the meaning of "a plurality" is two or more unless otherwise specified.
In the description of the invention, it is to be noted that, unless otherwise explicitly specified or limited, the terms "mounted", "connected" and "connected" are to be construed broadly, e.g. as being fixed or detachable or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the creation of the present invention can be understood by those of ordinary skill in the art through specific situations.
The invention will be described in detail with reference to the following embodiments with reference to the attached drawings.
A method for monitoring the status of an embedded system, as shown in fig. 1 and 2, includes:
s1, adding a monitoring program and a main program into the equipment starting script; the two programs automatically start to run after the system is started;
s2, starting the monitoring program first and then starting the main program process;
s3, the monitoring program enters a loop and reads resource information of various devices;
s4, when the monitoring program reads that the utilization rate of the equipment resource information reaches 90%, the monitoring program starts to give an alarm to the administrator, sends an alarm signal to the main program and records the resource utilization data in a file within 1 hour;
s5, after the main program receives the alarm signal, judging the use condition of the equipment resource information;
s6, when the utilization rates of various resources are judged to be between 90% and 95%, the main program is suspended for a certain time, and then the main program is restarted to be executed;
and S7, when the utilization rates of various resources are judged to exceed 95%, the main program directly exits, the main program is closed, and the task is ended.
The monitoring program starting process in step S3 is as follows: after the system kernel is started, the monitoring program is started first, and the information of the remaining available resources of the system is read circularly.
The device resource information in step S3 includes a CPU utilization rate, a remaining memory size, and an ethernet port load rate.
The specific method for giving an alarm to the administrator in step S4 is as follows: and sending the alarm information to an administrator in a mail or short message mode.
The method for sending the alarm signal to the main program in the step S5 includes: and sending an alarm signal to the main program in a pipeline or memory sharing mode.
After the main routine is suspended for 100 milliseconds in step S8, the execution is resumed.
Specifically, the first step: the monitoring program and the main program are added in sequence into the starting script of the equipment, so that the two programs can automatically start to run after the system is started.
Step two: and the monitoring program enters a loop and reads the equipment resource information, including the CPU utilization rate, the residual memory size and the Ethernet port load rate.
Step three: if the monitoring process monitors that the CPU utilization rate is up to 90%, or the memory utilization rate is up to 90%, or the Ethernet port load is up to 90%, an alarm is turned on, alarm information is sent to an administrator in a mail or short message mode, meanwhile, resource utilization data within 1 hour are recorded in a file, then an alarm signal is sent to a main program in a pipeline or shared memory mode, the main program reacts after receiving the alarm signal, the main program directly exits for the condition that the resource utilization rates exceed 95%, the main program hangs up for 100 milliseconds for the condition that the resource utilization rates are between 90% and 95%, and then the task is restarted.
The invention aims to provide a scheme for monitoring the utilization rate of a system and adjusting the utilization rate of the system in real time, which is commonly used by embedded equipment, so that the current resource use condition of the system can be monitored and the main program can be adjusted under the conditions of not increasing the hardware cost and not influencing the service processing efficiency of the main program, and the aim of improving the stability of the system is fulfilled.
The method provided by the invention does not need to add a separate voltage and current sensor and a relay, and only monitors through software, thereby being beneficial to reducing the hardware cost; real-time monitoring is carried out through an independent process, so that the efficiency of the main program for processing the service is not reduced; by alarm setting, the abnormal operation state information of the equipment can be remotely acquired in real time; the file that the warning produced can be saved the data of equipment operation process, makes things convenient for the analysis and the investigation in later stage.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the invention, so that any modifications, equivalents, improvements and the like, which are within the spirit and principle of the present invention, should be included in the scope of the present invention.
Claims (6)
1. A method for monitoring the state of an embedded system is characterized by comprising the following steps:
s1, adding a monitoring program and a main program into the equipment starting script; the two programs automatically start to run after the system is started;
s2, starting the monitoring program first and then starting the main program process;
s3, the monitoring program enters a loop and reads resource information of various devices;
s4, when the monitoring program reads that the utilization rate of the equipment resource information reaches 90%, the monitoring program starts to give an alarm to the administrator, sends an alarm signal to the main program and records the resource utilization data in a file within 1 hour;
s5, after the main program receives the alarm signal, judging the use condition of the equipment resource information;
s6, when the utilization rates of various resources are judged to be between 90% and 95%, the main program is suspended for a certain time, and then the main program is restarted to be executed;
and S7, when the utilization rates of various resources are judged to exceed 95%, the main program directly exits, the main program is closed, and the task is ended.
2. The method for monitoring the status of an embedded system according to claim 1, wherein the starting procedure of the monitoring program in step S3 is as follows: after the system kernel is started, the monitoring program is started first, and the information of the remaining available resources of the system is read circularly.
3. The embedded system state monitoring method according to claim 1, wherein: the device resource information in step S3 includes a CPU utilization rate, a remaining memory size, and an ethernet port load rate.
4. The method for monitoring the status of an embedded system according to claim 1, wherein the specific method for alerting an administrator in step S4 is as follows: and sending the alarm information to an administrator in a mail or short message mode.
5. The embedded system state monitoring method according to claim 1, wherein: the method for sending the alarm signal to the main program in the step S5 includes: and sending an alarm signal to the main program in a pipeline or memory sharing mode.
6. The embedded system state monitoring method according to claim 1, wherein: after the main routine is suspended for 100 milliseconds in step S8, the execution is resumed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911275650.6A CN111061612A (en) | 2019-12-12 | 2019-12-12 | Embedded system state monitoring method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911275650.6A CN111061612A (en) | 2019-12-12 | 2019-12-12 | Embedded system state monitoring method |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111061612A true CN111061612A (en) | 2020-04-24 |
Family
ID=70300707
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911275650.6A Pending CN111061612A (en) | 2019-12-12 | 2019-12-12 | Embedded system state monitoring method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111061612A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112115451A (en) * | 2020-09-28 | 2020-12-22 | 天地伟业技术有限公司 | Method for identifying hot-plug hardware USB dongle in Docker container of ARM architecture |
CN112181750A (en) * | 2020-10-19 | 2021-01-05 | 北京威努特技术有限公司 | Method, device and medium for testing stability of industrial control network equipment |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102567182A (en) * | 2010-12-27 | 2012-07-11 | 无锡华润上华科技有限公司 | Monitoring method of remote hosts |
CN103149901A (en) * | 2013-02-04 | 2013-06-12 | 南京理工大学 | Embedded intelligent monitoring and remote maintaining system of manufacturing equipment |
CN104579761A (en) * | 2014-12-24 | 2015-04-29 | 西安工程大学 | Automatic nosql cluster configuration system and method based on cloud computing |
CN104572401A (en) * | 2015-02-09 | 2015-04-29 | 浪潮软件股份有限公司 | Alarming method and alarming system |
CN105279046A (en) * | 2015-11-04 | 2016-01-27 | 研华科技(中国)有限公司 | Method for improving reliability of embedded system |
CN106094788A (en) * | 2016-06-02 | 2016-11-09 | 西安诺瓦电子科技有限公司 | Embedded board system for testing stability and method |
CN106529278A (en) * | 2016-11-07 | 2017-03-22 | 深圳盛灿科技股份有限公司 | Non-Intrusive monitoring method and device |
CN106844165A (en) * | 2016-12-16 | 2017-06-13 | 华为技术有限公司 | Alarm method and device |
CN107786616A (en) * | 2016-08-30 | 2018-03-09 | 江苏蓝创聚联数据与应用研究院有限公司 | Main frame intelligent monitor system based on high in the clouds |
CN109800124A (en) * | 2018-12-15 | 2019-05-24 | 中国平安人寿保险股份有限公司 | CPU usage monitoring method, device, electronic equipment and storage medium |
CN110471759A (en) * | 2019-07-04 | 2019-11-19 | 中科晶上(苏州)信息技术有限公司 | A kind of real-time dynamic management approach of multicore embeded processor memory |
-
2019
- 2019-12-12 CN CN201911275650.6A patent/CN111061612A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102567182A (en) * | 2010-12-27 | 2012-07-11 | 无锡华润上华科技有限公司 | Monitoring method of remote hosts |
CN103149901A (en) * | 2013-02-04 | 2013-06-12 | 南京理工大学 | Embedded intelligent monitoring and remote maintaining system of manufacturing equipment |
CN104579761A (en) * | 2014-12-24 | 2015-04-29 | 西安工程大学 | Automatic nosql cluster configuration system and method based on cloud computing |
CN104572401A (en) * | 2015-02-09 | 2015-04-29 | 浪潮软件股份有限公司 | Alarming method and alarming system |
CN105279046A (en) * | 2015-11-04 | 2016-01-27 | 研华科技(中国)有限公司 | Method for improving reliability of embedded system |
CN106094788A (en) * | 2016-06-02 | 2016-11-09 | 西安诺瓦电子科技有限公司 | Embedded board system for testing stability and method |
CN107786616A (en) * | 2016-08-30 | 2018-03-09 | 江苏蓝创聚联数据与应用研究院有限公司 | Main frame intelligent monitor system based on high in the clouds |
CN106529278A (en) * | 2016-11-07 | 2017-03-22 | 深圳盛灿科技股份有限公司 | Non-Intrusive monitoring method and device |
CN106844165A (en) * | 2016-12-16 | 2017-06-13 | 华为技术有限公司 | Alarm method and device |
CN109800124A (en) * | 2018-12-15 | 2019-05-24 | 中国平安人寿保险股份有限公司 | CPU usage monitoring method, device, electronic equipment and storage medium |
CN110471759A (en) * | 2019-07-04 | 2019-11-19 | 中科晶上(苏州)信息技术有限公司 | A kind of real-time dynamic management approach of multicore embeded processor memory |
Non-Patent Citations (1)
Title |
---|
杜军;: "提高嵌入式系统可靠性的探讨与实践" * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112115451A (en) * | 2020-09-28 | 2020-12-22 | 天地伟业技术有限公司 | Method for identifying hot-plug hardware USB dongle in Docker container of ARM architecture |
CN112115451B (en) * | 2020-09-28 | 2024-04-12 | 天地伟业技术有限公司 | Method for identifying hot plug hardware USB dongle in Docker container of ARM architecture |
CN112181750A (en) * | 2020-10-19 | 2021-01-05 | 北京威努特技术有限公司 | Method, device and medium for testing stability of industrial control network equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106879038B (en) | working state switching method and device | |
CN108984366B (en) | Terminal monitoring processing method, device and equipment | |
CN111061612A (en) | Embedded system state monitoring method | |
US10848839B2 (en) | Out-of-band telemetry data collection | |
CN105739668A (en) | Power management method and power management system of notebook computers | |
CN110445683B (en) | Server, equipment, method and system for monitoring survival state of server | |
CN109245966A (en) | The monitoring method and device of the service state of cloud platform | |
CN207833497U (en) | OLT system power fail warning device | |
CN110990328A (en) | Method and system for reliable communication between dual processors of TBox | |
CN109947576B (en) | Method for managing internal agent program of virtual machine | |
CN116149957B (en) | Method for saving server power-on and power-off records through BMC | |
CN104898509A (en) | Industrial control computer monitoring method and system based on secure short message | |
CN111737060A (en) | Method and device for processing component exception and electronic equipment | |
CN107203455B (en) | Method and system for preventing over-discharge of standby power module when power-down fan of storage system is hung up | |
CN114826981B (en) | System and method for realizing application resident in cloud mobile phone | |
CN113867815B (en) | Method for monitoring server suspension and automatically restarting and server applying same | |
CN109062718A (en) | A kind of server and data processing method | |
CN113259904B (en) | Marine network system, method and computer readable storage medium | |
CN109347907A (en) | Installation kit method for down loading and device | |
CN209767579U (en) | Safety protection integrated machine of electric power monitoring system | |
CN110851328B (en) | Method for detecting abnormal power failure of password card in PKCS #11 application | |
CN102262579A (en) | Computer monitoring method and system | |
CN114265678A (en) | Method for improving stability of vehicle-mounted terminal system based on ThreadX | |
CN113784317A (en) | Method, device, equipment and medium for preventing screen-throwing initialization vehicle-triggering machine from failing to sleep | |
CN112505403A (en) | Power distribution network metering protection system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200424 |
|
RJ01 | Rejection of invention patent application after publication |