CN105357026B - A kind of resource information collection method and calculate node - Google Patents
A kind of resource information collection method and calculate node Download PDFInfo
- Publication number
- CN105357026B CN105357026B CN201510615267.6A CN201510615267A CN105357026B CN 105357026 B CN105357026 B CN 105357026B CN 201510615267 A CN201510615267 A CN 201510615267A CN 105357026 B CN105357026 B CN 105357026B
- Authority
- CN
- China
- Prior art keywords
- resource information
- calculate node
- current
- node
- time
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0668—Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/10—Current supply arrangements
Abstract
The embodiment of the invention discloses a kind of resource information collection method and calculate node, this method can include: calculate node collects the Current resource information of the calculate node;The calculate node judges whether the Current resource information meets the preset condition of preset active reporting resource information;If the Current resource information meets the preset condition of the preset active reporting resource information, the calculate node reports the Current resource information to the host node of the affiliated cluster of the calculate node.It can reduce when resource is collected to transmission resource consumption.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of resource information collection methods and calculate node.
Background technique
In today of information explosion, cloud computing, big data processing all play vital effect in every field,
Such as: it is all widely used in fields such as industry, medical treatment, transport and communications, and continuous fast-developing.And it is produced with daily
Raw data are more and more, need processed information content also increasing therewith, and the processing speed of information is largely
Dependent on the service efficiency to resource.In addition, under large-scale data center, cluster if can more improve resource makes
With rate, the important directions that the wasting of resources is many technical research, industrial development are reduced.Currently, in order to improve resource utilization institute
The technology used mainly scheduling of resource (Distributed Resource Scheduler, DRS) and distributed electrical in a distributed manner
Source control (Distributed Power Management, DPM) technology is representative.Wherein, resource is collected as raising resource
The algorithm and model of utilization rate provides the source data output on basis, and when improving resource utilization, resource collection is crucial and basis
The step of.Resource collects the host node timing in mainly cluster with calculate node interaction, to obtain each calculate node at present
Resource information.However, when resource information in the technology due to collecting calculate node every time, being all host node timing is saved to calculating
Point sends acquisition request, and calculate node responds the acquisition request again to report resource information to host node, it is seen then that resource is received at present
It is very big to transmission resource consumption when collection.
Summary of the invention
The embodiment of the invention provides a kind of resource information collection method and calculate nodes, it is possible to reduce resource collect when pair
Transmission resource consumption.
In a first aspect, the embodiment of the present invention provides a kind of resource information collection method, comprising:
Calculate node collects the Current resource information of the calculate node;
The calculate node judges whether the Current resource information meets the default of preset active reporting resource information
Condition;
If the Current resource information meets the preset condition of the preset active reporting resource information, the calculating
Node reports the Current resource information to the host node of the affiliated cluster of the calculate node.
In the first possible implementation of the first aspect, the method also includes:
The calculate node obtains the last resource information reported, wherein it is the calculating section that the last time, which reports,
It is called time in the resource information that was reported to the host node of point from once reporting the latest;
The calculate node judges whether the Current resource information meets the default of preset active reporting resource information
Condition, comprising:
The calculate node judges the variation for the resource information that the Current resource information was reported relative to the last time
Whether the variable condition of preset triggering active reporting resource information is met.
The possible implementation of with reference to first aspect the first, in the possible implementation of second of first aspect,
The calculate node judges whether the variation for the resource information that the Current resource information was reported relative to the last time meets
The variable condition of preset triggering active reporting resource information, comprising:
The calculate node calculates the stock number that the resource information that the last time reports indicates and the Current resource is believed
The difference in change of the stock number indicated is ceased, and judges whether the difference in change is greater than the pre- of preset triggering active reporting resource information
If changing upper limit threshold.
The possible implementation of with reference to first aspect the first, in the third possible implementation of first aspect,
The method also includes:
The calculate node calculates the difference in change of the resource information that the last time reports and the Current resource information, and
Judge whether the difference in change is greater than default variation lower threshold, if so, the resource for being used to count the calculate node is believed
Breath reports score to increase N, wherein the N is the real number greater than zero;
The calculate node judges the variation for the resource information that the Current resource information was reported relative to the last time
Whether the variable condition of preset triggering active reporting resource information is met, comprising:
Report whether the current value of score is greater than preset triggering active reporting resource letter described in the calculate node judgement
The default of breath reports threshold value.
With reference to first aspect, in the 4th kind of possible implementation of first aspect, the method also includes:
The calculate node obtain it is last report on call time, wherein it is that calculatings saves that the last time, which reports,
It is called time in the resource information that was reported to the host node of point from once reporting the latest;
The calculate node judges whether the Current resource information meets the default of preset active reporting resource information
Condition, comprising:
What the current acquisition time of the calculate node judgement acquisition Current resource information and the last time reported
On time difference for calling time whether be greater than the time threshold of preset triggering active reporting resource information.
Any of the above-described kind of possible implementation with reference to first aspect, the 5th kind of possible implementation of first aspect
In, the method also includes:
The calculate node receives the Web Service request that the host node is sent;
The calculate node responds the Web Service request, to report the Current resource to believe to the host node
Breath.
Second aspect, the embodiment of the present invention provide a kind of calculate node, comprising: collector unit, judging unit and upper declaration form
Member, in which:
The collector unit, for collecting the Current resource information of the calculate node;
The judging unit, for judging whether the Current resource information meets preset active reporting resource information
Preset condition;
The reporting unit, if judging that the Current resource information meets the preset active for the judging unit
When reporting the preset condition of resource information, the host node of the affiliated cluster of Xiang Suoshu calculate node reports the Current resource information.
In the first possible implementation of the second aspect, the calculate node further include:
First acquisition unit, for obtaining the last resource information reported, wherein it is the meter that the last time, which reports,
Call time in the resource information that operator node was reported to the host node from the latest once report;
The judging unit is used to judge the resource information that the Current resource information was reported relative to the last time
Whether variation meets the variable condition of preset triggering active reporting resource information.
In conjunction with the first possible implementation of second aspect, in second of possible implementation of second aspect
In, the judging unit is used to calculate the stock number and the Current resource information that the resource information that the last time reports indicates
The difference in change of the stock number of expression, and judge whether the difference in change is greater than the default of preset triggering active reporting resource information
Change upper limit threshold.
In conjunction with the first possible implementation of second aspect, in the third possible implementation of second aspect
In, the calculate node further include:
Adding unit, for calculating the difference in change of resource information and the Current resource information that the last time reports,
And judge whether the difference in change is greater than default variation lower threshold, if so, the resource that will be used to count the calculate node
Information reports score to increase N, wherein the N is the real number greater than zero;
The judging unit reports whether the current value of score is greater than preset triggering active reporting money described in being used to judge
The default of source information reports threshold value.
In conjunction with second aspect, in the fourth possible implementation of the second aspect, the calculate node further include:
Second acquisition unit, for obtain it is last report on call time, wherein it is the meter that the last time, which reports,
Call time in the resource information that operator node was reported to the host node from the latest once report;
The judging unit be used to judge acquire the Current resource information current acquisition time and the last time
Whether the time difference called time on report is greater than the time threshold of preset triggering active reporting resource information.
In conjunction with any of the above-described kind of possible implementation of second aspect, in the 5th kind of possible realization side of second aspect
In formula, the calculate node further include:
Receiving unit, the Web Service request sent for receiving the host node;
The reporting unit is also used to respond the Web Service request, described current to report to the host node
Resource information.
In above-mentioned technical proposal, calculate node collects the Current resource information of the calculate node;The calculate node is sentenced
Whether the Current resource information of breaking meets the preset condition of preset active reporting resource information;If the Current resource information
When meeting the preset condition of the preset active reporting resource information, the calculate node is to the affiliated cluster of the calculate node
Host node report the Current resource information.The calculate node actively message resource information on host node may be implemented in this way,
So as to reduce when resource is collected to transmission resource consumption.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is that the embodiment of the present invention provides the applicable system architecture diagram of resource information collection method;
Fig. 2 is a kind of flow diagram of resource information collection method provided in an embodiment of the present invention;
Fig. 3 is the flow diagram of another resource information collection method provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of cluster provided in an embodiment of the present invention;
Fig. 5 is the flow diagram of another resource information collection method provided in an embodiment of the present invention;
Fig. 6 is the flow diagram of another resource information collection method provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of calculate node provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of another calculate node provided in an embodiment of the present invention;
Fig. 9 is the structural schematic diagram of another calculate node provided in an embodiment of the present invention;
Figure 10 is the structural schematic diagram of another calculate node provided in an embodiment of the present invention;
Figure 11 is the structural schematic diagram of another calculate node provided in an embodiment of the present invention;
Figure 12 is the structural schematic diagram of another calculate node provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Referring to Fig. 1, Fig. 1 is that the embodiment of the present invention provides the applicable system architecture diagram of resource information collection method, such as
Shown in Fig. 1, which may include host node 11 and several calculate nodes 12, wherein host node 11 can be understood as pipe again
It manages node (Management Node), in addition, host node 11 and several calculate nodes 12 constitute a cluster, such as: it is virtual
Machine cluster.In host node 11 and calculate node 12 can it is some or all of be virtual machine, and these virtual machines can be deployed in
In one or more host.Certainly, host node 11 and calculate node 12 are also possible to independent host equipment.In above-mentioned framework
Host node 11 collects the resource information of each calculate node, so that host node 11 can be believed according to the resource of each calculate node 12
It ceases and DRS or DPM is carried out to the resource of entire cluster, to improve resource utilization.
Figure is please referred to, Fig. 2 is a kind of flow diagram of resource information collection method provided in an embodiment of the present invention, is such as schemed
Shown in 2, comprising the following steps:
201, calculate node collects the Current resource information of the calculate node.
Calculate node can be that the local resource of deployment collects the current money that thread receives calculate node by calculate node
Source information, such as: at least one of following resource information:
Free time (idle) resource situation of current CPU or the available resources for being interpreted as CPU;
Currently available memory situation;
The number of currently stored input and output (Input Output, IO);
The number of current network IO.
Wherein, to may include that memory is current per second be written and read (Input Output to the number of above-mentioned storage IO
Operations Per Second, IOPS) operation number, i.e., the sum of read operation per second and the number of write operation.Above-mentioned network
The number of IO may include network transmission packet number per second (Packets Per Second PPS).
202, calculate node judges whether the Current resource information meets the default of preset active reporting resource information
Condition, if so, 203 are thened follow the steps, if it is not, can then terminate process.
Wherein, this upper preset condition is to preset to trigger calculate node and actively report resource information to host node
Condition, such as: when the resource information variation of calculate node is more than a certain upper limit value, then calculate node meets above-mentioned preset condition;
Or the resource information acquisition time of calculate node and the last time reported when being more than specific time threshold value, then calculate node
Meet above-mentioned preset condition etc..
203, calculate node reports the Current resource information to the host node of the affiliated cluster of the calculate node.
Calculate node may be implemented through the above steps and actively report resource information to host node, without host node
Resource acquisition request is sent to calculate node, so as to reduce when resource is collected to transmission resource consumption.In addition, when being deployed in
When business stable operation inside calculate node, the consumption of resource should be whithin a period of time it is uniform, variation less, institute
Host caused by periodically reporting and network overhead can be reduced in a manner of through this active reporting, avoided unnecessary heavy
Multiple message transmission, while cluster master control node resource can also be reduced and collected and scheduling decision load.And it can avoid master control node
After malfunction and failure, decision can not be provided in the cluster resource scheduling interior for the previous period for completing a new history data collection and is built
View.
In the present embodiment, above-mentioned calculate node can be the virtual machine in virtual cluster, certainly, above-mentioned calculate node
It can be the physical computer in computer cluster.
In the present embodiment, calculate node collects the Current resource information of the calculate node;The calculate node judges institute
State the preset condition whether Current resource information meets preset active reporting resource information;If the Current resource information meets
When the preset condition of the preset active reporting resource information, master of the calculate node to the affiliated cluster of the calculate node
Node reports the Current resource information.The calculate node actively message resource information on host node may be implemented in this way, thus
It can reduce when resource is collected to transmission resource consumption.
Referring to Fig. 3, Fig. 3 is the flow diagram of another resource information collection method provided in an embodiment of the present invention,
As shown in Figure 3, comprising the following steps:
301, calculate node collects the Current resource information of the calculate node.
There can be a local resource to collect thread in the present embodiment, in calculate node, which is to be timed triggering, timing
Time is defaulted as 5 seconds or 3 seconds etc., and particular user can modify default configuration according to oneself business actual conditions.The resource is received
Collection thread can collect the idling-resource situation of current CPU, currently available memory situation, the number of currently stored IO and current
At least one of in the number of network I/O.Such as: as shown in figure 4, may include cpu monitor module, memory prison in calculate node
Control module stores IO monitoring module, network I/O monitoring module and reports decision-making module, and such resource is collected thread and can be called
Cpu monitor module, internal memory monitoring module, storage IO monitoring module, network I/O monitoring module successively collect the idle money of current CPU
Source situation, currently available memory situation, the number of currently stored IO and current network IO number.The resource of collection is believed again
Breath is transferred to and reports decision-making module, from reporting whether decision-making module decision to host node reports resource information.Wherein, decision here
Step 302 can specifically be referred to.In addition, above-mentioned host node can also include resource snapshot request module, host node passes through the mould
Block can report resource information with activly request calculate node, such as: activly request calculate node reports after host node breaks down
Resource information.In addition, the mode that calculate node can be resource snapshot reports resource information to host node in the present embodiment.
302, calculate node judges whether the Current resource information meets the default of preset active reporting resource information
Condition, if so, 303 are thened follow the steps, if it is not, can then terminate process.
In the present embodiment, the above method can also include the following steps:
Calculate node obtains the last resource information reported, wherein the last time reports be the calculate node to
Call time in the resource information that the host node reported from the latest once report;
Step 302 may include:
Calculate node judge the resource information that the Current resource information was reported relative to the last time variation whether
Meet the variable condition of preset triggering active reporting resource information.
In the embodiment, calculate node can recorde the last resource information reported, such as: calculate node is every to master
When node reports first resource information, calculate node is just recorded.Certainly, record here is also possible to timely update,
Such as: only record nearest 2 times or 5 resource informations reported.
Step 302 can be compared according to the resource information that Current resource information is reported with the last time in this way, when logical
It crosses it was found that when Current resource information and the last resource information reported change bigger, so that it may actively go up on host node
Report Current resource information.
Such as: above-mentioned calculate node judges the resource information that the Current resource information was reported relative to the last time
Whether variation meets the step of variable condition of preset triggering active reporting resource information, may include:
Calculate node calculates the stock number and the Current resource information table that the resource information that the last time reports indicates
The difference in change for the stock number shown, and judge whether the difference in change is greater than the default change of preset triggering active reporting resource information
Change upper limit threshold.
Wherein, above-mentioned stock number may include the idling-resource situation, available memory situation, the number for storing IO of CPU
With at least one in the number of network I/O.Above-mentioned judgement can be the idling-resource situation of CPU, available memory situation, deposit
It stores up the corresponding difference in change of any one of the number of IO and the number of network I/O and is greater than preset triggering active reporting resource information
Default variation upper limit threshold, so that it may triggering actively to host node reports Current resource information.Such as: meet following any
, so that it may triggering actively reports Current resource information to host node:
Calculate node judge the CPU usage of the CPU usage that the last time reports and current point in time difference whether
Change upper limit threshold greater than preset CPU;Or
Calculate node judges that the difference of the memory usage of the memory usage that the last time reports and current point in time is
It is no to be greater than preset memory variation upper limit threshold;Or
Calculate node judges storage IO times of storage IO number of input and output and current point in time that the last time reports
Whether the difference of number is greater than preset memory variation upper limit threshold;Or
Calculate node judges that the difference of the network I/O number for the network I/O number and current point in time that the last time reports is
It is no to be greater than preset memory variation upper limit threshold.
May be implemented only to need to meet above-mentioned any one in this way can report Current resource information to host node.Separately
Outside, the Current resource information reported here can also be the resource information only reported greater than upper limit threshold, such as: only CPU
Utilization rate and the difference of CPU usage of current point in time when being greater than preset CPU variation upper limit threshold, and other stock number
When not meeting above-mentioned condition, so that it may only report CPU usage to host node, report information to reduce.
It is of course also possible to be reported as long as meeting as long as one therein acquisition to all resource informations.Such as: such as Fig. 5
Shown, the above method may include steps of:
1) timer expiry triggers.I.e. step triggering resource information is collected.
2) difference of the CPU usage of the last CPU usage and current point in time reported is calculated;
3) difference of the memory usage of the last memory usage and current point in time reported is calculated;
4) difference of the IO number of storage of the last IO number of storage and current point in time reported is calculated;
5) difference of the IO number of storage of last storage IO number of input and output and current point in time reported is calculated;
6) it is pre- to judge whether the difference of the CPU usage for the CPU usage and current point in time that the last time reports is greater than
If CPU change upper limit threshold, if so, thening follow the steps 10), if it is not, thening follow the steps 7);
7) judge whether the difference of the memory usage for the memory usage and current point in time that the last time reports is greater than
Preset memory changes upper limit threshold, if so, thening follow the steps 10), if it is not, thening follow the steps 8);
8) judge whether the difference of the IO number of storage for the IO number of storage and current point in time that the last time reports is greater than
Preset memory changes upper limit threshold, if so, thening follow the steps 10), if it is not, thening follow the steps 9);
9) judge whether the difference of the network I/O number for the network I/O number and current point in time that the last time reports is greater than
Preset memory changes upper limit threshold, if so, thening follow the steps 10), if it is not, then terminating process).
10) Current resource information is reported to host node.
In the present embodiment, the above method can also include the following steps:
Calculate node calculates the difference in change of the resource information that the last time reports and the Current resource information, and judges
Whether the difference in change is greater than default variation lower threshold, if so, by the resource information for being used to count the calculate node
Score is reported to increase N, wherein the N is the real number greater than zero.
In the embodiment, a score can be configured for each stock number in advance, score is specific first there are one
Initial value, such as: 0 or 50 etc., often it can add N more than primary default variation lower threshold, such as: add 1 point or plus 5 points
Deng.
In the embodiment, above-mentioned calculate node judges the money that the Current resource information is reported relative to the last time
Whether the variation of source information meets the step of variable condition of preset triggering active reporting resource information, may include:
Report whether the current value of score is greater than preset triggering active reporting resource letter described in the calculate node judgement
The default of breath reports threshold value.
In the embodiment, it may be implemented to decide whether active reporting resource information according to the marking of Current resource information.
Such as: as shown in fig. 6, the above method may include steps of:
1) timer expiry triggers.I.e. step triggering resource information is collected.
2) difference of the CPU usage of the last CPU usage and current point in time reported is calculated;
3) difference of the memory usage of the last memory usage and current point in time reported is calculated;
4) difference of the IO number of storage of last storage IO number of input and output and current point in time reported is calculated;
5) difference of the IO number of storage of last storage IO number of input and output and current point in time reported is calculated;
6) it is pre- to judge whether the difference of the CPU usage for the CPU usage and current point in time that the last time reports is greater than
If CPU change lower threshold, if so, thening follow the steps 7), if it is not, thening follow the steps 8);
7) score of CPU usage is added into N;
8) judge whether the difference of the memory usage for the memory usage and current point in time that the last time reports is greater than
Preset memory changes upper limit threshold, if so, thening follow the steps 9), if it is not, thening follow the steps 10);
9) score of memory usage is added into N;
10) judge whether the difference of the IO number of storage for the IO number of storage and current point in time that the last time reports is greater than
Preset memory changes upper limit threshold, if so, thening follow the steps 11), if it is not, thening follow the steps 12);
11) score for storing IO number is added into N;
12) judge whether the difference of the network I/O number for the network I/O number and current point in time that the last time reports is greater than
Preset memory changes upper limit threshold, if so, thening follow the steps 13), if it is not, then terminating process.
13) score of network I/O number is added into N;
14) judge it is above-mentioned it is multinomial in it is no there are the score of any one be more than it is default report threshold value, if so, thening follow the steps
15), if it is not, then terminating process.
15) Current resource information is reported to host node.
In the present embodiment, the above method can also include the following steps:
Calculate node obtain it is last report on call time, wherein the last time reports be the calculate node to
Call time in the resource information that the host node reported from the latest once report;
Step 302 may include:
What the current acquisition time of the calculate node judgement acquisition Current resource information and the last time reported reports
Whether the time difference of time is greater than the time threshold of preset triggering active reporting resource information.
In the embodiment, it may be implemented to report resource to host node with the last calculate node when discovery current time
When the time interval of information is more than time threshold (delta_t) of setting, then sent in calculate node most to host node immediately
New resource statistics information.
303, calculate node reports the Current resource information to the host node of the affiliated cluster of the calculate node.
In the present embodiment, the above method can also include the following steps:
304, calculate node receives the Web Service request that the host node is sent;
After calculate node receives the request of above-mentioned Web Service, so that it may execute step 303, i.e. step 303 can be with
Include:
Calculate node responds the Web Service request, to report the Current resource information to the host node.
In the embodiment, it may be considered that after host node is surprisingly restarted, in the time that first resource collects
Without the resource statistics information of each calculate node in section, its normal DRS decision may be will affect, work as host node so increasing
After starting, one resource updates of active transmission are requested to calculate node, after calculate node receives, send respectively newest money immediately
In the statistical information to host node of source.After can avoid host node malfunction and failure, in the last period for completing a new history data collection
Cluster resource scheduling can not provide decision recommendation in time.
In the present embodiment, the embodiment of plurality of optional is increased on the basis of embodiment shown in Fig. 2, and is ok
It reduces when resource is collected to transmission resource consumption.
The following is an embodiment of the apparatus of the present invention, and apparatus of the present invention embodiment is for executing embodiment of the present invention method one to two
The method of realization, for ease of description, only parts related to embodiments of the present invention are shown, and particular technique details does not disclose
, please refer to the embodiment of the present invention one and embodiment two.
Referring to Fig. 7, Fig. 7 is a kind of structural schematic diagram of calculate node provided in an embodiment of the present invention, as shown in fig. 7,
It include: collector unit 71, judging unit 72 and reporting unit 73, in which:
Collector unit 71, for collecting the Current resource information of the calculate node;
Judging unit 72, for judging whether the Current resource information meets the pre- of preset active reporting resource information
If condition;
The reporting unit 73, if judging that the Current resource information meets the preset master for the judging unit
Dynamic when reporting the preset condition of resource information, the host node of the affiliated cluster of Xiang Suoshu calculate node reports the Current resource to believe
Breath.
In the present embodiment, as shown in figure 8, calculate node can also include:
First acquisition unit 74, for obtaining the last resource information reported, wherein it is described that the last time, which reports,
Call time in the resource information that calculate node was reported to the host node from the latest once report;
Judging unit 72 can be used for judging the resource information that the Current resource information is reported relative to the last time
Variation whether meet it is preset triggering active reporting resource information variable condition.
In the present embodiment, judging unit 72 can be used for calculating the stock number that the resource information that the last time reports indicates
The difference in change of the stock number indicated with the Current resource information, and judge whether the difference in change is greater than preset triggering actively
Report the default variation upper limit threshold of resource information.
In the present embodiment, as shown in figure 9, calculate node can also include:
Change computing unit 75, for calculating the change of resource information and the Current resource information that the last time reports
It is poor to change, and judges whether the difference in change is greater than default variation lower threshold, if so, the calculate node will be used to count
Resource information reports score to increase N, wherein the N is the real number greater than zero;
Judging unit 72 reports whether the current value of score is greater than preset triggering active reporting described in can be used for judging
The default of resource information reports threshold value.
In the present embodiment, as shown in Figure 10, calculate node can also include:
Second acquisition unit 76, for obtain it is last report on call time, wherein it is described that the last time, which reports,
Call time in the resource information that calculate node was reported to the host node from the latest once report;
Judging unit 72 can be used for judging acquiring the Current resource information current acquisition time and the last time
Whether the time difference called time on reporting is greater than the time threshold of preset triggering active reporting resource information.
In the present embodiment, as shown in figure 11, calculate node can also include:
Receiving unit 77, the Web Service request sent for receiving the host node;
Reporting unit 73 can be also used for responding the Web Service request, to report described work as to the host node
Preceding resource information.
In the present embodiment, calculate node collects the Current resource information of the calculate node;The calculate node judges institute
State the preset condition whether Current resource information meets preset active reporting resource information;If the Current resource information meets
When the preset condition of the preset active reporting resource information, master of the calculate node to the affiliated cluster of the calculate node
Node reports the Current resource information.The calculate node actively message resource information on host node may be implemented in this way, thus
It can reduce when resource is collected to transmission resource consumption.
Figure 12 is please referred to, Figure 12 is the structural schematic diagram of another calculate node provided in an embodiment of the present invention, such as Figure 12
It is shown, comprising: processor 121, network interface 122, memory 123 and communication bus 124, wherein the communication bus 124 is used
The connection communication between the realization processor 121, network interface 122 and memory 123, the processor 121 execute described
The program stored in memory 123 is for realizing following methods:
Collect the Current resource information of the calculate node;
Judge whether the Current resource information meets the preset condition of preset active reporting resource information;
If the Current resource information meets the preset condition of the preset active reporting resource information, to the meter
The host node of the affiliated cluster of operator node reports the Current resource information.
In the present embodiment, the program that processor 121 executes can also include:
The calculate node obtains the last resource information reported, wherein it is the calculating section that the last time, which reports,
It is called time in the resource information that was reported to the host node of point from once reporting the latest;
What processor 121 executed judges whether the Current resource information meets the pre- of preset active reporting resource information
If the program of condition, may include:
It is default to judge whether the variation for the resource information that the Current resource information was reported relative to the last time meets
Triggering active reporting resource information variable condition.
In the present embodiment, what processor 121 executed judges what the Current resource information was reported relative to the last time
Whether the variation of resource information meets the program of the variable condition of preset triggering active reporting resource information, may include:
Calculate the stock number that the resource information that the last time reports indicates and the resource that the Current resource information indicates
The difference in change of amount, and judge whether the difference in change is greater than the default variation upper limit threshold of preset triggering active reporting resource information
Value.
In the present embodiment, the program that processor 121 executes can also include:
The difference in change of resource information and the Current resource information that the last time reports is calculated, and judges the variation
Whether difference is greater than default variation lower threshold, if so, the resource information for being used to count the calculate node is reported score
Increase N, wherein the N is the real number greater than zero;
What processor 121 executed judges the change for the resource information that the Current resource information was reported relative to the last time
The program for whether meeting the variable condition of preset triggering active reporting resource information changed, may include:
It reports the current value of score whether to be greater than preset triggering the default of active reporting resource information described in judgement to report
Threshold value.
In the present embodiment, the program that processor 121 executes can also include:
Obtain it is last report on call time, wherein it is the calculate node to the main section that the last time, which reports,
It is called time in the resource information that reported of point from once reporting the latest;
What processor 121 executed judges whether the Current resource information meets the pre- of preset active reporting resource information
If the program of condition, may include:
Judgement acquire the current acquisition time of the Current resource information and call time on the last time reports when
Between difference whether be greater than it is preset triggering active reporting resource information time threshold.
In the present embodiment, the program that processor 121 executes can also include:
Receive the Web Service request that the host node is sent;
The Web Service request is responded, to report the Current resource information to the host node.
In the present embodiment, calculate node collects the Current resource information of the calculate node;The calculate node judges institute
State the preset condition whether Current resource information meets preset active reporting resource information;If the Current resource information meets
When the preset condition of the preset active reporting resource information, master of the calculate node to the affiliated cluster of the calculate node
Node reports the Current resource information.The calculate node actively message resource information on host node may be implemented in this way, thus
It can reduce when resource is collected to transmission resource consumption.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a computer-readable storage medium
In, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, the storage medium can be magnetic
Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access
Memory, abbreviation RAM) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly
It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.
Claims (6)
1. a kind of resource information collection method characterized by comprising
Calculate node collects the Current resource information of the calculate node;
The calculate node judges whether the Current resource information meets the preset condition of preset active reporting resource information;
If the Current resource information meets the preset condition of the preset active reporting resource information, the calculate node
The Current resource information is reported to the host node of the affiliated cluster of the calculate node;
The method also includes:
The calculate node obtains the last resource information reported, wherein the last time reports be the calculate node to
Call time in the resource information that the host node reported from the latest once report;
The calculate node judges whether the Current resource information meets the preset condition of preset active reporting resource information,
Include:
The calculate node calculates the stock number and the Current resource information table that the resource information that the last time reports indicates
The difference in change for the stock number shown, and judge whether the difference in change is greater than the default change of preset triggering active reporting resource information
Change upper limit threshold;
The calculate node calculates the difference in change of the resource information that the last time reports and the Current resource information, and judges
Whether the difference in change is greater than default variation lower threshold, if so, by the resource information for being used to count the calculate node
Score is reported to increase N, wherein the N is the real number greater than zero;The current value of score is reported described in the calculate node judgement is
It is no to report threshold value greater than preset triggering the default of active reporting resource information.
2. the method as described in claim 1, which is characterized in that the method also includes:
The calculate node obtain it is last report on call time, wherein the last time reports be the calculate node to
Call time in the resource information that the host node reported from the latest once report;
The calculate node judges whether the Current resource information meets the preset condition of preset active reporting resource information,
Include:
What the current acquisition time of the calculate node judgement acquisition Current resource information and the last time reported reports
Whether the time difference of time is greater than the time threshold of preset triggering active reporting resource information.
3. method according to claim 1 or 2, which is characterized in that the method also includes:
The calculate node receives the Web Service request that the host node is sent;
The calculate node responds the Web Service request, to report the Current resource information to the host node.
4. a kind of calculate node characterized by comprising collector unit, judging unit and reporting unit, in which:
The collector unit, for collecting the Current resource information of the calculate node;
The judging unit, for judging whether the Current resource information meets the default of preset active reporting resource information
Condition;
The reporting unit, if judging that the Current resource information meets the preset active reporting for the judging unit
When the preset condition of resource information, the host node of the affiliated cluster of Xiang Suoshu calculate node reports the Current resource information;
The calculate node further include:
First acquisition unit, for obtaining the last resource information reported, wherein it is the calculating section that the last time, which reports,
It is called time in the resource information that was reported to the host node of point from once reporting the latest;
The judging unit is used to calculate the stock number that the resource information that the last time reports indicates and the Current resource is believed
The difference in change of the stock number indicated is ceased, and judges whether the difference in change is greater than the pre- of preset triggering active reporting resource information
If changing upper limit threshold;
Change computing unit, for calculating the difference in change of resource information and the Current resource information that the last time reports,
And judge whether the difference in change is greater than default variation lower threshold, if so, the resource that will be used to count the calculate node
Information reports score to increase N, wherein the N is the real number greater than zero;
The judging unit reports whether the current value of score is greater than preset triggering active reporting resource described in being also used to judge
The default of information reports threshold value.
5. calculate node as claimed in claim 4, which is characterized in that the calculate node further include:
Second acquisition unit, for obtain it is last report on call time, wherein it is that calculatings saves that the last time, which reports,
It is called time in the resource information that was reported to the host node of point from once reporting the latest;
The judging unit is for judging what the current acquisition time for acquiring the Current resource information was reported with the last time
On time difference for calling time whether be greater than the time threshold of preset triggering active reporting resource information.
6. calculate node as described in claim 4 or 5, which is characterized in that the calculate node further include:
Receiving unit, the Web Service request sent for receiving the host node;
The reporting unit is also used to respond the Web Service request, to report the Current resource to the host node
Information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510615267.6A CN105357026B (en) | 2015-09-24 | 2015-09-24 | A kind of resource information collection method and calculate node |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510615267.6A CN105357026B (en) | 2015-09-24 | 2015-09-24 | A kind of resource information collection method and calculate node |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105357026A CN105357026A (en) | 2016-02-24 |
CN105357026B true CN105357026B (en) | 2019-07-23 |
Family
ID=55332903
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510615267.6A Active CN105357026B (en) | 2015-09-24 | 2015-09-24 | A kind of resource information collection method and calculate node |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105357026B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106095638A (en) * | 2016-05-30 | 2016-11-09 | 浪潮电子信息产业股份有限公司 | The method of a kind of server resource alarm, Apparatus and system |
CN107368400B (en) * | 2017-08-01 | 2020-02-04 | Oppo广东移动通信有限公司 | CPU monitoring method and device, computer readable storage medium and mobile terminal |
CN108153650A (en) * | 2018-02-02 | 2018-06-12 | 郑州云海信息技术有限公司 | Obtain method, system, device and the storage medium of Cloud Server resource information |
CN114679499A (en) * | 2021-12-30 | 2022-06-28 | 惠州市智慧大数据有限公司 | Enterprise data collection monitoring method and device, computer equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026857A (en) * | 2006-02-17 | 2007-08-29 | 中兴通讯股份有限公司 | Method for preparing resource in advance for hard switching process |
CN101170446A (en) * | 2007-12-03 | 2008-04-30 | 华为技术有限公司 | A license management method, server, client and system |
CN101304330A (en) * | 2008-06-28 | 2008-11-12 | 华为技术有限公司 | Resource allocation method, server, network equipment and network system |
CN101808119A (en) * | 2010-03-04 | 2010-08-18 | 杭州华三通信技术有限公司 | Method and equipment for multiple storage array load balancing |
CN101925107A (en) * | 2009-06-15 | 2010-12-22 | 华为技术有限公司 | Method, device and system for achieving resource scheduling |
CN102137429A (en) * | 2010-08-13 | 2011-07-27 | 华为技术有限公司 | Method, device and system for reporting and updating resource information |
CN102651908A (en) * | 2011-02-28 | 2012-08-29 | 华为技术有限公司 | Method and equipment for transmitting data |
CN103841129A (en) * | 2012-11-21 | 2014-06-04 | 华为技术有限公司 | Cloud computing resource information acquisition server, cloud computing resource information acquisition client and information processing method |
CN103973885A (en) * | 2014-04-02 | 2014-08-06 | 联想(北京)有限公司 | Data reporting method and mobile terminal |
-
2015
- 2015-09-24 CN CN201510615267.6A patent/CN105357026B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101026857A (en) * | 2006-02-17 | 2007-08-29 | 中兴通讯股份有限公司 | Method for preparing resource in advance for hard switching process |
CN101170446A (en) * | 2007-12-03 | 2008-04-30 | 华为技术有限公司 | A license management method, server, client and system |
CN101304330A (en) * | 2008-06-28 | 2008-11-12 | 华为技术有限公司 | Resource allocation method, server, network equipment and network system |
CN101925107A (en) * | 2009-06-15 | 2010-12-22 | 华为技术有限公司 | Method, device and system for achieving resource scheduling |
CN101808119A (en) * | 2010-03-04 | 2010-08-18 | 杭州华三通信技术有限公司 | Method and equipment for multiple storage array load balancing |
CN102137429A (en) * | 2010-08-13 | 2011-07-27 | 华为技术有限公司 | Method, device and system for reporting and updating resource information |
CN102651908A (en) * | 2011-02-28 | 2012-08-29 | 华为技术有限公司 | Method and equipment for transmitting data |
CN103841129A (en) * | 2012-11-21 | 2014-06-04 | 华为技术有限公司 | Cloud computing resource information acquisition server, cloud computing resource information acquisition client and information processing method |
CN103973885A (en) * | 2014-04-02 | 2014-08-06 | 联想(北京)有限公司 | Data reporting method and mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN105357026A (en) | 2016-02-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112162865B (en) | Scheduling method and device of server and server | |
CN105357026B (en) | A kind of resource information collection method and calculate node | |
CN109451072A (en) | A kind of message caching system and method based on Kafka | |
CN102929773B (en) | information collecting method and device | |
CN110990138B (en) | Resource scheduling method, device, server and storage medium | |
CN101902497B (en) | Cloud computing based internet information monitoring system and method | |
CN111966289B (en) | Partition optimization method and system based on Kafka cluster | |
CN107204894A (en) | The monitoring method and device of network servicequality | |
CN103685309A (en) | Asynchronous request queue model oriented to map visualization tile service | |
CN102880540A (en) | Method for ensuring normal operation of access controller (AC) under high load | |
CN110647392A (en) | Intelligent elastic expansion method based on container cluster | |
CN104683155A (en) | Alarm shielding mechanism in network management system | |
WO2023109806A1 (en) | Method and apparatus for processing active data for internet of things device, and storage medium | |
CN110417586A (en) | Service monitoring method, service node, server and computer readable storage medium | |
CN110138603A (en) | A kind of method and device monitoring internet of things equipment | |
CN109542627A (en) | Node switching method, device, supervisor, node device and distributed system | |
CN103309843A (en) | Configuration method and system for servers | |
CN114064309A (en) | Cable service data processing method and device based on processing priority | |
CN110750425A (en) | Database monitoring method, device and system and storage medium | |
CN111835578A (en) | Information transmission management method, information transmission management apparatus, and readable storage medium | |
CN115309735A (en) | Big data cleaning method and device, computer equipment and storage medium | |
CN112054926B (en) | Cluster management method and device, electronic equipment and storage medium | |
CN115357395A (en) | Fault equipment task transfer method and system, electronic equipment and storage medium | |
CN115118475A (en) | Method, device, equipment and medium for dispatching cryptographic equipment cluster | |
CN110650135B (en) | Node processing method, related equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |