CN107832189B - Monitoring method of I/O system and mobile terminal - Google Patents

Monitoring method of I/O system and mobile terminal Download PDF

Info

Publication number
CN107832189B
CN107832189B CN201711044856.9A CN201711044856A CN107832189B CN 107832189 B CN107832189 B CN 107832189B CN 201711044856 A CN201711044856 A CN 201711044856A CN 107832189 B CN107832189 B CN 107832189B
Authority
CN
China
Prior art keywords
read
write
write operation
performance
target
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.)
Active
Application number
CN201711044856.9A
Other languages
Chinese (zh)
Other versions
CN107832189A (en
Inventor
郭纯海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201711044856.9A priority Critical patent/CN107832189B/en
Publication of CN107832189A publication Critical patent/CN107832189A/en
Application granted granted Critical
Publication of CN107832189B publication Critical patent/CN107832189B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • G06F11/3419Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment by assessing time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a monitoring method of an I/O system and a mobile terminal, wherein the method comprises the following steps: monitoring read-write operation in the I/O system; selecting a target read-write operation from the read-write operations through a preset sliding statistical window, wherein the target read-write operation is selected once when the sliding statistical window slides once; based on the target read-write operation, abnormal information feedback is carried out when the I/O system is abnormal, so that the problem of the I/O system is quickly located and found, the problem is better solved, and the overall performance of the system is improved.

Description

Monitoring method of I/O system and mobile terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a monitoring method for an I/O system and a mobile terminal.
Background
With the rise of intelligent mobile terminals such as mobile phones, the complexity of mobile terminal systems from top to bottom is gradually increased, and the applications are more and more, and various resources are easy to cause the systems to be stuck due to problems such as preemption.
Because the mobile terminal system is more complex and the types of system resources are more, when the system is jammed, the possible factors are too many, and therefore, the system cannot be quickly positioned to where the system is. Particularly, the system cannot judge the possible hardware device problems in time.
An I/O (Input/Output) system, as a key subsystem in a mobile terminal system, has an important influence on various aspects such as response speed and stability of the whole system. When part of modules (software or hardware) in the I/O system are abnormal, the overall performance and experience (such as the occurrence of katton) are likely to be significantly affected, and a problem in the I/O system is difficult to be quickly located and found to solve the problem.
Disclosure of Invention
The embodiment of the invention provides a monitoring method of an I/O system and a mobile terminal, and aims to solve the problem that problems in the I/O system in the prior art are difficult to quickly locate and find so as to solve the problems.
In order to solve the technical problem, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a method for monitoring an I/O system, including:
monitoring read-write operation in the I/O system;
selecting a target read-write operation from the read-write operations through a preset sliding statistical window, wherein the target read-write operation is selected once when the sliding statistical window slides once;
and based on the target read-write operation, performing abnormal information feedback when the I/O system is abnormal.
In a second aspect, an embodiment of the present invention further provides a mobile terminal, including:
the monitoring module is used for monitoring read-write operation in the I/O system;
the selecting module is used for selecting target read-write operation from the read-write operation through a preset sliding statistical window, and the target read-write operation is selected once when the sliding statistical window slides once;
and the feedback module is used for feeding back the abnormal information when the I/O system is abnormal based on the target read-write operation.
In a third aspect, an embodiment of the present invention further provides a mobile terminal, including a processor, a memory, and a computer program stored on the memory and operable on the processor, where the computer program, when executed by the processor, implements the steps of the monitoring method for the I/O system as described above.
In a fourth aspect, the embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the monitoring method for an I/O system are implemented as described above.
In the embodiment of the invention, the read-write operation in the I/O system is monitored; selecting target read-write operation from the read-write operation through a preset sliding statistical window; based on the target read-write operation, the abnormal information feedback is carried out when the I/O system is abnormal, so that the problem of the I/O system is quickly positioned and found, the intelligent degree of the system is improved, a possible direction is provided for further problem positioning and optimization, and the overall performance of the system is improved.
Drawings
FIG. 1 is a flow chart illustrating a method for monitoring an I/O system in an embodiment of the present invention;
FIG. 2 is a diagram illustrating a target read/write operation selected through a time sliding window with a time length T according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating read and write performance of read and write operations in a memory device under normal conditions in an embodiment of the invention;
FIG. 4 is a diagram illustrating read and write performance of read and write operations in a memory device under an occasional abnormal condition in an embodiment of the present invention;
FIG. 5 is a diagram illustrating read and write performance of read and write operations in a memory device under abnormal conditions in an embodiment of the present invention;
fig. 6 shows a first block diagram of a mobile terminal according to an embodiment of the present invention;
fig. 7 shows a block diagram of a mobile terminal according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a monitoring method of an I/O system, which is shown in a combined figure 1 and comprises the following steps:
step 101: read and write operations in the I/O system are monitored.
In this step, monitoring of read/write operations in the I/O system is implemented, where an upper layer application needs to perform read/write operations on data at different levels in the I/O system when performing read/write operations through a lower layer I/O system, where the I/O system specifically includes an upper file system layer and a lower drive layer, for example, the file data may be read/written first at the file system layer, and finally the read/write operations on the hardware storage device are implemented at the drive layer through a drive program, where monitoring of read/write operations in the I/O system may be monitoring of operations of each read/write operation in different structural levels of the I/O system, monitoring of read/write operations in different structural levels or division levels of the I/O system, so as to better find possible problems.
Step 102: and selecting target read-write operation from the read-write operation through a preset sliding statistical window.
The sliding statistical window has a set length and slides forward along with time or the number of read-write operations and other set parameters, so as to intercept a certain amount of read-write operations from all the generated read-write operations as target read-write operations and perform problem search according to the target read-write operations, for example, the target read-write operations may be the latest generated read-write operations intercepted by the sliding statistical window or the read-write operations generated within a latest period of time.
The target read-write operation is selected once when the sliding statistical window slides once, the target read-write operation is selected from the read-write operation through the set length of the sliding statistical window, the target read-write operation is selected once when the sliding statistical window slides once, and new target quantity is continuously obtained along with the change of the read-write operation so as to carry out real-time monitoring and analysis.
Step 103: and based on the target read-write operation, performing abnormal information feedback when the I/O system is abnormal.
The target read-write operations are selected read-write operations through a sliding statistical window from a plurality of generated read-write operations, and based on the target read-write operations, information such as read-write data volume, response time, occupied resource size and the like of the target read-write operations can be correspondingly analyzed, so that corresponding information feedback is realized when an I/O system is abnormal, the system or upper-layer application or a user is helped to quickly locate and find the problem of the I/O system, the problem is better solved, and the overall performance of the system is improved.
The abnormal information feedback process specifically includes that a warning is sent or a user selects to process when the I/O system is abnormal, so that the intelligence degree and the use experience of the system can be improved, developers can be helped to quickly locate problems related to the I/O system, and further processing and optimization are carried out according to specific problems.
The monitoring method of the I/O system in the embodiment of the invention monitors the read-write operation in the I/O system; selecting target read-write operation from the read-write operation through a preset sliding statistical window; based on the target read-write operation, abnormal information feedback is carried out when the I/O system is abnormal, the problem of the I/O system is quickly positioned and found, the intelligent degree of the system is improved, possible directions are provided for further problem positioning and optimization, the overall performance of the system is improved, and the use experience of the system is improved.
In a first aspect, as a preferred implementation manner, the step of selecting a target read/write operation from the read/write operations through a preset sliding statistic window includes:
in the file system layer of the I/O system, the read-write operation of the file data in the process of the upper application in the time sliding window is selected as the target read-write operation through the time sliding window with a set time length.
The selection of the target read-write operation is performed in a file system layer of an I/O system, and currently, for example, in a mobile terminal such as a mobile phone, when the system is implemented, each upper layer application is implemented as each process in an operating system, and each process needs to read and write file data through the file system when reading and writing the file data, so that the read-write operation of each process in a latest period of time can be statistically monitored in the file system, for example, the read-write data amount corresponding to the read-write operation or the corresponding time is statistically monitored.
The time sliding window has a set time length, and slides forwards along with the increase of time, so that different read-write operation sets are continuously intercepted and obtained along with the increase of time through the set time length, and a target read-write operation is obtained.
Preferably, the deadline of the time sliding window is the current time, and when the time of the time sliding window enters the next time from the current time, the time sliding window is also slid, and the latest occurring time is the deadline, the read-write operation occurring within the set time length is selected, so as to obtain the target read-write operation, and ensure the real-time performance and the accuracy of the detection of the I/O system problem.
Correspondingly, as a preferred embodiment, the step of performing exception information feedback when the I/O system has an exception based on the target read-write operation includes:
counting read-write data quantity corresponding to the read-write operation on the file data in the process of each upper-layer application in the target read-write operation; sequencing the processes of the upper-layer applications according to the read-write data volume obtained by statistics and obtaining a sequencing result; and when the upper management system prompts the I/O system to be abnormal, reporting the sequencing result.
The main objective of monitoring the file system level in the I/O system is to find and record the current applications that may affect the I/O performance of the system, in the process, after a target read-write operation is obtained through a set time sliding window selection, specifically, statistics is performed on the read-write data amount corresponding to the read-write operation of the file data by the process of each upper layer application in the target read-write operation, the read-write data amount is used to feed back the amount of the storage system resources occupied by the upper layer application corresponding to each process, and the upper layer management system preliminarily considers that the I/O system is abnormal under necessary conditions (for example, it is determined that the foreground application is stuck through an excessively long operation reaction time), at this time, the upper layer management system may obtain the information of the applications from the file system level of the I/O system through a specific communication mode, when information feedback is performed according to the abnormal condition of the I/O system prompted by the upper management system, the sorted result is specifically reported to the upper management system in the mobile terminal, so that the upper management system further performs corresponding processing on the processes by using a specific strategy according to the sorted result, for example: the processes of other background applications besides the system application, the foreground application and the white list application are killed directly.
Specifically, the above process may be implemented as follows, in which the read-write activity of each process in the latest period T is monitored:
a time sliding window with the time length of T is realized, and the length of T can be customized according to the situation as the time slides forwards; counting and sequencing read-write data quantity of each process in a time sliding window (old read-write data quantity beyond the sliding window is subtracted during counting, only read-write data quantity in the time sliding window is counted), judging that the situation that a foreground application is blocked and the like by an upper management system prompts that the I/O system is possibly abnormal, reporting sequenced process information to the upper management system when the processes are acquired, so as to solve related problems and realize quick positioning and solution of the I/O system abnormity.
In conjunction with fig. 2, there are 4 processes that have recently performed read and write activities (in the figure, a circle represents one read and write activity, a solid circle represents outside the statistical range of the sliding window, and a dotted circle represents inside the statistical range of the sliding window), and for the sake of simplifying the example, we assume that the data volume of each read and write activity is the same. According to the description of the implementation method, only the read-write activities in the sliding window are counted, and sequencing is performed according to the read-write data volume of each process. It can be seen that process 1 is not within the statistical range because the read and write activities are beyond the statistical range of the sliding window. The results of other processes after sequencing according to the read-write data quantity are as follows: process 3> process 2> process 4.
In a second aspect, as another preferred embodiment, the step of selecting a target read/write operation from the read/write operations through a preset sliding statistic window includes:
in the drive layer of the I/O system, selecting the read-write operation generated in the storage device in the read-write frequency sliding window as a target read-write operation through a read-write frequency sliding window with set read-write frequency.
The target read-write operation is selected to be performed in a drive layer of the I/O system, and currently, the storage devices of the mobile terminal systems such as a mobile phone and the like have corresponding drives to access the storage devices, so that the read-write performance of each read-write operation can be counted in a drive program, the change condition of the read-write performance of the devices is monitored, and the process of monitoring the abnormal information of the low-layer storage devices in the I/O system is realized.
The read-write times sliding window has set read-write times, and slides forwards along with the increase of the read-write times, so that different read-write operation sets are continuously intercepted and obtained along with the increase of the read-write operations occurring in the storage device through the set read-write times, and the target read-write operations are obtained.
Preferably, the last read-write operation in the read-write frequency sliding window is the latest read-write operation, when the read-write operation enters the next new read-write operation from the current read-write operation, the read-write frequency sliding window slides along with the current read-write operation, the latest read-write operation is taken as the last read-write operation in the window, the read-write operation occurring in the set read-write frequency is selected, the target read-write operation is obtained, and the real-time performance and the accuracy of the detection of the I/O system problem are ensured.
Correspondingly, on the one hand, as a preferred implementation manner, the step of performing exception information feedback when the I/O system has an exception based on the target read-write operation includes:
continuously acquiring the read-write performance corresponding to each read-write operation in the target read-write operation along with the sliding of the read-write frequency sliding window; according to the read-write performance, the average read-write performance of the target read-write operation selected in the read-write frequency sliding window is counted; if the average read-write performance is continuously lower than a first performance value within a set time length, determining that a storage device in the I/O system is abnormal; and reporting the information that the storage device has abnormity.
In the process, once per sliding of the read-write frequency sliding window, the selected target read-write operation changes, wherein the latest read-write operation is added, the read-write operation which occurs for the longest time in the original window is discarded, and in the process of performing abnormal information feedback when the I/O system is abnormal according to the target read-write operation selected from the read-write frequency sliding window, the read-write performance corresponding to each read-write operation in the target read-write operation needs to be acquired with each sliding of the read-write frequency sliding window, that is, preferably, the acquisition operation of the read-write performance corresponding to each read-write operation in the target read-write operation is executed once per new read-write operation in the memory device. Specifically, the obtaining of the read-write performance may be calculating the read-write rate of the read-write operation, calculating the response time of the read-write operation, calculating the delay time of the read-write operation, and the like, so as to achieve the evaluation and obtaining of the read-write performance.
And calculating to obtain average performance based on the read-write performance corresponding to each read-write operation in the target read-write operation, if the average performance obtained by continuous calculation and statistics along with the sliding of the read-write frequency sliding window is lower than a set first performance value, determining that the memory device in the I/O system has an abnormality, and specifically reporting an abnormality message to an upper management system to solve related problems and realize quick positioning and solving of the abnormality of the I/O system.
Specifically, the main monitoring target of the drive level is to find the read-write performance of the memory device is abnormal, and monitor the process of the change situation of the read-write performance of the memory device, and it is normal for the performance fluctuation which occurs in a short time occasionally due to the internal processing requirement of the device, but if the read-write performance fluctuates greatly continuously or the average performance is far lower than the normal value, and the device is recovered within a set time, that is, if the performance is continuously lower than the first performance value within a set time, it is considered that the device is abnormal and a warning message is sent to the upper management system, and the upper management system can prompt the user that the product is abnormal according to the situation, and needs to go to the after-sale maintenance point for maintenance. Specifically, the first performance value may be a performance value recorded after the mobile terminal is shipped, the performance value is first started to operate for a period of time, an average performance value in the period of time is used as an optimal performance value, and the optimal performance value is multiplied by a coefficient value smaller than 1 to be used as the first performance value, wherein the coefficient value is, for example, one third, that is, for example, one third of the performance value at the time of shipment is set as the first performance value to be used as a reference value for determining whether the performance fluctuates.
Specifically, monitoring and alarming performance abnormality of the memory device in the drive layer needs to be implemented as follows: (N1, N2, X1, X2, E0, referred to below, are values that manufacturers have according to the memory device configuration).
Recording the performance value for a period of time after the factory first start-up operation, herein denoted as S0; the method comprises the steps of realizing a read-write time sliding window with the read-write time being N1, counting the average performance of all the read-write times in the read-write time sliding window as the read-write times slide forwards, wherein the average performance of all the read-write times in the read-write time sliding window is S1 (counting the read-write data amount which exceeds the sliding window and is subtracted from the old read-write data amount), and sending warning information to an upper management system if S1 is lower than (S0X 1) and is not recovered within time T1, wherein X1 is a value configured by a manufacturer according to a storage device, and the value is smaller than 1.
The process realizes the discovery and the report of the abnormity of the storage device in the I/O system by continuously obtaining and judging the average performance of the read-write operation in the read-write frequency sliding window.
Correspondingly, on the other hand, as a preferred embodiment, the step of performing, based on the target read-write operation, an exception information feedback when the I/O system has an exception includes:
acquiring the read-write performance corresponding to each read-write operation in the target read-write operation; determining the number of read-write operations of which the read-write performance is lower than a second performance value in the target read-write operations selected from the read-write frequency sliding window according to the read-write performance; if the read-write frequency sliding window continuously slides for N times along with the read-write frequency, and the number is continuously larger than a set number value in the N times of sliding, determining that the storage device in the I/O system is abnormal; and reporting the information that the storage device has abnormity.
Preferably, each time a new read/write operation occurs in the memory device, an obtaining operation of the read/write performance corresponding to each read/write operation in the target read/write operation is performed.
In the process, once per sliding of the read-write frequency sliding window, the selected target read-write operation changes, wherein the latest read-write operation is added, the read-write operation with the longest occurrence time in the original window is discarded, and in the process of performing abnormal information feedback when the I/O system is abnormal according to the target read-write operation selected from the read-write frequency sliding window, the read-write performance corresponding to each read-write operation in the target read-write operation needs to be acquired with each sliding of the read-write frequency sliding window, specifically, the acquisition of the read-write performance can be the calculation of the read-write speed of the read-write operation, the calculation of the read-write operation response time, the calculation of the read-write operation delay, and the like, so as to realize the evaluation and acquisition of the read-write operation performance.
And determining the number of the read-write operations with the read-write performance lower than the second performance value in the target read-write operation based on the read-write performance corresponding to each read-write operation in the target read-write operation, if the number of the read-write operations with the read-write performance lower than the second performance value is continuously greater than a set number value along with the sliding of the read-write frequency sliding window, determining that the memory device in the I/O system is abnormal, and specifically reporting an abnormal message to an upper management system to solve the related problems and realize the rapid positioning and solving of the I/O system abnormality.
Specifically, the second performance value may be a performance value recorded after the mobile terminal is shipped, the performance value is first started to operate for a period of time, an average performance value in the period of time is used as an optimal performance value, and the optimal performance value is multiplied by a coefficient value smaller than 1 to be used as the second performance value, wherein the coefficient value is, for example, one third, that is, for example, one third of the performance value at the time of shipment is set as the second performance value to be used as a reference value for determining whether the performance fluctuates.
The process specifically comprises the following steps: in the read-write operation in the memory device, during each read-write operation, if the performance of the read-write operation is lower than S3 (the factory performance is S1X 2, and X2 is a value configured by a manufacturer according to the device, specifically smaller than 1), a single abnormality is recorded, the number of abnormalities in the read-write frequency sliding window can be counted as E1, along with the sliding of the read-write frequency sliding window, if the number of abnormalities exceeds the range of the sliding window, the abnormality is discarded, and if the read-write operation is continued to be performed N2, the number of abnormalities in the read-write frequency sliding window, E1, is always larger than a set value, namely a threshold value, E0, warning information is sent to an upper.
In the process, because performance fluctuation of short-time read-write operation occurs due to internal processing needs of the device occasionally, the performance fluctuation is normal, so that in the process that the read-write frequency sliding window continuously slides for N times along with the read-write frequency, N is preferably greater than the set read-write frequency of the read-write frequency sliding window, a continuous statistical judgment process is realized, and the accuracy of a judgment result is realized.
The process realizes the discovery and the report of the abnormity of the storage device in the I/O system by continuously counting and judging the number of the read-write operations with lower read-write performance in the read-write frequency sliding window.
As a preferred embodiment, the step of obtaining the read-write performance corresponding to each read-write operation in the target read-write operation in the above process includes:
counting the read-write data volume and the corresponding consumed time of each read-write operation in the target read-write operation; and obtaining the read-write performance according to the read-write data volume and the corresponding consumed time.
By counting the read-write data volume and the corresponding consumed time of each read-write operation, the read-write performance of the corresponding read-write operation can be obtained according to the ratio of the read-write data volume and the corresponding consumed time, and the read-write performance of the read-write operation in the storage device can be obtained.
Specifically, with reference to fig. 3, 4, and 5, several cases of implementing monitoring of read and write operations in a memory device in a driving layer are described as follows:
(1) normal conditions. In a normal situation, as shown in fig. 3, the read-write frequency sliding window slides forward, the read-write performance is basically stable, and no obvious abnormality exists.
(2) Occasional abnormal situations. For the case of the accidental read/write performance abnormality, as shown in fig. 4, the sliding window slides forward along with the read/write times, and an individual performance abnormality point occurs occasionally due to the internal processing requirement of the device, but the performance abnormality point is not frequent and can be recovered to normal, and at this time, the abnormal situation is not considered as a true abnormal situation.
(3) An abnormal situation. For the case that the read-write performance is actually abnormal, as shown in fig. 5, as the read-write frequency sliding window slides forward, the memory device frequently has read-write performance abnormal points, the abnormal frequency in the sliding window in the specified range is greater than the allowable range and cannot be recovered to be normal, and at this time, it is considered that the abnormality occurs, and information is actively sent to the upper management system to alarm.
In each implementation process, monitoring and message alarming are implemented mainly from two key levels of a file system and a storage driver of an I/O system, and the performance condition of the file system is monitored, so that irrelevant processes of background running stealing can be cleared in time, precious I/O bandwidth is released, and system performance and fluency are optimized; by monitoring the performance abnormity of the memory device in the driving layer and actively alarming when the abnormity occurs, users and manufacturers can find out the quality problem of the device in time, and unnecessary loss can be recovered as early as possible. According to the process, the read-write operation of the key module in the I/O system is monitored, warning is given or a user selects and processes the read-write operation when the read-write operation is abnormal, the intelligence degree and the use experience of the system can be improved, the development personnel can be helped to quickly locate the problems related to the I/O system, and further the processing and optimization can be carried out according to specific problems.
The embodiment of the present invention provides a mobile terminal, which can implement each process of the foregoing embodiment of the monitoring method for an I/O system, and can achieve the same technical effect, and details are not repeated here to avoid repetition. As shown in fig. 6 and 7, the mobile terminal includes: a monitoring module 401, a selecting module 402 and a feedback module 403.
And the monitoring module 401 is configured to monitor read and write operations in the I/O system.
A selecting module 402, configured to select a target read-write operation from the read-write operations through a preset sliding statistical window, where once the sliding statistical window slides, the target read-write operation is selected once.
A feedback module 403, configured to perform exception information feedback when the I/O system is abnormal based on the target read-write operation.
Wherein, the selecting module 402 comprises: a first pick sub-module 4021.
The first selecting submodule 4021 is configured to select, in the file system layer of the I/O system, a time sliding window with a set time length, where the read-write operation on the file data in the process of the upper application in the time sliding window is a target read-write operation.
Wherein the feedback module 403 includes: a first statistic submodule 4031, a sorting submodule 4032 and a first reporting submodule 4033.
The first statistic submodule 4031 is configured to count read-write data amounts corresponding to read-write operations on file data in processes of upper-layer applications in the target read-write operation.
And the sorting submodule 4032 is configured to sort the processes of the upper-layer applications according to the read-write data volume obtained through statistics, and obtain a sorting result.
A first reporting sub-module 4033, configured to report the sorting result when the upper management system prompts that the I/O system is abnormal.
Wherein the selecting module 402 comprises: a second pick sub-module 4022.
The second selecting sub-module 4022 is configured to select, in the drive layer of the I/O system, a read-write operation occurring in the storage device in the read-write number sliding window as a target read-write operation through a read-write number sliding window in which the read-write number is set.
Wherein the feedback module 403 comprises: a first obtaining sub-module 4034, a second counting sub-module 4035, a first determining sub-module 4036 and a second reporting sub-module 4037.
The first obtaining sub-module 4034 is configured to continuously obtain the read-write performance corresponding to each read-write operation in the target read-write operation along with the sliding of the read-write frequency sliding window.
And a second counting submodule 4035, configured to count, according to the read-write performance, an average read-write performance of the target read-write operation selected in the read-write frequency sliding window.
A first determining submodule 4036, configured to determine that a storage device in the I/O system is abnormal if the average read-write performance is continuously lower than a first performance value within a set duration.
And a second reporting sub-module 4037, configured to report information that the storage device has an exception.
Wherein the feedback module 403 includes: a second obtaining sub-module 4038, a second determining sub-module 4039, a third determining sub-module 40310 and a third reporting sub-module 40311.
And a second obtaining sub-module 4038, configured to obtain read-write performance corresponding to each read-write operation in the target read-write operation.
A second determining submodule 4039, configured to determine, according to the read-write performance, the number of read-write operations, of which the read-write performance is lower than a second performance value, in the target read-write operations selected in the read-write frequency sliding window.
A third determining sub-module 40310, configured to determine that a storage device in the I/O system is abnormal if the read/write number sliding window continuously slides N times with the read/write number, and the number is continuously greater than a set number value in the N times of sliding.
And a third reporting sub-module 40311, configured to report information that the storage device has an exception.
And the N times are more than the set read-write times.
The first obtaining sub-module 4034 is specifically configured to: counting the read-write data volume and the corresponding consumed time of each read-write operation in the target read-write operation; and obtaining the read-write performance according to the read-write data volume and the corresponding consumed time.
The second obtaining sub-module 4038 is specifically configured to: counting the read-write data volume and the corresponding consumed time of each read-write operation in the target read-write operation; and obtaining the read-write performance according to the read-write data volume and the corresponding consumed time.
The mobile terminal provided by the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiment of fig. 1, and is not described herein again in order to avoid repetition.
The mobile terminal monitors the read-write operation in the I/O system; selecting target read-write operation from the read-write operation through a preset sliding statistical window; based on the target read-write operation, the abnormal information feedback is carried out when the I/O system is abnormal, so that the problem of the I/O system is quickly positioned and found, the intelligent degree of the system is improved, a possible direction is provided for further problem positioning and optimization, and the overall performance of the system is improved.
Fig. 8 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
The mobile terminal 900 includes, but is not limited to: a radio frequency unit 901, a network module 902, an audio output unit 903, an input unit 904, a sensor 905, a display unit 906, a user input unit 907, an interface unit 908, a memory 909, a processor 910, and a power supply 911. Those skilled in the art will appreciate that the mobile terminal architecture illustrated in fig. 8 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the mobile terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 910 is configured to monitor read and write operations in the I/O system; selecting a target read-write operation from the read-write operations through a preset sliding statistical window, wherein the target read-write operation is selected once when the sliding statistical window slides once; and based on the target read-write operation, performing abnormal information feedback when the I/O system is abnormal.
The mobile terminal monitors the read-write operation in the I/O system; selecting target read-write operation from the read-write operation through a preset sliding statistical window; based on the target read-write operation, the abnormal information feedback is carried out when the I/O system is abnormal, so that the problem of the I/O system is quickly positioned and found, the intelligent degree of the system is improved, a possible direction is provided for further problem positioning and optimization, and the overall performance of the system is improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 901 may be used for receiving and sending signals during a message transmission and reception process or a call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 910; in addition, the uplink data is transmitted to the base station. Generally, the radio frequency unit 901 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 901 can also communicate with a network and other devices through a wireless communication system.
The mobile terminal provides the user with wireless broadband internet access via the network module 902, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 903 may convert audio data received by the radio frequency unit 901 or the network module 902 or stored in the memory 909 into an audio signal and output as sound. Also, the audio output unit 903 may also provide audio output related to a specific function performed by the mobile terminal 900 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 903 includes a speaker, a buzzer, a receiver, and the like.
The input unit 904 is used to receive audio or video signals. The input Unit 904 may include a Graphics Processing Unit (GPU) 9041 and a microphone 9042, and the Graphics processor 9041 processes image data of a still picture or video obtained by an image capturing device (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 906. The image frames processed by the graphic processor 9041 may be stored in the memory 909 (or other storage medium) or transmitted via the radio frequency unit 901 or the network module 902. The microphone 9042 can receive sounds and can process such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 901 in case of the phone call mode.
The mobile terminal 900 also includes at least one sensor 905, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 9061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 9061 and/or backlight when the mobile terminal 900 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 905 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described in detail herein.
The display unit 906 is used to display information input by the user or information provided to the user. The Display unit 906 may include a Display panel 9061, and the Display panel 9061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting diode (OLED), or the like.
The user input unit 907 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 907 includes a touch panel 9071 and other input devices 9072. The touch panel 9071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 9071 (e.g., operations by a user on or near the touch panel 9071 using a finger, a stylus, or any other suitable object or accessory). The touch panel 9071 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 910, receives a command from the processor 910, and executes the command. In addition, the touch panel 9071 may be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 907 may include other input devices 9072 in addition to the touch panel 9071. Specifically, the other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control key, a switch key, and the like), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 9071 may be overlaid on the display panel 9061, and when the touch panel 9071 detects a touch operation on or near the touch panel 9071, the touch panel is transmitted to the processor 910 to determine the type of the touch event, and then the processor 910 provides a corresponding visual output on the display panel 9061 according to the type of the touch event. Although in fig. 8, the touch panel 9071 and the display panel 9061 are two independent components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 9071 and the display panel 9061 may be integrated to implement the input and output functions of the mobile terminal, which is not limited herein.
The interface unit 908 is an interface through which an external device is connected to the mobile terminal 900. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 908 may be used to receive input from external devices (e.g., data information, power, etc.) and transmit the received input to one or more elements within the mobile terminal 900 or may be used to transmit data between the mobile terminal 900 and external devices.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 909 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 910 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by running or executing software programs and/or modules stored in the memory 909 and calling data stored in the memory 909, thereby performing overall monitoring of the mobile terminal. Processor 910 may include one or more processing units; preferably, the processor 910 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It is to be appreciated that the modem processor described above may not be integrated into processor 910.
The mobile terminal 900 may also include a power supply 911 (e.g., a battery) for powering the various components, and preferably, the power supply 911 is logically connected to the processor 910 through a power management system that provides power management functions to manage charging, discharging, and power consumption.
In addition, the mobile terminal 900 includes some functional modules that are not shown, and thus will not be described in detail herein.
Preferably, an embodiment of the present invention further provides a mobile terminal, including a processor 910, a memory 909, and a computer program stored in the memory 909 and capable of running on the processor 910, where the computer program, when executed by the processor 910, implements each process of the monitoring method embodiment of the I/O system, and can achieve the same technical effect, and is not described herein again to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the monitoring method for an I/O system, and can achieve the same technical effect, and is not described herein again to avoid repetition. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.
While the preferred embodiments of the present invention have been described, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.

Claims (11)

1. A method for monitoring an I/O system, comprising:
monitoring read-write operation in the I/O system;
selecting a target read-write operation from the read-write operations through a preset sliding statistical window, wherein the target read-write operation is selected once when the sliding statistical window slides once;
based on the target read-write operation, carrying out abnormal information feedback when the I/O system is abnormal;
the step of selecting the target read-write operation from the read-write operations through a preset sliding statistical window comprises the following steps:
in a drive layer of the I/O system, selecting read-write operation generated in a storage device in a read-write frequency sliding window as target read-write operation through the read-write frequency sliding window with set read-write frequency;
the step of performing exception information feedback when the I/O system is abnormal based on the target read-write operation includes:
continuously acquiring the read-write performance corresponding to each read-write operation in the target read-write operation along with the sliding of the read-write frequency sliding window;
according to the read-write performance, the average read-write performance of the target read-write operation selected in the read-write frequency sliding window is counted;
if the average read-write performance is continuously lower than a first performance value within a set time length, determining that a storage device in the I/O system is abnormal;
and reporting the information that the storage device has abnormity.
2. The monitoring method according to claim 1, wherein the step of performing the feedback of the abnormal information when the I/O system is abnormal based on the target read-write operation further comprises:
acquiring the read-write performance corresponding to each read-write operation in the target read-write operation;
determining the number of read-write operations of which the read-write performance is lower than a second performance value in the target read-write operations selected from the read-write frequency sliding window according to the read-write performance;
if the read-write frequency sliding window continuously slides for N times along with the read-write frequency, and the number is continuously larger than a set number value in the N times of sliding, determining that the storage device in the I/O system is abnormal;
and reporting the information that the storage device has abnormity.
3. The monitoring method according to claim 2, wherein the N times are greater than the set read-write times.
4. The monitoring method according to claim 1 or 2, wherein the step of obtaining the read-write performance corresponding to each read-write operation in the target read-write operation comprises:
counting the read-write data volume and the corresponding consumed time of each read-write operation in the target read-write operation;
and obtaining the read-write performance according to the read-write data volume and the corresponding consumed time.
5. A mobile terminal, comprising:
the monitoring module is used for monitoring read-write operation in the I/O system;
the selecting module is used for selecting target read-write operation from the read-write operation through a preset sliding statistical window, and the target read-write operation is selected once when the sliding statistical window slides once;
the feedback module is used for performing abnormal information feedback when the I/O system is abnormal based on the target read-write operation;
the selecting module comprises:
the second selection submodule is used for selecting the read-write operation generated in the storage device in the read-write frequency sliding window as the target read-write operation through a read-write frequency sliding window with set read-write frequency in the drive layer of the I/O system;
the feedback module includes:
the first obtaining submodule is used for continuously obtaining the read-write performance corresponding to each read-write operation in the target read-write operation along with the sliding of the read-write frequency sliding window;
the second statistical submodule is used for counting the average read-write performance of the target read-write operation selected in the read-write frequency sliding window according to the read-write performance;
the first determining submodule is used for determining that the storage device in the I/O system has an abnormality if the average read-write performance is continuously lower than a first performance value within a set duration;
and the second reporting submodule is used for reporting the information that the storage device has the abnormity.
6. The mobile terminal of claim 5, wherein the feedback module further comprises:
the second obtaining submodule is used for obtaining the read-write performance corresponding to each read-write operation in the target read-write operation;
the second determining submodule is used for determining the number of the read-write operations of which the read-write performance is lower than a second performance value in the target read-write operations selected from the read-write frequency sliding window according to the read-write performance;
a third determining submodule, configured to determine that a storage device in the I/O system is abnormal if the read-write number sliding window continuously slides N times with the read-write number, and the number is continuously greater than a set number value in the N times of sliding;
and the third reporting submodule is used for reporting the information that the storage device has the abnormity.
7. The mobile terminal of claim 6, wherein the N times are greater than the set number of reads and writes.
8. The mobile terminal according to claim 5, wherein the first obtaining sub-module is specifically configured to: counting the read-write data volume and the corresponding consumed time of each read-write operation in the target read-write operation; and obtaining the read-write performance according to the read-write data volume and the corresponding consumed time.
9. The mobile terminal according to claim 6, wherein the second obtaining sub-module is specifically configured to: counting the read-write data volume and the corresponding consumed time of each read-write operation in the target read-write operation; and obtaining the read-write performance according to the read-write data volume and the corresponding consumed time.
10. A mobile terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the monitoring method of an I/O system according to any one of claims 1 to 4.
11. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the method for monitoring an I/O system of any one of claims 1 to 4.
CN201711044856.9A 2017-10-31 2017-10-31 Monitoring method of I/O system and mobile terminal Active CN107832189B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711044856.9A CN107832189B (en) 2017-10-31 2017-10-31 Monitoring method of I/O system and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711044856.9A CN107832189B (en) 2017-10-31 2017-10-31 Monitoring method of I/O system and mobile terminal

Publications (2)

Publication Number Publication Date
CN107832189A CN107832189A (en) 2018-03-23
CN107832189B true CN107832189B (en) 2020-09-01

Family

ID=61651122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711044856.9A Active CN107832189B (en) 2017-10-31 2017-10-31 Monitoring method of I/O system and mobile terminal

Country Status (1)

Country Link
CN (1) CN107832189B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6890153B2 (en) * 2019-06-10 2021-06-18 株式会社日立製作所 Storage device and backup method to set a peculiar event as a restore point
CN112035312B (en) * 2020-07-22 2023-05-26 大箴(杭州)科技有限公司 Method and device for detecting availability state of Leader process in Kafka cluster
CN114449094B (en) * 2020-10-30 2023-04-11 华为技术有限公司 Control method, electronic device, chip and storage medium
CN112379834B (en) * 2020-11-11 2022-12-02 深圳市豪恩汽车电子装备股份有限公司 Memory card management device and method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103500073A (en) * 2013-10-08 2014-01-08 浪潮(北京)电子信息产业有限公司 Method and device for data block migration
CN103646208A (en) * 2013-12-04 2014-03-19 华为终端有限公司 Monitoring method and device of eMMC
CN104485136A (en) * 2014-12-30 2015-04-01 西安奇维科技股份有限公司 Method for testing continuous read-write speed smoothness of memory disc
CN104956327A (en) * 2013-07-31 2015-09-30 株式会社日立制作所 Computer system and computer system control method
CN105488119A (en) * 2015-11-23 2016-04-13 小米科技有限责任公司 Process finding method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7519510B2 (en) * 2004-11-18 2009-04-14 International Business Machines Corporation Derivative performance counter mechanism

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104956327A (en) * 2013-07-31 2015-09-30 株式会社日立制作所 Computer system and computer system control method
CN103500073A (en) * 2013-10-08 2014-01-08 浪潮(北京)电子信息产业有限公司 Method and device for data block migration
CN103646208A (en) * 2013-12-04 2014-03-19 华为终端有限公司 Monitoring method and device of eMMC
CN104485136A (en) * 2014-12-30 2015-04-01 西安奇维科技股份有限公司 Method for testing continuous read-write speed smoothness of memory disc
CN105488119A (en) * 2015-11-23 2016-04-13 小米科技有限责任公司 Process finding method and device

Also Published As

Publication number Publication date
CN107832189A (en) 2018-03-23

Similar Documents

Publication Publication Date Title
CN108845853B (en) Application program starting method and mobile terminal
CN108681498B (en) CPU occupancy rate monitoring method and device and mobile terminal
CN107832189B (en) Monitoring method of I/O system and mobile terminal
CN109857559B (en) Terminal control method and terminal
CN108073437B (en) Application recommendation method and mobile terminal
CN108322599B (en) Network access method and mobile terminal
CN107832689B (en) Fingerprint identification method and mobile terminal
CN108681413B (en) Control method of display module and mobile terminal
CN108958593B (en) Method for determining communication object and mobile terminal
CN109739300B (en) Antenna control method and terminal
CN109189260B (en) Touch detection method and device
CN107835495B (en) Message prompting method and device and mobile terminal
CN108270853B (en) Message processing method and mobile terminal
CN107277364B (en) Shooting method, mobile terminal and computer readable storage medium
CN108628534B (en) Character display method and mobile terminal
CN109164908B (en) Interface control method and mobile terminal
CN108810284B (en) Mode switching method of camera and electronic equipment
CN108170310B (en) Touch screen control method and mobile terminal
CN108089935B (en) Application program management method and mobile terminal
CN108345421B (en) Icon display method and mobile terminal
CN110730013B (en) Method for improving transmission stray and mobile terminal
CN110471808B (en) Pressure key detection method and device and mobile terminal
CN109857673B (en) Control identification method and device
CN109660657B (en) Application program control method and device
CN109327605B (en) Display control method and device and mobile terminal

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
GR01 Patent grant
GR01 Patent grant