CN109271305A - A kind of information acquisition method and device - Google Patents
A kind of information acquisition method and device Download PDFInfo
- Publication number
- CN109271305A CN109271305A CN201811076563.3A CN201811076563A CN109271305A CN 109271305 A CN109271305 A CN 109271305A CN 201811076563 A CN201811076563 A CN 201811076563A CN 109271305 A CN109271305 A CN 109271305A
- Authority
- CN
- China
- Prior art keywords
- target device
- information
- threshold
- preset time
- address
- 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
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording 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/3466—Performance evaluation by tracing or monitoring
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the present application discloses a kind of information acquisition method and device, obtain the address of preset time and target device, using preset time as the period, information inquiring request is sent to target device according to the address of target device, target device obtains the resource utilisation information of target device according to information inquiring request, and the resource utilisation information of target device is returned, realize the automatic acquisition of the resource utilisation information of target device, this information acquiring pattern efficiency with higher and accuracy.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of information acquisition method and device.
Background technique
During the performance test of computer product, it can check whether the operation of the computer product can consume calculating
The excess resource of machine, specifically, the resource utilisation information of computer can be obtained in real time, such as before running the computer product
Resource utilisation information and run the computer product during resource utilisation information.The resource utilisation information of computer is for example
Utilization rate, memory usage and the disk utilization etc. of central processing unit (CPU) (CPU).
However, the resource utilisation information of computer is usually obtained by manually checking, for example, can be by manually checking
Task manager obtains cpu busy percentage and memory usage, obtains disk utilization etc. by manually checking my computer.
However the special staff of the acquisition process of resource utilisation information needs is in due course and checks that various information are remembered
Record, is easy to appear mistake, therefore information acquisition efficiency and accuracy are lower.
Summary of the invention
In order to solve the above technical problems, the embodiment of the present application provides a kind of information acquisition method and device, can obtain automatically
Take the resource utilisation information of target device, information acquisition efficiency and accuracy with higher.
The embodiment of the present application provides a kind of information acquisition method, which comprises
Obtain the address of preset time and target device;
Using the preset time as the period, information inquiring request is sent to the target device according to the address;
The resource utilisation information of the target device is received, the resource utilisation information of the target device is that the target is set
For what is obtained according to the information inquiring request.
Optionally, the resource utilisation information of the target device includes: that the central processor CPU of the target device utilizes
At least one of rate, memory usage and disk utilization.
Optionally, the method also includes:
Judge whether the cpu busy percentage of the target device is greater than or equal to first threshold, if so, passing through first method
It is alerted;And/or
Judge whether the memory usage of the target device is greater than or equal to second threshold, if so, passing through second party
Formula is alerted;And/or
The disk for judging the target device is for whether being greater than or equal to third threshold value, if so, passing through third party
Formula is alerted.
Optionally, the first threshold 90%, the second threshold are 90%, and the third threshold value is 90%.
Optionally, the range of the preset time is 1~30 minute.
The embodiment of the present application provides a kind of information acquisition device, and described device includes:
Time and address acquisition unit, for obtaining the address of preset time and target device;
Request transmitting unit, for being sent to the target device according to the address using the preset time as the period
Information inquiring request;
Information receiving unit, for receiving the resource utilisation information of the target device, the resource benefit of the target device
It is what the target device was obtained according to the information inquiring request with information.
Optionally, the resource utilisation information of the target device includes: that the central processor CPU of the target device utilizes
At least one of rate, memory usage and disk utilization.
Optionally, described device further include:
First Alarm Unit, for judging whether the cpu busy percentage of the target device is greater than or equal to first threshold, if
It is then to be alerted by first method;And/or
Second Alarm Unit, for judging whether the memory usage of the target device is greater than or equal to second threshold,
If so, being alerted by second method;And/or
Third Alarm Unit, for judge the disk of the target device be for whether be greater than or equal to third threshold value,
If so, being alerted by Third Way.
Optionally, the first threshold 90%, the second threshold are 90%, and the third threshold value is 90%.
Optionally, the range of the preset time is 1~30 minute.
The embodiment of the present application provides a kind of information acquisition method and device, obtains the ground of preset time and target device
Location, using preset time as the period, according to the address of target device to target device send information inquiring request, target device according to
Information inquiring request obtains the resource utilisation information of target device, and returns to the resource utilisation information of target device, realizes mesh
The automatic acquisition of the resource utilisation information of marking device, this information acquiring pattern efficiency with higher and accuracy.
Detailed description of the invention
In order to more clearly explain the technical solutions in the embodiments of the present application, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations as described in this application
Example, for those of ordinary skill in the art, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of information acquisition method provided by the embodiments of the present application;
Fig. 2 is a kind of structural block diagram of information acquisition device provided by the embodiments of the present application.
Specific embodiment
Inventor has found that can check the computer product during performance test of computer product
Operation whether can consume the excess resource of computer, specifically, the resource utilisation information of computer can be obtained in real time, such as
Resource utilisation information during running the resource utilisation information before the computer product and running the computer product.It calculates
Utilization rate, the memory benefit of the resource utilisation information of machine such as central processing unit (CPU) (Central Process Unit, CPU)
With rate and disk utilization etc..
However, the resource utilisation information of computer is usually obtained by manually checking, for example, can be by manually checking
Task manager obtains cpu busy percentage and memory usage, obtains disk utilization etc. by manually checking my computer.
However the special staff of the acquisition process of resource utilisation information needs is in due course and checks that various information are remembered
Record, is easy to appear mistake, therefore information acquisition efficiency and accuracy are lower.
Based on this, the embodiment of the present application provides a kind of information acquisition method and device, obtains preset time and target is set
Standby address sends information inquiring request to target device according to the address of target device, target is set using preset time as the period
The standby resource utilisation information that target device is obtained according to information inquiring request, and the resource utilisation information of target device is returned, it is real
The automatic acquisition of the resource utilisation information of target device is showed, this information acquiring pattern efficiency with higher and accuracy.
With reference to the accompanying drawing, information acquisition method and device provided by the embodiments of the present application are described in detail by embodiment
Specific implementation.
A kind of flow chart of information acquisition method provided by the embodiments of the present application is shown with reference to Fig. 1, this method can wrap
Include following steps.
S101 obtains the address of preset time and target device.
Target device is detected equipment, such as can be the computer for running product to be detected, is also possible to other
Need to obtain its resource utilisation information to understand the equipment of its operation information.
The address of target device can be address Internet protocol (Internet Protocol, IP) of target device,
It is also possible to other protocol address, the address of target device can be with the logical address of unique identification target device in the protocol.
Preset time is to obtain the period of information, and for more important target device, preset time can be shorter, that is, obtains
The frequency of information is higher, and for insignificant target device, preset time can be longer, i.e. the frequency of acquisition information is lower.In advance
If the time can according to the actual situation depending on, range can be 1 minute to 30 minutes, specifically, can be 10 minutes.
S102 sends information inquiring request to target device according to the address of target device using preset time as the period.
Information inquiring request is that the request of information is obtained to target device, and target device can be obtained according to information inquiring request
Take corresponding information to the return information.
It is understood that the executing subject of the embodiment of the present application can be target device, i.e., target device is according to itself
Address, information inquiring request is sent to oneself, to obtain itself corresponding information.
Certainly, the executing subject of the embodiment of the present application is also possible to the other equipment except processing target equipment, i.e., other
Equipment sends information inquiring request to target device, to obtain the corresponding letter of target device according to the address of target device
Breath.
S103 receives the resource utilisation information of target device.
It is understood that when the executing subject of the embodiment of the present application is target device, the utilization of resources letter of target device
In breath, including execute the occupied resource of information acquisition method provided by the embodiments of the present application.
In the embodiment of the present application, the resource utilisation information of target device may include: the cpu busy percentage of target device, interior
Deposit at least one of utilization rate and disk utilization.
Wherein, the cpu busy percentage of target device refers to the cpu resource information that the program run in target device occupies, and uses
In the information for the program for indicating to run in target device.The cpu busy percentage for obtaining target device, can be specifically, according to target
The total resources of the CPU of equipment and the resource being utilized, obtain the cpu busy percentage of target device.
The memory usage of target device refers to the memory information of the program expense run in target device.Target is obtained to set
Standby memory usage, can be specifically, obtaining target and setting according to the total capacity of the memory of target device and occupied capacity
Standby memory usage.
The disk utilization of target device refers to the utilization information for the disk connecting with target device, and disk can be firmly
Disk, read-only memory (Read-Only Memory, ROM), removable memory, network memory, pseudorandom access storage
Device and other equipment etc., other equipment are unrecognizable disk.Obtain target device disk utilization, can with specifically,
According to the total capacity of each disk and occupied capacity, each disk utilization of target device is obtained.
In the embodiment of the present application, the resource utilisation information of target device can also be analyzed, in target device
When there are the data of resource excessive use in resource utilisation information, alerted.
Specifically, may determine that whether the cpu busy percentage of target device is greater than or equal to first threshold, wherein the first threshold
Value be CPU whether the boundary of excessive use, such as can be 90%, if the determination result is YES, then illustrate that cpu busy percentage is too high,
It can be alerted at this time by first method;Also it may determine that whether the memory usage of target device is greater than or equal to the second threshold
Value, wherein second threshold be memory whether the boundary of excessive use, such as can be 90%, if the determination result is YES, then illustrate
Memory usage is too high, can be alerted at this time by second method;Can also judge target device disk utilization whether
More than or equal to third threshold value, wherein third threshold value be disk whether the boundary of excessive use, such as can be 90%, if sentencing
Disconnected result be it is yes, then illustrate that disk utilization is too high, can be alerted at this time by Third Way.
Wherein, alarm mode can be text alarm, phonic warning, warning lamp alarm etc., be text announcement in alarm mode
When alert, first method can be display " cpu busy percentage is too high ", and second method can be " memory usage is too high ", third party
Formula can be display " disk utilization is too high ", for first method, second method and the Third Way under other alarm modes,
It then no longer does and illustrates one by one.
After getting the resource utilisation information of target device, it can store resource utilisation information and obtain target device
The time of resource utilisation information checks and analyzes for subsequent.
The embodiment of the present application provides a kind of information acquisition method, the address of preset time and target device is obtained, with pre-
If the time is the period, information inquiring request is sent to target device according to the address of target device, target device is looked into according to information
The resource utilisation information of request target device is ask, and returns to the resource utilisation information of target device, realizes target device
Resource utilisation information automatic acquisition, this information acquiring pattern efficiency with higher and accuracy.
Based on information above acquisition methods, the embodiment of the present application also provides a kind of information acquisition devices, with reference to Fig. 2 institute
Show, be a kind of structural block diagram of information acquisition device provided by the embodiments of the present application, which includes:
Time and address acquisition unit 110, for obtaining the address of preset time and target device;
Request transmitting unit 120, for being sent out to the target device according to the address using the preset time as the period
Send information inquiring request;
Information receiving unit 130, for receiving the resource utilisation information of the target device, the resource of the target device
It is what the target device was obtained according to the information inquiring request using information.
Optionally, the resource utilisation information of the target device includes: that the central processor CPU of the target device utilizes
At least one of rate, memory usage and disk utilization.
Optionally, described device further include:
First Alarm Unit, for judging whether the cpu busy percentage of the target device is greater than or equal to first threshold, if
It is then to be alerted by first method;And/or
Second Alarm Unit, for judging whether the memory usage of the target device is greater than or equal to second threshold,
If so, being alerted by second method;And/or
Third Alarm Unit, for judge the disk of the target device be for whether be greater than or equal to third threshold value,
If so, being alerted by Third Way.
Optionally, the first threshold 90%, the second threshold are 90%, and the third threshold value is 90%.
Optionally, the range of the preset time is 1~30 minute.
The embodiment of the present application provides a kind of information acquisition device, the address of preset time and target device is obtained, with pre-
If the time is the period, information inquiring request is sent to target device according to the address of target device, target device is looked into according to information
The resource utilisation information of request target device is ask, and returns to the resource utilisation information of target device, realizes target device
Resource utilisation information automatic acquisition, this information acquiring pattern efficiency with higher and accuracy.
" first " in the titles such as " first ... " mentioned in the embodiment of the present application, " first ... " is used only to do name
Word mark, does not represent first sequentially.The rule is equally applicable to " second " etc..
As seen through the above description of the embodiments, those skilled in the art can be understood that above-mentioned implementation
All or part of the steps in example method can add the mode of general hardware platform to realize by software.Based on this understanding,
The technical solution of the application can be embodied in the form of software products, which can store is situated between in storage
In matter, such as read-only memory (English: read-only memory, ROM)/RAM, magnetic disk, CD etc., including some instructions to
So that a computer equipment (can be the network communication equipments such as personal computer, server, or router) executes
Method described in certain parts of each embodiment of the application or embodiment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality
For applying example and apparatus embodiments, since it is substantially similar to system embodiment, so describe fairly simple, related place ginseng
See the part explanation of system embodiment.Equipment and system embodiment described above is only schematical, wherein making
It may or may not be physically separated for the module of separate part description, the component shown as module can be
Or it may not be physical module, it can it is in one place, or may be distributed over multiple network units.It can be with
Some or all of the modules therein is selected to achieve the purpose of the solution of this embodiment according to the actual needs.The common skill in this field
Art personnel can understand and implement without creative efforts.
The above is only the preferred embodiment of the application, is not intended to limit the protection scope of the application.It should refer to
Out, for those skilled in the art, it under the premise of not departing from the application, can also make several improvements
And retouching, these improvements and modifications also should be regarded as the protection scope of the application.
Claims (10)
1. a kind of information acquisition method, which is characterized in that the described method includes:
Obtain the address of preset time and target device;
Using the preset time as the period, information inquiring request is sent to the target device according to the address;
The resource utilisation information of the target device is received, the resource utilisation information of the target device is the target device root
It is obtained according to the information inquiring request.
2. the method according to claim 1, wherein the resource utilisation information of the target device includes: described
Central processor CPU utilization rate, at least one of memory usage and disk utilization of target device.
3. according to the method described in claim 2, it is characterized in that, the method also includes:
Judge whether the cpu busy percentage of the target device is greater than or equal to first threshold, if so, carrying out by first method
Alarm;And/or
Judge whether the memory usage of the target device is greater than or equal to second threshold, if so, by second method into
Row alarm;And/or
Judge the target device disk be for whether be greater than or equal to third threshold value, if so, by Third Way into
Row alarm.
4. according to the method described in claim 3, the second threshold is 90% it is characterized in that, the first threshold 90%,
The third threshold value is 90%.
5. according to claim 1 to method described in 4, which is characterized in that the range of the preset time is 1~30 minute.
6. a kind of information acquisition device, which is characterized in that described device includes:
Time and address acquisition unit, for obtaining the address of preset time and target device;
Request transmitting unit, for sending information to the target device according to the address using the preset time as the period
Inquiry request;
Information receiving unit, for receiving the resource utilisation information of the target device, the utilization of resources letter of the target device
Breath is what the target device was obtained according to the information inquiring request.
7. device according to claim 6, which is characterized in that the resource utilisation information of the target device includes: described
Central processor CPU utilization rate, at least one of memory usage and disk utilization of target device.
8. device according to claim 7, which is characterized in that described device further include:
First Alarm Unit, for judging whether the cpu busy percentage of the target device is greater than or equal to first threshold, if so,
Then alerted by first method;And/or
Second Alarm Unit, for judging whether the memory usage of the target device is greater than or equal to second threshold, if so,
Then alerted by second method;And/or
Third Alarm Unit, for judge the disk of the target device be for whether be greater than or equal to third threshold value, if so,
Then alerted by Third Way.
9. device according to claim 8, which is characterized in that the first threshold 90%, the second threshold are 90%,
The third threshold value is 90%.
10. the device according to claim 6 to 9, which is characterized in that the range of the preset time is 1~30 minute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811076563.3A CN109271305A (en) | 2018-09-14 | 2018-09-14 | A kind of information acquisition method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811076563.3A CN109271305A (en) | 2018-09-14 | 2018-09-14 | A kind of information acquisition method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109271305A true CN109271305A (en) | 2019-01-25 |
Family
ID=65189198
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811076563.3A Pending CN109271305A (en) | 2018-09-14 | 2018-09-14 | A kind of information acquisition method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109271305A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070078960A1 (en) * | 2005-10-04 | 2007-04-05 | International Business Machines Corporation | Grid computing accounting and statistics management system |
CN105141646A (en) * | 2014-05-30 | 2015-12-09 | 北京金山网络科技有限公司 | Node server in server cluster, resource acquisition method thereof, resource provision method thereof, and management server |
CN107786681A (en) * | 2016-08-31 | 2018-03-09 | 中国电信股份有限公司 | Methods, devices and systems for IP address scheduling of resource |
-
2018
- 2018-09-14 CN CN201811076563.3A patent/CN109271305A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070078960A1 (en) * | 2005-10-04 | 2007-04-05 | International Business Machines Corporation | Grid computing accounting and statistics management system |
CN105141646A (en) * | 2014-05-30 | 2015-12-09 | 北京金山网络科技有限公司 | Node server in server cluster, resource acquisition method thereof, resource provision method thereof, and management server |
CN107786681A (en) * | 2016-08-31 | 2018-03-09 | 中国电信股份有限公司 | Methods, devices and systems for IP address scheduling of resource |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110489391B (en) | Data processing method and related equipment | |
US11177999B2 (en) | Correlating computing network events | |
CN106027328B (en) | Cluster monitoring method and system based on application container deployment | |
CN110232010A (en) | A kind of alarm method, alarm server and monitoring server | |
CN101707632A (en) | Method for dynamically monitoring performance of server cluster and alarming real-timely | |
CN108932184A (en) | monitoring device and method | |
CN108880943A (en) | A kind of monitoring system of isomery cloud platform | |
CN110784377A (en) | Method for uniformly managing cloud monitoring data in multi-cloud environment | |
CN111353136B (en) | Method and device for processing operation request | |
CN111478792B (en) | Cutover information processing method, system and device | |
CN104883705B (en) | A kind of the problem of data service is complained localization method and device | |
US20210132933A1 (en) | Proactive Storage System-Based Software Version Analysis Using Machine Learning Techniques | |
CN111930653B (en) | Remote distribution use method and device of USB (universal serial bus) equipment | |
CN114070755B (en) | Virtual machine network flow determination method and device, electronic equipment and storage medium | |
CN114363334A (en) | Network configuration method, device and equipment for cloud system and cloud desktop virtual machine | |
CN110134578B (en) | Data processing method and device | |
CN109271305A (en) | A kind of information acquisition method and device | |
CN106487591A (en) | A kind of server automatic get-on carriage statistic device and its system | |
CN110661660A (en) | Alarm information root analysis method and device | |
CN114371980A (en) | Call link performance monitoring method and device, computer equipment and storage medium | |
CN112631996A (en) | Log searching method and device | |
CN114079623B (en) | Method and device for identifying transmission capacity of user side router | |
CN110430093B (en) | Data processing method and device and computer readable storage medium | |
CN111131351A (en) | Method and device for confirming model of Internet of things equipment | |
CN108460126A (en) | A kind of acquisition methods and device of the daily record of equipment cabinet server unit of memory allocation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190125 |