CN103455407A - Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal - Google Patents
Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal Download PDFInfo
- Publication number
- CN103455407A CN103455407A CN201310395879XA CN201310395879A CN103455407A CN 103455407 A CN103455407 A CN 103455407A CN 201310395879X A CN201310395879X A CN 201310395879XA CN 201310395879 A CN201310395879 A CN 201310395879A CN 103455407 A CN103455407 A CN 103455407A
- Authority
- CN
- China
- Prior art keywords
- cpu
- thread
- current operation
- cpu usage
- total run
- 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
Images
Landscapes
- Telephone Function (AREA)
Abstract
The invention discloses a mobile terminal CPU (Central Processing Unit) occupation rate monitoring method, a mobile terminal CPU occupation rate monitoring device and a mobile terminal. The method comprises the steps of receiving an instruction given by a user to display CPU; according to the CPU total operating time sampled by the latest two sampling points and the operating time of a CPU occupied by each process and/or thread which operates at present before the CPU occupation rate is displayed, calculating the CPU occupation rate of each process and/or thread which is operated at present, wherein the sampling points are sampling moments which are determined according to a preset sampling period for sampling the CPU total operating time and the operating time of the CPU occupied by each process and/or thread which is operated at present; displaying the CPU occupation rate of each process and/or thread which operates at present.
Description
Technical field
The present invention relates to technical field of mobile terminals, relate in particular to a kind of mobile terminal CPU usage monitoring method, device and mobile terminal.
Background technology
Along with intelligent terminal, as the enhancing of the universal and function of smart mobile phone and panel computer, the user is more and more higher for the performance requirement of smart mobile phone.Analytic function to system performance is provided in the operating system of smart mobile phone, for example, can be added up central processing unit (Central Processing Unit, the CPU) occupancy of intelligent terminal.
But, in intelligent terminal, only provide total CPU usage of system at present.The user can't learn it is that in system, which is applied in consumption CPU and electric weight on earth according to total CPU usage of this system.And often needing the professional person to carry out special processing by mobile terminal, the reason that causes the problems such as heating, power consumption height on intelligent terminal just can know.For the user, Experience Degree is poor.
Summary of the invention
The embodiment of the present invention provides a kind of mobile terminal CPU usage monitoring method, device and mobile terminal, for realizing that family is clear, find accurately and rapidly the reason of the problems such as the heating that causes mobile terminal, power consumption height.
A kind of mobile terminal CPU usage monitoring method comprises:
Receive the indication of the demonstration CPU usage of user's transmission;
According to CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication of described demonstration CPU usage, two nearest sampled points collect, calculate each process of described current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that described sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Show each process of described current operation and/or the CPU usage of thread.
In the present embodiment, each process and/or the CPU usage of thread in the certain hour section by current operation in the calculating operation system, the reason of the problems such as the heating that makes the user to find clear, accurately and rapidly to cause mobile terminal, power consumption height, avoid causing the waste of mobile terminal electric weight and the damage that heating causes mobile terminal due to the heavy-duty service of some application, extend the serviceable life of mobile terminal.
Preferably, described method also comprises:
Gather described CPU total run time according to the described default sampling period, and each process of current operation and/or CPU working time that thread takies.
In the present embodiment, by each process that periodically gathers CPU total run time and current operation and/or the CPU working time that thread takies, make when the user needs is that the user calculates CPU usage in the certain hour section, the reason of the problems such as the heating that makes the user to find clear, accurately and rapidly to cause mobile terminal, power consumption height, avoid causing the waste of mobile terminal electric weight and the damage that heating causes mobile terminal due to the heavy-duty service of some application, extend the serviceable life of mobile terminal.
Preferably, calculate each process of described current operation and/or the CPU usage of thread, in the following way:
Calculate CPU total run time difference and each process of described current operation and/or CPU difference working time that thread takies of described two sampled points;
CPU difference working time taken according to each process and/or the thread of described CPU total run time difference and described current operation, calculate each process of described current operation and/or the CPU usage of thread.
In the present embodiment, by each process and/or the CPU usage of thread in the certain hour section of calculating current operation, the reason of the problems such as the heating that makes the user to find clear, accurately and rapidly to cause mobile terminal, power consumption height, avoid causing the waste of mobile terminal electric weight and the damage that heating causes mobile terminal due to the heavy-duty service of some application, extend the serviceable life of mobile terminal.
Preferably, CPU difference working time taken according to each process and/or the thread of described CPU total run time difference and described current operation, calculate each process of described current operation and/or the CPU usage of thread, in the following way:
CPU difference working time taken by each process and/or thread by described current operation divided by described CPU total run time difference, is calculated each process of described current operation and/or the CPU usage of thread respectively.
Preferably, described method also comprises:
Receive the display cycle of the demonstration CPU usage of user's transmission;
Acquisition time is spaced apart CPU total run time and each process of current operation and/or the CPU working time that thread takies that two sampled points of described display cycle collect;
The CPU total run time collected according to described two sampled points and each process of current operation and/or the CPU working time that thread takies, calculate each process and/or the CPU usage of thread within the described display cycle of described current operation;
Each process and/or the CPU usage of thread within the described display cycle that show described current operation.
In the present embodiment, the display cycle arranged according to the user, process and/or the CPU usage of thread within the display cycle of current operation are provided to the user, make the user can obtain the CPU usage of interior process of any a period of time and/or thread, and then can find more exactly the reason of the problems such as the heating that causes mobile terminal, power consumption height, avoid causing the waste of mobile terminal electric weight and the damage that heating causes mobile terminal due to the heavy-duty service of some application, extend the serviceable life of mobile terminal.
Preferably, described method also comprises:
Each process of described current operation and/or the CPU usage of thread are sorted;
Show each process of the described current operation after sorting and/or the CPU usage of thread.
In the present embodiment, by the CPU usage to process and/or thread, sorted, make the cpu usage of each process and/or thread very clear, the user can know that the CPU usage of which process and/or thread is higher clear, rapidly, thereby finds the reason of the problems such as the heating that causes mobile terminal, power consumption height.
A kind of mobile terminal CPU usage monitoring device comprises:
Receiver module, for receiving the indication of the demonstration CPU usage that the user sends;
The CPU usage computing module, for CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication according to described demonstration CPU usage, two nearest sampled points collect, calculate each process of described current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that described sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Display module, for each process of showing described current operation and/or the CPU usage of thread.
Preferably, described device also comprises:
Sampling module, for according to the described default sampling period, gathering described CPU total run time, and each process of current operation and/or CPU working time that thread takies.
Preferably, described CPU usage computing module, for CPU total run time difference and each process of described current operation and/or CPU difference working time that thread takies of calculating described two sampled points; CPU difference working time taken according to each process and/or the thread of described CPU total run time difference and described current operation, calculate each process of described current operation and/or the CPU usage of thread.
Preferably, described CPU usage computing module, CPU difference working time that is used for taking by each process and/or thread by described current operation, respectively divided by described CPU total run time difference, is calculated each process of described current operation and/or the CPU usage of thread.
Preferably, described receiver module, also for receiving the display cycle of the demonstration CPU usage that the user sends;
Described CPU usage computing module, be spaced apart for acquisition time CPU total run time and each process of current operation and/or the CPU working time that thread takies that two sampled points of described display cycle collect; The CPU total run time collected according to described two sampled points and each process of current operation and/or the CPU working time that thread takies, calculate each process and/or the CPU usage of thread within the described display cycle of described current operation;
Described display module, for each process and/or the CPU usage of thread within the described display cycle that shows described current operation.
Preferably, described device also comprises:
Order module, sorted for each process to described current operation and/or the CPU usage of thread;
Display module, for each process of showing the described current operation after sequence and/or the CPU usage of thread.
A kind of mobile terminal, include storer, and one or more than one program, one of them or an above program are stored in storer, and are configured to carry out described one or above routine package containing for carrying out the instruction of following operation by one or above processor:
Receive the indication of the demonstration CPU usage of user's transmission;
According to CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication of described demonstration CPU usage, two nearest sampled points collect, calculate each process of described current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that described sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Show each process of described current operation and/or the CPU usage of thread.Other features and advantages of the present invention will be set forth in the following description, and, partly from instructions, become apparent, or understand by implementing the present invention.Purpose of the present invention and other advantages can realize and obtain by specifically noted structure in the instructions write, claims and accompanying drawing.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
The accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms the part of instructions, for explaining the present invention, is not construed as limiting the invention together with embodiments of the present invention.In the accompanying drawings:
The schematic flow sheet that Fig. 1 is mobile terminal CPU usage monitoring method in the embodiment of the present invention;
Another schematic flow sheet that Fig. 2 is mobile terminal CPU usage monitoring method in the embodiment of the present invention;
The flow process schematic diagram again that Fig. 3 is mobile terminal CPU usage monitoring method in the embodiment of the present invention;
The CPU usage that Fig. 4 is each process and/or thread in the embodiment of the present invention shows schematic diagram;
Another shows schematic diagram the CPU usage that Fig. 5 is each process and/or thread in the embodiment of the present invention;
The structural representation that Fig. 6 is mobile terminal CPU usage monitoring device in the embodiment of the present invention;
The structural representation that Fig. 7 is mobile terminal in the embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein, only for description and interpretation the present invention, is not intended to limit the present invention.
Mobile terminal can only be checked the total occupancy of the CPU of all processes and/or thread, and the total occupancy of this CPU is real-time, for the user, can't be according to the total occupancy of the real-time CPU cpu usage of each process and/or thread in the analysis operation system exactly, more can't know which process specifically and/or thread have caused the problems such as the heating, power consumption height of mobile terminal.Wherein, process and/or thread mean: in process and thread at least one.
In the embodiment of the present invention, for problems such as the heating that mobile phone users can clearly be known be which process and/or thread to cause mobile terminal, power consumption height actually, in the operating system process of mobile terminal, the CPU total run time of operating system and each process of current operation and/or the CPU that thread takies are gathered working time according to the default sampling period.The cpu usage of the display cycle calculating operation system of setting according to the user each process and/or thread within certain display cycle.Wherein, the display cycle should be the integral multiple in sampling period, if the sampling period is 5 minutes, the display cycle can be 5 minutes, 10 minutes, 15 minutes, 20 minutes, 30 minutes, 60 minutes etc., and the display cycle is specified according to actual needs by the user.Mobile phone users can be by checking the cpu usage of operating system each process and/or thread in certain display cycle, the clear reason of knowing exactly the problems such as the heating that causes mobile terminal, power consumption height.
As shown in Figure 1, the embodiment of the present invention provides a kind of mobile terminal CPU usage monitoring method, comprises the following steps:
Wherein, the sampling instant of CPU working time that sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Preferably, the method also comprises: gather the CPU total run time according to default sampling period, and each process of current operation and/or CPU working time that thread takies.
Preferably, in step 104, calculate each process of current operation and/or the CPU usage of thread, in the following way:
Calculate CPU total run time difference and each process of current operation and/or CPU difference working time that thread takies of two sampled points;
CPU difference working time taken according to each process and/or the thread of CPU total run time difference and current operation, calculate each process of current operation and/or the CPU usage of thread.
Preferably, CPU difference working time taken according to each process and/or the thread of CPU total run time difference and current operation, calculate each process of current operation and/or the CPU usage of thread, in the following way:
CPU difference working time taken by each process and/or thread by current operation, respectively divided by CPU total run time difference, is calculated each process of current operation and/or the CPU usage of thread.
In the present embodiment, each process and/or the CPU usage of thread in certain measurement period by current operation in the calculating operation system, the reason of the problems such as the heating that makes the user to find clear, accurately and rapidly to cause mobile terminal, power consumption height, avoid causing the waste of mobile terminal electric weight and the damage that heating causes mobile terminal due to the heavy-duty service of some application, extend the serviceable life of mobile terminal.
Preferably, as shown in Figure 2, the method also comprises:
In the present embodiment, the display cycle arranged according to the user, process and/or the CPU usage of thread within the display cycle of current operation are provided to the user, make the user can obtain the CPU usage of interior process of any a period of time and/or thread, and then can find more exactly the reason of the problems such as the heating that causes mobile terminal, power consumption height, avoid causing the waste of mobile terminal electric weight and the damage that heating causes mobile terminal due to the heavy-duty service of some application, extend the serviceable life of mobile terminal.
Preferably, the method for the present embodiment also comprises:
Each process and/or the CPU usage of thread in measurement period to current operation are sorted;
Each process and/or the CPU usage of thread in measurement period that show the current operation after sorting.
In the present embodiment, by the CPU usage to process and/or thread, sorted, make the cpu usage of each process and/or thread very clear, the user can know that the CPU usage of which process and/or thread is higher clear, rapidly, thereby finds the reason of the problems such as the heating that causes mobile terminal, power consumption height.
As shown in Figure 3, the CPU usage of calculation procedure pid650system_server of take is example, and the mobile terminal CPU usage monitoring method of the embodiment of the present invention comprises the following steps:
Below the actual implementation of the embodiment of the present invention is specifically described.
At first, by a statistics class, record CPU working time and the CPU total run time that all processes in operating system and/or thread take, such as the ProcessStats class that can adopt the Android system (adding up the class of each process cpu usage) etc.Below by the PeriodStats class, refer to above-mentioned statistics class.
The PeriodStats class has CPU working time that all processes in the operating system of recording and/or thread take and the function of CPU total run time.The PeriodStats class also provides update(to upgrade) function.When the initialization of PeriodStats class, read from/proc file system (/proc file system is for providing the file system of operation information, each process and/or thread information linux system) CPU working time and the CPU total run time that all processes and/or thread take, and preserve in the PeriodStats class object.
When calling the update function, still from/proc file system, read the CPU working time that CPU total run time, each process and/or thread take, calculate CPU difference working time that this CPU total run time difference, each process and/or thread between reading and reading last time takies, and the current value of reading of CPU run-time updating that CPU total run time, each process and/or the thread of preserving in the PeriodStats class object taken.
Then, in BatteryStatsImpl class (being used for calculating the class of information about power in the Android system), add for recording the statistics class of each measurement period.For example, add up 5 minutes, 10 minutes, 30 minutes, the CPU usage of 60 minutes, provide four objects of PeriodStats class, is respectively periodStats1, periodStats2, periodStats6, periodStats12.The initialization that adds these four objects in the initialization procedure of BatterStatsImpl class.Send a message every 5 minutes (for the minimum common divisor of each measurement period) in the message queue of BatterStatsImpl class, for example send out MSG_UPDATE_STATS message.In Message Processing, which measurement period judges current is, if first cycle is carried out the update operation of periodStats1, if second period, the update that carries out periodStats2 operates, by that analogy.
As shown in Figure 4 and Figure 5, the system setting of mobile terminal operating system-" electric weight-" in electric weight service condition interface, the option of a cpu usage is provided, when clicking this option, from each measurement period of BatteryStatsImpl, as CPU difference working time that CPU total run time difference, each process and/or thread take in 5 minutes, 10 minutes, CPU difference working time taken with process and/or thread obtains the cpu busy percentage of each process in this measurement period and/or thread divided by CPU total run time difference.Then the cpu busy percentage information of each process and/or thread sorted, result is shown to the user with the form of list.
Wherein, in the present embodiment, due to the not impact of ruuning situation on current C PU of buttoned-up process and/or thread reality, also can not cause heating or the power consumption of current mobile terminal, therefore, only calculate the CPU usage of the current process of moving and/or thread, will not add up for the process of having closed and/or thread.
In the present embodiment, for the PeriodStats class object, also can not be placed in the BatteryStatsImpl class object, but realize in addition one of assembly of a Service(Android, can be always at running background) or be placed in other codes that cycling service can be provided.
In the present embodiment, for the demonstration of CPU usage, also can not be placed on system and arrange in interface, but apply in another one the file that shows or generate a user interface close friend.
Based on same inventive concept, the embodiment of the present invention also provides a kind of mobile terminal CPU usage monitoring device, and as shown in Figure 6, this device comprises:
CPU usage computing module 62, for CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication according to showing CPU usage, two nearest sampled points collect, calculate each process of current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Preferably, this device also comprises:
Preferably, CPU usage computing module 62, for CPU total run time difference and each process of current operation and/or CPU difference working time that thread takies of calculating two sampled points; CPU difference working time taken according to each process and/or the thread of CPU total run time difference and current operation, calculate each process of current operation and/or the CPU usage of thread.
Preferably, CPU usage computing module 62, CPU difference working time taken for each process and/or thread by by current operation, respectively divided by CPU total run time difference, is calculated each process of current operation and/or the CPU usage of thread.
Preferably, receiver module 61, also for receiving the display cycle of the demonstration CPU usage that the user sends;
CPU usage computing module 62, be spaced apart for acquisition time CPU total run time and each process of current operation and/or the CPU working time that thread takies that two sampled points of display cycle collect; The CPU total run time collected according to two sampled points and each process of current operation and/or the CPU working time that thread takies, calculate each process and/or the CPU usage of thread within the display cycle of current operation;
Fig. 7 is a kind of mobile terminal structure schematic diagram that the embodiment of the present invention provides.As shown in Figure 7, the mobile terminal CPU usage monitoring method that this mobile terminal can provide for implementing above-described embodiment.Wherein, this mobile terminal can be mobile phone, panel computer pad, Wearable mobile device (as intelligent watch) etc.Preferential:
Communication unit 110 can be used for receiving and sending messages or communication process in, the reception of signal and transmission, this communication unit 110 can be RF(Radio Frequency, radio frequency) circuit, router, modulator-demodular unit, etc. network communication equipment.Especially, when communication unit 110 is the RF circuit, after the downlink information of base station is received, transfer to one or above processor 180 processing; In addition, will relate to up data and send to base station.Usually, RF circuit as communication unit includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupling mechanism, LNA(Low Noise Amplifier, low noise amplifier), diplexer etc.In addition, communication unit 110 can also be by radio communication and network and other devices communicatings.Radio communication can be used arbitrary communication standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile communications), GPRS (General Packet Radio Service, general packet radio service), CDMA (Code Division Multiple Access, CDMA), WCDMA (Wideband Code Division Multiple Access, Wideband Code Division Multiple Access (WCDMA)), LTE (Long Term Evolution, Long Term Evolution), Email, SMS (Short Messaging Service, Short Message Service) etc.Storer 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of storer 120 by operation, thereby carries out various function application and data processing.Storer 120 can mainly comprise storage program district and storage data field, wherein, but the required application program (such as sound-playing function, image player function etc.) of storage program district storage operation system, at least one function etc.; The data (such as voice data, phone directory etc.) that the use according to mobile terminal 700 creates etc. can be stored in the storage data field.In addition, storer 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, for example at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, storer 120 can also comprise Memory Controller, so that the access of processor 180 and 130 pairs of storeies 120 of input block to be provided.
Input block 130 can be used for receiving numeral or the character information of input, and generation arranges with the user and function is controlled relevant keyboard, mouse, control lever, optics or the input of trace ball signal.Preferably, input block 130 can comprise touch-sensitive surperficial 131 and other input equipments 132.Touch-sensitive surperficial 131, also referred to as touch display screen or Trackpad, can collect the user or near touch operation (use any applicable objects such as finger, stylus or annex such as the user on touch-sensitive surperficial 131 or near the operation touch-sensitive surperficial 131) thereon, and drive corresponding coupling arrangement according to predefined formula.Optionally, touch-sensitive surperficial 131 can comprise touch detecting apparatus and two parts of touch controller.Wherein, touch detecting apparatus detects user's touch orientation, and detects the signal that touch operation is brought, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 180, and the order that energy receiving processor 180 is sent is also carried out.In addition, can adopt the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize touch-sensitive surperficial 131.Except touch-sensitive surperficial 131, input block 130 can also comprise other input equipments 132.Preferably, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (controlling button, switch key etc. such as volume), trace ball, mouse, control lever etc.
In order to realize radio communication, can dispose wireless communication unit 170 on this mobile terminal, this wireless communication unit 170 can be the WiFi module.WiFi belongs to the short range wireless transmission technology, mobile terminal 700 by wireless communication unit 170 can help that the user sends and receive e-mail, browsing page and access streaming video etc., it provides wireless broadband internet access for the user.Although Fig. 7 shows wireless communication unit 170, be understandable that, it does not belong to must forming of mobile terminal 700, fully can be as required in the scope of the essence that does not change invention and omit.
Although not shown, mobile terminal 700 can also comprise camera, bluetooth module etc., does not repeat them here.
Specifically in the present embodiment, the display unit of mobile terminal is touch-screen display, mobile terminal also includes storer, and one or more than one program, one of them or an above program are stored in storer, and are configured to carry out one or above routine package containing for carrying out the instruction of following operation by one or above processor:
Receive the indication of the demonstration CPU usage of user's transmission;
According to CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication that shows CPU usage, two nearest sampled points collect, calculate each process of current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Show each process of current operation and/or the CPU usage of thread.
Preferably, also comprise for carrying out the instruction of following operation:
Gather the CPU total run time according to default sampling period, and each process of current operation and/or CPU working time that thread takies.Preferably, also comprise for carrying out the instruction of following operation:
Calculate CPU total run time difference and each process of current operation and/or CPU difference working time that thread takies of two sampled points;
CPU difference working time taken according to each process and/or the thread of CPU total run time difference and current operation, calculate each process of current operation and/or the CPU usage of thread.
Preferably, also comprise for carrying out the instruction of following operation:
CPU difference working time taken by each process and/or thread by current operation, respectively divided by CPU total run time difference, is calculated each process of current operation and/or the CPU usage of thread.
Preferably, also comprise for carrying out the instruction of following operation:
Receive the display cycle of the demonstration CPU usage of user's transmission;
Acquisition time is spaced apart CPU total run time and each process of current operation and/or the CPU working time that thread takies that two sampled points of display cycle collect;
The CPU total run time collected according to two sampled points and each process of current operation and/or the CPU working time that thread takies, calculate each process and/or the CPU usage of thread within the display cycle of current operation;
Each process and/or the CPU usage of thread within the display cycle that show current operation.
Preferably, also comprise for carrying out the instruction of following operation:
Each process of current operation and/or the CPU usage of thread are sorted;
Show each process of the current operation after sorting and/or the CPU usage of thread.In the present embodiment, each process and/or the CPU usage of thread in certain measurement period by current operation in the calculating operation system, the reason of the problems such as the heating that makes the user to find clear, accurately and rapidly to cause mobile terminal, power consumption height, avoid causing the waste of mobile terminal electric weight and the damage that heating causes mobile terminal due to the heavy-duty service of some application, extend the serviceable life of mobile terminal.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt complete hardware implementation example, implement software example or in conjunction with the form of the embodiment of software and hardware aspect fully.And the present invention can adopt the form that wherein includes the upper computer program of implementing of computer-usable storage medium (including but not limited to magnetic disk memory and optical memory etc.) of computer usable program code one or more.
The present invention describes with reference to process flow diagram and/or the block scheme of method, equipment (system) and computer program according to the embodiment of the present invention.Should understand can be in computer program instructions realization flow figure and/or block scheme each flow process and/or the flow process in square frame and process flow diagram and/or block scheme and/or the combination of square frame.Can provide these computer program instructions to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, make the instruction of carrying out by the processor of computing machine or other programmable data processing device produce for realizing the device in the function of flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame appointments.
These computer program instructions also can be stored in energy vectoring computer or the computer-readable memory of other programmable data processing device with ad hoc fashion work, make the instruction be stored in this computer-readable memory produce the manufacture that comprises command device, this command device is realized the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
These computer program instructions also can be loaded on computing machine or other programmable data processing device, make and carry out the sequence of operations step to produce computer implemented processing on computing machine or other programmable devices, thereby the instruction of carrying out on computing machine or other programmable devices is provided for realizing the step of the function of appointment in flow process of process flow diagram or a plurality of flow process and/or square frame of block scheme or a plurality of square frame.
Obviously, those skilled in the art can carry out various changes and modification and not break away from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention also is intended to comprise these changes and modification interior.
Claims (13)
1. a mobile terminal CPU usage monitoring method, is characterized in that, comprising:
Receive the indication of the demonstration CPU usage of user's transmission;
According to CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication of described demonstration CPU usage, two nearest sampled points collect, calculate each process of described current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that described sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Show each process of described current operation and/or the CPU usage of thread.
2. according to the method shown in claim 1, it is characterized in that, described method also comprises:
Gather described CPU total run time according to the described default sampling period, and each process of current operation and/or CPU working time that thread takies.
3. according to the method shown in claim 1, it is characterized in that, calculate each process of described current operation and/or the CPU usage of thread, in the following way:
Calculate CPU total run time difference and each process of described current operation and/or CPU difference working time that thread takies of described two sampled points;
CPU difference working time taken according to each process and/or the thread of described CPU total run time difference and described current operation, calculate each process of described current operation and/or the CPU usage of thread.
4. method according to claim 3, it is characterized in that, CPU difference working time taken according to each process and/or the thread of described CPU total run time difference and described current operation, calculate each process of described current operation and/or the CPU usage of thread, in the following way:
CPU difference working time taken by each process and/or thread by described current operation divided by described CPU total run time difference, is calculated each process of described current operation and/or the CPU usage of thread respectively.
5. according to the method shown in claim 1, it is characterized in that, described method also comprises:
Receive the display cycle of the demonstration CPU usage of user's transmission;
Acquisition time is spaced apart CPU total run time and each process of current operation and/or the CPU working time that thread takies that two sampled points of described display cycle collect;
The CPU total run time collected according to described two sampled points and each process of current operation and/or the CPU working time that thread takies, calculate each process and/or the CPU usage of thread within the described display cycle of described current operation;
Each process and/or the CPU usage of thread within the described display cycle that show described current operation.
6. method according to claim 1, is characterized in that, described method also comprises:
Each process of described current operation and/or the CPU usage of thread are sorted;
Show each process of the described current operation after sorting and/or the CPU usage of thread.
7. a mobile terminal CPU usage monitoring device, is characterized in that, comprising:
Receiver module, for receiving the indication of the demonstration CPU usage that the user sends;
The CPU usage computing module, for CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication according to described demonstration CPU usage, two nearest sampled points collect, calculate each process of described current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that described sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Display module, for each process of showing described current operation and/or the CPU usage of thread.
8. device according to claim 7, is characterized in that, described device also comprises:
Sampling module, for according to the described default sampling period, gathering described CPU total run time, and each process of current operation and/or CPU working time that thread takies.
9. device according to claim 7, is characterized in that, described CPU usage computing module, for CPU total run time difference and each process of described current operation and/or CPU difference working time that thread takies of calculating described two sampled points; CPU difference working time taken according to each process and/or the thread of described CPU total run time difference and described current operation, calculate each process of described current operation and/or the CPU usage of thread.
10. device according to claim 9, it is characterized in that, described CPU usage computing module, CPU difference working time that is used for taking by each process and/or thread by described current operation, respectively divided by described CPU total run time difference, is calculated each process of described current operation and/or the CPU usage of thread.
11. device according to claim 9, is characterized in that,
Described receiver module, also for receiving the display cycle of the demonstration CPU usage that the user sends;
Described CPU usage computing module, be spaced apart for acquisition time CPU total run time and each process of current operation and/or the CPU working time that thread takies that two sampled points of described display cycle collect; The CPU total run time collected according to described two sampled points and each process of current operation and/or the CPU working time that thread takies, calculate each process and/or the CPU usage of thread within the described display cycle of described current operation;
Described display module, for each process and/or the CPU usage of thread within the described display cycle that shows described current operation.
12. device according to claim 7, is characterized in that, described device also comprises:
Order module, sorted for each process to described current operation and/or the CPU usage of thread;
Described display module, for each process of showing the described current operation after sequence and/or the CPU usage of thread.
A 13. mobile terminal, it is characterized in that, include storer, and one or more than one program, one of them or an above program are stored in storer, and are configured to carry out described one or above routine package containing for carrying out the instruction of following operation by one or above processor:
Receive the indication of the demonstration CPU usage of user's transmission;
According to CPU total run time and each process of current operation and/or the CPU working time that thread takies that before the indication of described demonstration CPU usage, two nearest sampled points collect, calculate each process of described current operation and/or the CPU usage of thread; Wherein, the sampling instant of CPU working time that described sampled point takies for each process and/or the thread to CPU total run time and current operation of determining according to the default sampling period;
Show each process of described current operation and/or the CPU usage of thread.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310395879XA CN103455407A (en) | 2013-09-03 | 2013-09-03 | Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310395879XA CN103455407A (en) | 2013-09-03 | 2013-09-03 | Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103455407A true CN103455407A (en) | 2013-12-18 |
Family
ID=49737807
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310395879XA Pending CN103455407A (en) | 2013-09-03 | 2013-09-03 | Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103455407A (en) |
Cited By (26)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104021046A (en) * | 2014-05-29 | 2014-09-03 | 深圳市深信服电子科技有限公司 | Method and device for processing applications |
CN105117275A (en) * | 2015-07-27 | 2015-12-02 | 上海斐讯数据通信技术有限公司 | Graphical process management device and method |
CN105224439A (en) * | 2014-07-02 | 2016-01-06 | 北京金山安全软件有限公司 | Method and device for detecting CPU occupancy rate of terminal APP and terminal |
CN105337791A (en) * | 2014-08-14 | 2016-02-17 | 腾讯科技(深圳)有限公司 | Data monitoring method and device |
CN105376378A (en) * | 2015-10-20 | 2016-03-02 | 湖南创研科技股份有限公司 | Method and system for monitoring heat generation rate of smart phone, and smart phone |
CN105528052A (en) * | 2015-12-09 | 2016-04-27 | 上海斐讯数据通信技术有限公司 | Electronic equipment power consumption reduction method and device and electronic equipment with display screen |
WO2016197737A1 (en) * | 2016-01-08 | 2016-12-15 | 中兴通讯股份有限公司 | Self-check processing method, apparatus and system |
CN106371971A (en) * | 2016-08-30 | 2017-02-01 | 深圳市金立通信设备有限公司 | Method for reminding terminal performance and terminal |
WO2017016074A1 (en) * | 2015-07-30 | 2017-02-02 | 中兴通讯股份有限公司 | Cpu occupation rate detection method and apparatus |
CN106407088A (en) * | 2016-09-08 | 2017-02-15 | 努比亚技术有限公司 | Method and device for detecting multi-core CPU |
CN106528318A (en) * | 2016-11-29 | 2017-03-22 | 迈普通信技术股份有限公司 | Thread endless loop detection method and device |
CN107220166A (en) * | 2016-03-22 | 2017-09-29 | 大唐移动通信设备有限公司 | The statistical method and device of a kind of CPU usage |
CN107491378A (en) * | 2017-08-31 | 2017-12-19 | 杭州迪普科技股份有限公司 | A kind of determination method and device of CPU usage |
CN107491349A (en) * | 2017-08-25 | 2017-12-19 | 广东欧珀移动通信有限公司 | Applied program processing method and device, computer equipment, storage medium |
CN107491372A (en) * | 2017-08-03 | 2017-12-19 | 郑州云海信息技术有限公司 | A kind of method and system for linux system RPM bags statistics CPU usage |
CN108647127A (en) * | 2018-05-04 | 2018-10-12 | 腾讯科技(深圳)有限公司 | Using power consumption monitoring method and device |
CN108681498A (en) * | 2018-03-23 | 2018-10-19 | 维沃移动通信有限公司 | A kind of monitoring method of CPU usage, device and mobile terminal |
CN108829510A (en) * | 2018-05-04 | 2018-11-16 | 天津猎鹰网络技术有限公司 | Thread binds treating method and apparatus |
CN109412884A (en) * | 2018-08-21 | 2019-03-01 | 平安科技(深圳)有限公司 | Performance data acquisition method, device and storage medium, the server of component |
CN109542729A (en) * | 2018-11-27 | 2019-03-29 | 苏州思必驰信息科技有限公司 | Device performance parameters data analysing method and device |
CN109995930A (en) * | 2017-12-29 | 2019-07-09 | 广东欧珀移动通信有限公司 | Process handling method and device, electronic equipment, computer readable storage medium |
CN110609773A (en) * | 2019-09-05 | 2019-12-24 | 北京宝兰德软件股份有限公司 | Java thread CPU utilization rate obtaining method and device |
CN110737320A (en) * | 2019-09-25 | 2020-01-31 | 腾讯音乐娱乐科技(深圳)有限公司 | Power consumption detection method and device, electronic equipment and storage medium |
CN111414295A (en) * | 2020-03-09 | 2020-07-14 | 浙江大华技术股份有限公司 | CPU occupancy rate statistical method, device, equipment and medium |
CN112817683A (en) * | 2021-03-02 | 2021-05-18 | 深圳市东微智能科技股份有限公司 | Control method, control device and medium for topological structure configuration interface |
CN113448803A (en) * | 2021-06-25 | 2021-09-28 | 东莞市小精灵教育软件有限公司 | Method and device for monitoring CPU |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056264A (en) * | 2007-04-25 | 2007-10-17 | 华为技术有限公司 | Traffic control method and service processing system |
CN102981863A (en) * | 2011-09-07 | 2013-03-20 | 奇智软件(北京)有限公司 | Management method and device of starting up projects |
CN103092738A (en) * | 2012-12-26 | 2013-05-08 | 杭州华为数字技术有限公司 | Method and device of resource visualization |
-
2013
- 2013-09-03 CN CN201310395879XA patent/CN103455407A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101056264A (en) * | 2007-04-25 | 2007-10-17 | 华为技术有限公司 | Traffic control method and service processing system |
CN102981863A (en) * | 2011-09-07 | 2013-03-20 | 奇智软件(北京)有限公司 | Management method and device of starting up projects |
CN103092738A (en) * | 2012-12-26 | 2013-05-08 | 杭州华为数字技术有限公司 | Method and device of resource visualization |
Non-Patent Citations (1)
Title |
---|
周奕利: "基于面向对象技术的监控代理设计和实现", 《中国优秀硕士学位论文全文数据库·信息科技辑》 * |
Cited By (34)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104021046A (en) * | 2014-05-29 | 2014-09-03 | 深圳市深信服电子科技有限公司 | Method and device for processing applications |
CN105224439A (en) * | 2014-07-02 | 2016-01-06 | 北京金山安全软件有限公司 | Method and device for detecting CPU occupancy rate of terminal APP and terminal |
CN105337791A (en) * | 2014-08-14 | 2016-02-17 | 腾讯科技(深圳)有限公司 | Data monitoring method and device |
CN105117275A (en) * | 2015-07-27 | 2015-12-02 | 上海斐讯数据通信技术有限公司 | Graphical process management device and method |
WO2017016074A1 (en) * | 2015-07-30 | 2017-02-02 | 中兴通讯股份有限公司 | Cpu occupation rate detection method and apparatus |
CN105376378A (en) * | 2015-10-20 | 2016-03-02 | 湖南创研科技股份有限公司 | Method and system for monitoring heat generation rate of smart phone, and smart phone |
CN105376378B (en) * | 2015-10-20 | 2018-03-27 | 湖南创研科技股份有限公司 | A kind of method and monitoring system and mobile phone for monitoring smart mobile phone heat generation rate |
CN105528052A (en) * | 2015-12-09 | 2016-04-27 | 上海斐讯数据通信技术有限公司 | Electronic equipment power consumption reduction method and device and electronic equipment with display screen |
CN105528052B (en) * | 2015-12-09 | 2019-08-16 | 上海斐讯数据通信技术有限公司 | The reduction method, apparatus of powder consumption of electronic equipment and electronic equipment with display screen |
WO2016197737A1 (en) * | 2016-01-08 | 2016-12-15 | 中兴通讯股份有限公司 | Self-check processing method, apparatus and system |
CN107220166A (en) * | 2016-03-22 | 2017-09-29 | 大唐移动通信设备有限公司 | The statistical method and device of a kind of CPU usage |
CN107220166B (en) * | 2016-03-22 | 2019-09-17 | 大唐移动通信设备有限公司 | A kind of statistical method and device of CPU usage |
CN106371971A (en) * | 2016-08-30 | 2017-02-01 | 深圳市金立通信设备有限公司 | Method for reminding terminal performance and terminal |
CN106407088A (en) * | 2016-09-08 | 2017-02-15 | 努比亚技术有限公司 | Method and device for detecting multi-core CPU |
CN106528318A (en) * | 2016-11-29 | 2017-03-22 | 迈普通信技术股份有限公司 | Thread endless loop detection method and device |
CN106528318B (en) * | 2016-11-29 | 2020-02-04 | 迈普通信技术股份有限公司 | Thread dead loop detection method and device |
CN107491372A (en) * | 2017-08-03 | 2017-12-19 | 郑州云海信息技术有限公司 | A kind of method and system for linux system RPM bags statistics CPU usage |
CN107491349A (en) * | 2017-08-25 | 2017-12-19 | 广东欧珀移动通信有限公司 | Applied program processing method and device, computer equipment, storage medium |
CN107491378A (en) * | 2017-08-31 | 2017-12-19 | 杭州迪普科技股份有限公司 | A kind of determination method and device of CPU usage |
CN109995930A (en) * | 2017-12-29 | 2019-07-09 | 广东欧珀移动通信有限公司 | Process handling method and device, electronic equipment, computer readable storage medium |
CN108681498A (en) * | 2018-03-23 | 2018-10-19 | 维沃移动通信有限公司 | A kind of monitoring method of CPU usage, device and mobile terminal |
CN108681498B (en) * | 2018-03-23 | 2022-02-01 | 维沃移动通信有限公司 | CPU occupancy rate monitoring method and device and mobile terminal |
CN108647127A (en) * | 2018-05-04 | 2018-10-12 | 腾讯科技(深圳)有限公司 | Using power consumption monitoring method and device |
CN108829510B (en) * | 2018-05-04 | 2021-01-29 | 天津猎鹰网络技术有限公司 | Thread binding processing method and device |
CN108829510A (en) * | 2018-05-04 | 2018-11-16 | 天津猎鹰网络技术有限公司 | Thread binds treating method and apparatus |
CN109412884A (en) * | 2018-08-21 | 2019-03-01 | 平安科技(深圳)有限公司 | Performance data acquisition method, device and storage medium, the server of component |
CN109542729A (en) * | 2018-11-27 | 2019-03-29 | 苏州思必驰信息科技有限公司 | Device performance parameters data analysing method and device |
CN110609773A (en) * | 2019-09-05 | 2019-12-24 | 北京宝兰德软件股份有限公司 | Java thread CPU utilization rate obtaining method and device |
CN110737320A (en) * | 2019-09-25 | 2020-01-31 | 腾讯音乐娱乐科技(深圳)有限公司 | Power consumption detection method and device, electronic equipment and storage medium |
CN110737320B (en) * | 2019-09-25 | 2023-08-18 | 腾讯音乐娱乐科技(深圳)有限公司 | Power consumption detection method and device, electronic equipment and storage medium |
CN111414295A (en) * | 2020-03-09 | 2020-07-14 | 浙江大华技术股份有限公司 | CPU occupancy rate statistical method, device, equipment and medium |
CN111414295B (en) * | 2020-03-09 | 2023-06-30 | 浙江大华技术股份有限公司 | Statistical method, device, equipment and medium for CPU occupancy rate |
CN112817683A (en) * | 2021-03-02 | 2021-05-18 | 深圳市东微智能科技股份有限公司 | Control method, control device and medium for topological structure configuration interface |
CN113448803A (en) * | 2021-06-25 | 2021-09-28 | 东莞市小精灵教育软件有限公司 | Method and device for monitoring CPU |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103455407A (en) | Mobile terminal CPU (Central Processing Unit) occupation rate monitoring method and device and mobile terminal | |
CN104383681B (en) | Method for controlling game program, device and mobile terminal | |
CN103473011B (en) | A kind of mobile terminal performance detection method, device and mobile terminal | |
CN103327102A (en) | Application program recommending method and device | |
CN103530115B (en) | Application program display method and device and terminal equipment | |
CN104834529A (en) | Method and device for optimizing performance of application | |
CN103472993A (en) | Rotation displaying method, device and terminal equipment | |
CN103500002A (en) | Method, device and terminal equipment for managing application program | |
CN103309562A (en) | Desktop display method, desktop display device and mobile terminal | |
CN103530040A (en) | Method, device and electronic equipment for moving target element | |
CN104598476A (en) | Message aggregation display method and information display method and relevant device | |
CN104133757A (en) | Method for obtaining memory information and terminal | |
CN103530520A (en) | Method and terminal for obtaining data | |
CN103399633A (en) | Wireless remote control method and mobile terminal | |
CN104093123A (en) | Application program information pushing method, device and system and mobile terminal | |
CN104166614A (en) | Frame rate detecting method for mobile device and related device | |
CN104077211A (en) | Test method and test system for mobile terminal software | |
CN103473092A (en) | Method and device for processing downloaded applications and terminal equipment | |
CN104252341A (en) | Method and device for resurfacing application program and client side device of application program | |
CN103488392A (en) | Editing method and device used for editable content of touch screen, and terminal | |
CN103945241A (en) | Streaming data statistical method, system and related device | |
CN103399706A (en) | Page interaction method, device and terminal | |
CN103546632A (en) | Method and device for alarm ringing of mobile terminal and mobile terminal | |
CN103631592A (en) | Configuration method, calling method, device and equipment for displaying resources | |
CN103501373A (en) | Method, device and terminal for making call |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20131218 |
|
RJ01 | Rejection of invention patent application after publication |