CN108306784A - A method of the ponds statistics XenServer virtual machine total flow - Google Patents

A method of the ponds statistics XenServer virtual machine total flow Download PDF

Info

Publication number
CN108306784A
CN108306784A CN201711434440.8A CN201711434440A CN108306784A CN 108306784 A CN108306784 A CN 108306784A CN 201711434440 A CN201711434440 A CN 201711434440A CN 108306784 A CN108306784 A CN 108306784A
Authority
CN
China
Prior art keywords
flow
total
virtual machine
physical host
ponds
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.)
Granted
Application number
CN201711434440.8A
Other languages
Chinese (zh)
Other versions
CN108306784B (en
Inventor
邓学华
黄衍博
黄春豪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Ruijiang Cloud Computing Co Ltd
Guangdong Eflycloud Computing Co Ltd
Original Assignee
Guangdong Ruijiang Cloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Ruijiang Cloud Computing Co Ltd filed Critical Guangdong Ruijiang Cloud Computing Co Ltd
Priority to CN201711434440.8A priority Critical patent/CN108306784B/en
Publication of CN108306784A publication Critical patent/CN108306784A/en
Application granted granted Critical
Publication of CN108306784B publication Critical patent/CN108306784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0213Standardised network management protocols, e.g. simple network management protocol [SNMP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

A method of the ponds statistics XenServer virtual machine total flow, the inflow flow that the virtual machine of physical host is connected on the port of Open vSwitch is identical as the outflow flow of virtual machine, and the outflow flow that virtual machine is connected on the port of Open vSwitch is identical as the inflow flow of virtual machine;It adds up to the flow of physical host in the ponds XenServer, to obtain the total flow of virtual machine in the ponds XenServer, realizes accurately real-time statistics, improve statistical efficiency and the precision of statistical data.

Description

A method of the ponds statistics XenServer virtual machine total flow
Technical field
The present invention relates to cloud computing flow rate calculation field more particularly to a kind of ponds statistics XenServer virtual machine total flows Method.
Background technology
The virtual machine traffic statistics that existing XenServer is provided is performance modules, this module only provides The real-time traffic statistics of separate unit virtual machine, if it is desired to which to obtain the total flow of all virtual machines in entire pond can only pass through difference It obtains the flow of every virtual machine and then adds up, but this method has two:First, inefficiency, a physics Virtual more than ten virtual machines of host energy, a pond XenServer just has hundreds of thousands of virtual machines, every virtual machine that will carry out Primary statistics finally adds up again, under efficiency is very low;Second is that there are errors for the data of statistics, because every virtual machine will carry out Primary statistics will result in times of acquisition mostly and prolongs in the statistics of different virtual machine meeting existence time difference level-one totality in this way When, these time errors are all that can cause prodigious data error in real-time statistics, not reliable so as to cause the data of statistics. And the certain error of data on flows and physical presence that the performance modules that XenServer is provided obtain, thus Further increase the error of data statistics.
Invention content
It is an object of the invention to propose a kind of method of ponds statistics XenServer virtual machine total flow, realization pair The total flow of the ponds XenServer virtual machine has carried out accurate, efficient real-time statistics.
For this purpose, the present invention uses following technical scheme:
A method of the ponds statistics XenServer virtual machine total flow, the virtual machine of physical host are connected on Open The inflow flow of the port of vSwitch is identical as the outflow flow of virtual machine, and virtual machine is connected on the port of Open vSwitch It is identical as the inflow flow of virtual machine to flow out flow;
Include the process of the ponds statistics XenServer virtual machine total flow:
Step A:The timing node of the ponds selection statistics XenServer virtual machine total flow, should to data base querying All physical hosts and its IP address under the ponds XenServer;
Step B:Thread pool is opened, the virtual machine of acquisition physical host is connected on the current of the port of Open vSwitch respectively It is total to flow into flow and current total outflow flow;
Step C:Current total inflow flow that the virtual machine of physical host is connected on to the port of Open vSwitch is added, and is obtained To total inflow flow of physical host;The virtual machine of physical host is connected on to current total flowing out stream of the port of Open vSwitch Amount is added, and obtains total outflow flow of physical host, and duplicate measurements is carried out in the time interval threshold value of setting, obtains flow Flow velocity;
Step D:Total inflow flow of each physical host and total outflow flow are obtained respectively, by each physical host Total inflow flow be added, obtain total outflow flow in the ponds XenServer;By total outflow flow phase of each physical host Add, obtains total inflow flow in the ponds XenServer.
Preferably, the current total of the port of Open vSwitch is connected on by using the virtual machine of snmp acquisition physical hosts Flow into flow and current total outflow flow;
Process including obtaining physical host flow:
Step B1:Thread pool is opened, each physical host in the ponds XenServer is made to pass through SNMP in the form of multithreading Use IF-MIB::ifDescr、IF-MIB::ifInOctets、IF-MIB::Tri- OID of ifOutOctets obtain physics master The each title of machine is with current total inflow flow of the vif. network interfaces started and current total outflow flow;
Step B2:The inflow flow of all network interfaces with vif. beginnings, outflow flow are separately summed, physics is obtained Total inflow flow of the network interface with vif. beginnings of host and total outflow flow, and result is saved in memory.
Preferably, include the process of calculating flow velocity:
Step C1:Obtain total inflow flow of the physical host of first time and total outflow flow;
Step C2:It is set in total inflow flow that second physical host is obtained after time interval threshold value and total flowing out stream Amount;
Step C3:The physical host obtained with second, which always flows into flow and subtracts the physical host obtained for the first time, always to be flowed into Flow, then divided by time interval threshold value, obtain always flow into flow flow velocity;The physical host obtained with second always flows out flow Subtract the physical host obtained for the first time and always flow out flow, then divided by time interval threshold value, obtain the flow velocity for always flowing out flow.
Preferably, total outflow flow in the ponds XenServer counted and total flow that flows into return to knot in the form of interface Fruit makees real-time display and is saved in big data module.
Description of the drawings
Fig. 1 is the flow chart of the ponds the statistics XenServer virtual machine total flow of the present invention;
Fig. 2 is the flow chart of the calculating flow velocity of the present invention;
Specific implementation mode
Technical solution to further illustrate the present invention below with reference to the accompanying drawings and specific embodiments.
A kind of method of the ponds the statistics XenServer virtual machine total flow of the present embodiment, the virtual machine of physical host are connected on The inflow flow of the port of Open vSwitch is identical as the outflow flow of virtual machine, and virtual machine is connected on the end of Open vSwitch The outflow flow of mouth is identical as the inflow flow of virtual machine;
Include the process of the ponds statistics XenServer virtual machine total flow:
Step A:The timing node of the ponds selection statistics XenServer virtual machine total flow, should to data base querying All physical hosts and its IP address under the ponds XenServer;
Step B:Thread pool is opened, the virtual machine of acquisition physical host is connected on the current of the port of Open vSwitch respectively It is total to flow into flow and current total outflow flow;
Step C:Current total inflow flow that the virtual machine of physical host is connected on to the port of Open vSwitch is added, and is obtained To total inflow flow of physical host;The virtual machine of physical host is connected on to current total flowing out stream of the port of Open vSwitch Amount is added, and obtains total outflow flow of physical host, and duplicate measurements is carried out in the time interval threshold value of setting, obtains flow Flow velocity;
Step D:Total inflow flow of each physical host and total outflow flow are obtained respectively, by each physical host Total inflow flow be added, obtain total outflow flow in the ponds XenServer;By total outflow flow phase of each physical host Add, obtains total inflow flow in the ponds XenServer.
The inflow flow that the port of Open vSwitch is connected on according to XenServer virtual machines is virtual equal to XenServer The outflow flow that the outflow flow and XenServer virtual machine interfaces of machine are connected on the port of Open vSwitch is equal to This feature of the inflow flow of XenServer virtual machines, is added up by the flow to physical host in the ponds XenServer, To obtain the total flow of virtual machine in the ponds XenServer, realizes accurately real-time statistics, improve statistical efficiency and statistical number According to precision, be that statistical data is relatively reliable, need not rely on performance modules and the flow of single virtual machine is carried out Single statistics, solves the problems, such as that statistical efficiency is low, also solves there are real time data error, and data statistics is caused to be not allowed Problem.
Preferably, the current total of the port of Open vSwitch is connected on by using the virtual machine of snmp acquisition physical hosts Flow into flow and current total outflow flow;
Process including obtaining physical host flow:
Step B1:Thread pool is opened, each physical host in the ponds XenServer is made to pass through SNMP in the form of multithreading Use IF-MIB::ifDescr、IF-MIB::ifInOctets、IF-MIB::Tri- OID of ifOutOctets obtain physics master The each title of machine is with current total inflow flow of the vif. network interfaces started and current total outflow flow;
Step B2:The inflow flow of all network interfaces with vif. beginnings, outflow flow are separately summed, physics is obtained Total inflow flow of the network interface with vif. beginnings of host and total outflow flow, and result is saved in memory.
The data on flows for being connected on the ports Open vSwitch to the ponds XenServer virtual machine by SNMP technologies counts, can To obtain the flow that flows in and out of physical host, the network interface of title vif. beginnings is that virtual machine is connected on Open The port of vSwitch is based on this point, and the stream of the port of Open vSwitch can be connected on according to XenServer virtual machines Inbound traffics are equal to the outflow flow of XenServer virtual machines and XenServer virtual machine interfaces are connected on Open vSwitch's The outflow flow of port is equal to the inflow flow of XenServer virtual machines this feature progress real-time traffic statistics, the technology point To realize that data statistics provides the foundation.
Preferably, include the process of calculating flow velocity:
Step C1:Obtain total inflow flow of the physical host of first time and total outflow flow;
Step C2:It is set in total inflow flow that second physical host is obtained after time interval threshold value and total flowing out stream Amount;
Step C3:The physical host obtained with second, which always flows into flow and subtracts the physical host obtained for the first time, always to be flowed into Flow, then divided by time interval threshold value, obtain always flow into flow flow velocity;The physical host obtained with second always flows out flow Subtract the physical host obtained for the first time and always flow out flow, then divided by time interval threshold value, obtain the flow velocity for always flowing out flow.
By the threshold value that sets interval, generally 20s, the rate of flow can be accurately measured, is also corresponded to simultaneously Statistics repeatedly is measured to data on flows, it is ensured that the accuracy of data.
Preferably, total outflow flow in the ponds XenServer counted and total flow that flows into return to knot in the form of interface Fruit makees real-time display and is saved in big data module.
By being stored in big data module, the record of flow histories data is realized in conjunction with big data module, facilitates analysis The flow service condition of different cloud nodes.
Advantageous effect:
1, accurate real-time statistics are carried out to the total flow of the ponds XenServer virtual machine by SNMP technologies, and combined Big data technology realizes flow histories record.The accuracy for improving statistical efficiency and statistical data makes the data of statistics more Add reliable.
2, reliable and stable data statistics is carried out to the ponds XenServer virtual machine total flow and is conducive to network in cloud environment O&M, can monitor the bandwidth availability ratio of cloud node, and due to quickly navigating to XenServer when there is network congestion Pond can analyze the flow service condition of different cloud nodes by the flow histories data to big data.
The technical principle of the present invention is described above in association with specific embodiment.These descriptions are intended merely to explain the present invention's Principle, and it cannot be construed to limiting the scope of the invention in any way.Based on the explanation herein, the technology of this field Personnel would not require any inventive effort the other specific implementation modes that can associate the present invention, these modes are fallen within Within protection scope of the present invention.

Claims (4)

1. a kind of method of ponds statistics XenServer virtual machine total flow, it is characterised in that:The virtual machine of physical host is connected on The inflow flow of the port of Open vSwitch is identical as the outflow flow of virtual machine, and virtual machine is connected on the end of Open vSwitch The outflow flow of mouth is identical as the inflow flow of virtual machine;
Include the process of the ponds statistics XenServer virtual machine total flow:
Step A:The timing node of the ponds selection statistics XenServer virtual machine total flow, to the data base querying ponds XenServer Under all physical hosts and its IP address;
Step B:Thread pool is opened, the virtual machine of acquisition physical host is connected on current total stream of the port of Open vSwitch respectively Inbound traffics and current total outflow flow;
Step C:Current total inflow flow that the virtual machine of physical host is connected on to the port of Open vSwitch is added, and obtains object Manage total inflow flow of host;The virtual machine of physical host is connected on to current total outflow flow phase of the port of Open vSwitch Add, obtain total outflow flow of physical host, and carry out duplicate measurements in the time interval threshold value of setting, obtains traffic flow Speed;
Step D:Total inflow flow of each physical host and total outflow flow are obtained respectively, by the total of each physical host It flows into flow to be added, obtains total outflow flow in the ponds XenServer;Total outflow flow of each physical host is added, is obtained To total inflow flow in the ponds XenServer.
2. the method for a kind of ponds statistics XenServer virtual machine total flow according to claim 1, it is characterised in that:Pass through The current total inflow flow for the port that the virtual machine that physical host is obtained using snmp is connected on Open vSwitch is always flowed with current Outflow;
Process including obtaining physical host flow:
Step B1:Thread pool is opened, each physical host in the ponds XenServer is made to be used by SNMP in the form of multithreading IF-MIB::ifDescr、IF-MIB::ifInOctets、IF-MIB::It is every to obtain physical host by tri- OID of ifOutOctets A title is with current total inflow flow of the vif. network interfaces started and current total outflow flow;
Step B2:The inflow flow of all network interfaces with vif. beginnings, outflow flow are separately summed, physical host is obtained The network interface with vif. beginnings total inflows flow and always flow out flow, and result is saved in memory.
3. the method for a kind of ponds statistics XenServer virtual machine total flow according to claim 1, it is characterised in that:Including Calculate the process of flow velocity:
Step C1:Obtain total inflow flow of the physical host of first time and total outflow flow;
Step C2:Total inflow flow of second of physical host and total outflow flow are obtained after being set in time interval threshold value;
Step C3:The physical host obtained with second, which always flows into flow and subtracts the physical host obtained for the first time, always to be flowed into Amount, then divided by time interval threshold value, obtain always flow into flow flow velocity;The physical host obtained with second always flows out flow and subtracts Go the physical host obtained for the first time always to flow out flow, then divided by time interval threshold value, obtain the flow velocity for always flowing out flow.
4. the method for a kind of ponds statistics XenServer virtual machine total flow according to claim 1, it is characterised in that:
Total outflow flow in the ponds XenServer counted and total inflow flow are returned the result in the form of interface and make real-time display And it is saved in big data module.
CN201711434440.8A 2017-12-26 2017-12-26 Method for counting total flow of virtual machines in XenServer pool Active CN108306784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711434440.8A CN108306784B (en) 2017-12-26 2017-12-26 Method for counting total flow of virtual machines in XenServer pool

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711434440.8A CN108306784B (en) 2017-12-26 2017-12-26 Method for counting total flow of virtual machines in XenServer pool

Publications (2)

Publication Number Publication Date
CN108306784A true CN108306784A (en) 2018-07-20
CN108306784B CN108306784B (en) 2020-12-01

Family

ID=62867461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711434440.8A Active CN108306784B (en) 2017-12-26 2017-12-26 Method for counting total flow of virtual machines in XenServer pool

Country Status (1)

Country Link
CN (1) CN108306784B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495343A (en) * 2018-11-20 2019-03-19 网宿科技股份有限公司 Processing method, device and the server of abnormal flow data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378264A (en) * 2014-12-12 2015-02-25 武汉噢易云计算有限公司 sFlow based virtual machine process traffic monitoring method
CN105227403A (en) * 2015-10-09 2016-01-06 盛科网络(苏州)有限公司 A kind of OpenStack network flow monitoring method
CN106254176A (en) * 2016-07-29 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of traffic mirroring method based on openvswitch
CN106411863A (en) * 2016-09-14 2017-02-15 南京安贤信息科技有限公司 Virtualization platform for processing network traffic of virtual switches in real time
US20170353886A1 (en) * 2016-06-02 2017-12-07 International Business Machines Corporation Virtual switch-based congestion control for multiple tcp flows

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378264A (en) * 2014-12-12 2015-02-25 武汉噢易云计算有限公司 sFlow based virtual machine process traffic monitoring method
CN105227403A (en) * 2015-10-09 2016-01-06 盛科网络(苏州)有限公司 A kind of OpenStack network flow monitoring method
US20170353886A1 (en) * 2016-06-02 2017-12-07 International Business Machines Corporation Virtual switch-based congestion control for multiple tcp flows
CN106254176A (en) * 2016-07-29 2016-12-21 浪潮(北京)电子信息产业有限公司 A kind of traffic mirroring method based on openvswitch
CN106411863A (en) * 2016-09-14 2017-02-15 南京安贤信息科技有限公司 Virtualization platform for processing network traffic of virtual switches in real time

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495343A (en) * 2018-11-20 2019-03-19 网宿科技股份有限公司 Processing method, device and the server of abnormal flow data

Also Published As

Publication number Publication date
CN108306784B (en) 2020-12-01

Similar Documents

Publication Publication Date Title
CN100463439C (en) Measurement architecture to obtain per-hop one-way packet loss and delay in multi-class service networks
CN108234524A (en) Method, apparatus, equipment and the storage medium of network data abnormality detection
Yang et al. Sketchint: Empowering int with towersketch for per-flow per-switch measurement
CN110309485A (en) A kind of line loss per unit mark post value calculating method based on the classification of platform area data characteristics
CN106031094A (en) Accurate measurement of distributed counters
CN102682222A (en) Continuous tide calculation method based on wind power fluctuation rule
CN102104502A (en) Ethernet equipment performance test platform based on Linux system
CN103078754B (en) A kind of network data flow statistical method based on attribute bloom filter
Huici et al. Blockmon: A high-performance composable network traffic measurement system
CN103117900A (en) Configurable industrial Ethernet data parsing system and parsing method
CN109725219A (en) A kind of electric energy meter platform area automatic identifying method
CN104539471A (en) Bandwidth metering method and device and computer equipment
CN104104521A (en) Cloud computing service flexible billing method based on actual usage
CN107276800A (en) A kind of network traffics method for tracing and device for cloud data center
CN103716187B (en) Network topology structure determination method and system
CN108306784A (en) A method of the ponds statistics XenServer virtual machine total flow
CN110351166A (en) A kind of network level fine granularity flow measuring method based on traffic statistics characteristic
CN110348540A (en) Electrical power system transient angle stability Contingency screening method and device based on cluster
Shahzad et al. Noise can help: Accurate and efficient per-flow latency measurement without packet probing and time stamping
CN203929885U (en) Based on FPGA etc. precision frequency testing system
CN105044657B (en) Gate energy meter monitoring system
CN208128267U (en) A kind of TTE router performance detection system
CN104065664B (en) A kind of Cloud Server verifies system
CN104243226B (en) Flow statistical method and device
CN205336305U (en) Hardware framework that NS3 parallel simulation simulation system used

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant