CN107528831A - A kind of data capture method and device - Google Patents

A kind of data capture method and device Download PDF

Info

Publication number
CN107528831A
CN107528831A CN201710660755.8A CN201710660755A CN107528831A CN 107528831 A CN107528831 A CN 107528831A CN 201710660755 A CN201710660755 A CN 201710660755A CN 107528831 A CN107528831 A CN 107528831A
Authority
CN
China
Prior art keywords
default
data
request
performance data
interfaces
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
Application number
CN201710660755.8A
Other languages
Chinese (zh)
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.)
Beijing Lajin Zhongbo Technology Co ltd
Original Assignee
Wuxi Tvmining Juyuan Media Technology 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 Wuxi Tvmining Juyuan Media Technology Co Ltd filed Critical Wuxi Tvmining Juyuan Media Technology Co Ltd
Priority to CN201710660755.8A priority Critical patent/CN107528831A/en
Publication of CN107528831A publication Critical patent/CN107528831A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/161Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
    • H04L69/162Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a kind of data capture method and device.Methods described includes:In the request of data sent by default tcp interfaces to request of data end, read the performance data that default capabilities sampling instrument gathers in advance, wherein, the request of data end is connected with the default tcp interfaces, and the default tcp interfaces are the interface on the server;The performance data is sent to the request of data end by the tcp interfaces.Pass through technical scheme so that request of data end can the data that collect of active pull performance sampling instrument, this is advantageous to improve Consumer's Experience.

Description

A kind of data capture method and device
Technical field
The present invention relates to communication technical field, more particularly to a kind of data capture method and device.
Background technology
At present, the performance sampling instrument (such as Collected performances sampling instrument) installed on server is only used for number Its data collected is pushed according to request end, and request of data end can not the number that collects of active pull performance sampling instrument According to this allows for request of data end and is in passive state, influences Consumer's Experience.
The content of the invention
The present invention provides a kind of data capture method and device, to by presetting tcp (Transmission Control Protocol, transmission control protocol) interface sent to request of data end request of data when, can be read default The performance data that performance sampling instrument gathers in advance, and then performance data is sent to the data by the tcp interfaces and asked Ask end so that request of data end can the data that collect of active pull performance sampling instrument, this is advantageous to improve user's body Test.
The present invention provides a kind of data capture method, including:
In the request of data sent by default tcp interfaces to request of data end, default capabilities collection work is read Have the performance data gathered in advance, wherein, the request of data end is connected with the default tcp interfaces, and the default tcp Interface is the interface on the server;
The performance data is sent to the request of data end by the tcp interfaces.
In one embodiment, before the performance data that default capabilities sampling instrument gathers in advance is read, methods described Also include:
When the default capabilities sampling instrument collects the performance data, the performance data is stored to default In socket interfaces;
The performance data for reading default capabilities sampling instrument and gathering in advance, including:
The performance data is read from the default socket interfaces.
In one embodiment, methods described also includes:
It is described to read the performance data from the default socket interfaces, including:
The default socket interfaces are accessed by xineted processes, to read the performance data;
The performance data is sent to the request of data end by the default tcp interfaces.
In one embodiment, the default capabilities sampling instrument includes Collected sampling instruments.
The present invention also provides a kind of data acquisition facility, including:
Read module, in the request of data sent by default tcp interfaces to request of data end, reading pre- If the performance data that performance sampling instrument gathers in advance, wherein, the request of data end is connected with the default tcp interfaces, And the default tcp interfaces are the interface on the server;
Sending module, for the performance data to be sent to the request of data end by the tcp interfaces.
In one embodiment, described device also includes:
Memory module, for before the performance data that default capabilities sampling instrument gathers in advance is read, being preset when described When performance sampling instrument collects the performance data, the performance data is stored into default socket interfaces;
The read module includes:
Reading submodule, for reading the performance data from the default socket interfaces.
In one embodiment, described device also includes:
The reading submodule includes:
Access unit, for accessing the default socket interfaces by xineted processes, to read the performance number According to;
Transmitting element, for being sent the performance data to the request of data end by the default tcp interfaces.
In one embodiment, the default capabilities sampling instrument includes Collected sampling instruments.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In the request of data sent by default tcp interfaces to request of data end, default capabilities collection can be read The performance data that instrument gathers in advance, and then performance data is sent to request of data end by tcp interfaces, so that data Request end can the data that collect of active pull performance sampling instrument, this is advantageous to improve Consumer's Experience.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by the explanations write Specifically noted structure is realized and obtained in book, claims and accompanying drawing.
Below by drawings and examples, technical scheme is described in further detail.
Brief description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and a part for constitution instruction, the reality with the present invention Apply example to be used to explain the present invention together, be not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of data capture method according to an exemplary embodiment.
Fig. 2 is the flow chart of another data capture method according to an exemplary embodiment.
Fig. 3 is a kind of block diagram of data acquisition facility according to an exemplary embodiment.
Fig. 4 is the block diagram of another data acquisition facility according to an exemplary embodiment.
Embodiment
The preferred embodiments of the present invention are illustrated below in conjunction with accompanying drawing, it will be appreciated that described herein preferred real Apply example to be merely to illustrate and explain the present invention, be not intended to limit the present invention.
In order to solve the above-mentioned technical problem, the embodiment of the present disclosure provides a kind of data capture method, and this method is applied to In Data Acquisition Program, system or device, its executive agent is server, and the operating system of the server can be unix systems System, such as can be Linux system, as shown in figure 1, step S101 and step S102, wherein:
In step S101, in the request of data sent by default tcp interfaces to request of data end, read pre- If the performance data that performance sampling instrument gathers in advance, wherein, request of data end is connected with default tcp interfaces, and default tcp Interface is the interface on server;
Wherein, request of data end can be the terminals such as mobile phone or server.
Performance data can be service condition of the system resources such as CPU usage, internal memory etc..
In step s 102, performance data is sent to request of data end by tcp interfaces.
In the request of data sent by default tcp interfaces to request of data end, default capabilities collection can be read The performance data that instrument gathers in advance, and then performance data is sent to request of data end by tcp interfaces, so that data Request end can the data that collect of active pull performance sampling instrument, this is advantageous to improve Consumer's Experience.
As shown in Fig. 2 in one embodiment, read performance data that default capabilities sampling instrument gathers in advance it Before, method also includes:
In step s 201, when default capabilities sampling instrument collects performance data, performance data is stored to default In socket interfaces;
Wherein, UNIX Domain Socket are the processes for same main frame to grow up on socket frameworks Between communicate (IPC, Inter-Process Communication).
It is to store performance data to the buffer area of unix socket interfaces during storage.
The performance data that reading default capabilities sampling instrument in step S101 shown in above-mentioned Fig. 1 gathers in advance, including:
In step S202, the reading performance data from default socket interfaces.
Before reading performance data, default socket interfaces can be set up, then store performance data to default In socket interfaces, during in order to need to pull the data at request of data end afterwards, it can be preset from this in socket interfaces Read.
Wherein, the configuration process for presetting socket interfaces can be as follows:
#Unixsocket is configured
LoadPlugin unixsock
<Plugin unixsock>
SocketFile"/var/run/collectd-unixsock"
SocketGroup"root"
SocketPerms"0660"
DeleteSocket true
</Plugin>
In one embodiment, method also includes:
The reading performance data from default socket interfaces, including:
By xineted process access preset socket interfaces, with reading performance data;
Performance data is sent to request of data end by default tcp interfaces.
When reading the performance data, can be connect by the automatic access preset socket of xineted processes in executive agent Mouthful, with reading performance data, and then performance data is automatically sent to by request of data end by default tcp interfaces, so that data Request end being capable of the data that collect of active pull Collected sampling instruments.
In addition, above-mentioned xineted processes are used to intercept network request, the request service of association is called, request accesses specific The network port, then xinetd call background process processing request, thus, if receiving above-mentioned request of data can also pass through Xineted intercepts the default tcp interfaces to determine.
Wherein, xinetd configuration process can be as follows:
Xinetd is configured
service collectdstatus{
Type=UNLISTED
Port=25827
Socket_type=stream
Protocol=tcp
Wait=no
Cps=100 3
Instances=500
Per_source=250
Flags=NODELAY
User=root
Server=/usr/bin/ncat
Server_args=-U/var/run/collectd-unixsock
Disable=no
}
In one embodiment, default capabilities sampling instrument includes Collected sampling instruments.
As shown in figure 3, the present invention also provides a kind of data acquisition facility, including:
Read module 301, it is configured as in the request of data sent by presetting tcp interfaces to request of data end When, the performance data that default capabilities sampling instrument gathers in advance is read, wherein, request of data end is connected with default tcp interfaces, And default tcp interfaces are the interface on server;
Sending module 302, it is configured as by tcp interfaces sending performance data to request of data end.
As shown in figure 4, in one embodiment, device also includes:
Memory module 401, it is configured as before the performance data that default capabilities sampling instrument gathers in advance is read, when pre- If performance sampling instrument collects performance data, performance data is stored into default socket interfaces;
Read module 301 includes:
Reading submodule 3011, it is configured as the reading performance data from default socket interfaces.
In one embodiment, device also includes:
Reading submodule 3011 includes:
Access unit, it is configured as by xineted process access preset socket interfaces, with reading performance data;
Transmitting element, it is configured as sending performance data to request of data end by default tcp interfaces.
In one embodiment, default capabilities sampling instrument includes Collected sampling instruments.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in relevant this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
Finally, the data acquisition facility in the present invention is applied to terminal device.For example, it may be mobile phone, computer, Digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant Deng.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more The shape for the computer program product that usable storage medium is implemented on (including but is not limited to magnetic disk storage and optical memory etc.) Formula.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in individual square frame or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to comprising including these changes and modification.

Claims (8)

  1. A kind of 1. data capture method, for server, it is characterised in that including:
    In the request of data sent by default tcp interfaces to request of data end, it is pre- to read default capabilities sampling instrument The performance data first gathered, wherein, the request of data end is connected with the default tcp interfaces, and the default tcp interfaces For the interface on the server;
    The performance data is sent to the request of data end by the tcp interfaces.
  2. 2. according to the method for claim 1, it is characterised in that
    Before the performance data that default capabilities sampling instrument gathers in advance is read, methods described also includes:
    When the default capabilities sampling instrument collects the performance data, the performance data is stored to default socket In interface;
    The performance data for reading default capabilities sampling instrument and gathering in advance, including:
    The performance data is read from the default socket interfaces.
  3. 3. according to the method for claim 2, it is characterised in that methods described also includes:
    It is described to read the performance data from the default socket interfaces, including:
    The default socket interfaces are accessed by xineted processes, to read the performance data;
    The performance data is sent to the request of data end by the default tcp interfaces.
  4. 4. according to the method in any one of claims 1 to 3, it is characterised in that
    The default capabilities sampling instrument includes Collected sampling instruments.
  5. A kind of 5. data acquisition facility, for server, it is characterised in that including:
    Read module, in the request of data sent by default tcp interfaces to request of data end, reading default property The performance data that energy sampling instrument gathers in advance, wherein, the request of data end is connected with the default tcp interfaces, and institute Default tcp interfaces are stated as the interface on the server;
    Sending module, for the performance data to be sent to the request of data end by the tcp interfaces.
  6. 6. device according to claim 5, it is characterised in that described device also includes:
    Memory module, for before the performance data that gathers in advance of default capabilities sampling instrument is read, when the default capabilities When sampling instrument collects the performance data, the performance data is stored into default socket interfaces;
    The read module includes:
    Reading submodule, for reading the performance data from the default socket interfaces.
  7. 7. device according to claim 6, it is characterised in that described device also includes:
    The reading submodule includes:
    Access unit, for accessing the default socket interfaces by xineted processes, to read the performance data;
    Transmitting element, for being sent the performance data to the request of data end by the default tcp interfaces.
  8. 8. the device according to any one of claim 5 to 7, it is characterised in that
    The default capabilities sampling instrument includes Collected sampling instruments.
CN201710660755.8A 2017-08-04 2017-08-04 A kind of data capture method and device Pending CN107528831A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710660755.8A CN107528831A (en) 2017-08-04 2017-08-04 A kind of data capture method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710660755.8A CN107528831A (en) 2017-08-04 2017-08-04 A kind of data capture method and device

Publications (1)

Publication Number Publication Date
CN107528831A true CN107528831A (en) 2017-12-29

Family

ID=60680728

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710660755.8A Pending CN107528831A (en) 2017-08-04 2017-08-04 A kind of data capture method and device

Country Status (1)

Country Link
CN (1) CN107528831A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533366A (en) * 2009-03-09 2009-09-16 浪潮电子信息产业股份有限公司 Method for acquiring and analyzing performance data of server
WO2012136054A1 (en) * 2011-04-08 2012-10-11 中兴通讯股份有限公司 Method and device for collecting performance data and network management system
CN102801559A (en) * 2012-08-03 2012-11-28 南京富士通南大软件技术有限公司 Intelligent local area network data collecting method
CN104407910A (en) * 2014-10-29 2015-03-11 华南理工大学 Virtualization server performance monitoring method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533366A (en) * 2009-03-09 2009-09-16 浪潮电子信息产业股份有限公司 Method for acquiring and analyzing performance data of server
WO2012136054A1 (en) * 2011-04-08 2012-10-11 中兴通讯股份有限公司 Method and device for collecting performance data and network management system
CN102801559A (en) * 2012-08-03 2012-11-28 南京富士通南大软件技术有限公司 Intelligent local area network data collecting method
CN104407910A (en) * 2014-10-29 2015-03-11 华南理工大学 Virtualization server performance monitoring method and system

Similar Documents

Publication Publication Date Title
EP3780702A1 (en) Method and device for monitoring network data
CN106131213A (en) A kind of service management and system
CN114077480B (en) Method, device, equipment and medium for sharing memory between host and virtual machine
CN106571978B (en) Data packet capturing method and device
CN107146623B (en) Speech recognition method, device and system based on artificial intelligence
CN109831746B (en) Method and device for data transmission based on Bluetooth broadcast and Bluetooth equipment
EP3273664B1 (en) Data processing method and device, server, and controller
CN108256069A (en) A kind of method and apparatus of the cross-domain access of the page
CN114039875B (en) Data acquisition method, device and system based on eBPF technology
WO2014194704A1 (en) A grouping processing method and system
CN109639796A (en) A kind of implementation of load balancing, device, equipment and readable storage medium storing program for executing
CN115390991A (en) Virtual machine import and export method, device, equipment and storage medium
CN107025146A (en) A kind of document generating method, device and system
CN112306693B (en) Data packet processing method and device
CN114070755B (en) Virtual machine network flow determination method and device, electronic equipment and storage medium
CN109783248A (en) Data access method, device, computer equipment and storage medium
CN109194706A (en) Internet resources dial testing method and terminal
CN111376255B (en) Robot data acquisition method and device and terminal equipment
CN107528831A (en) A kind of data capture method and device
CN114155969B (en) Medical data acquisition method and device, electronic equipment and storage medium
CN108289165B (en) Method and device for realizing camera control based on mobile phone and terminal equipment
CN116260747A (en) Monitoring method and device of terminal test equipment and electronic equipment
CN112650710A (en) Data migration sending method and device, storage medium and electronic device
CN110119364B (en) Method and system for input/output batch submission
US20140359104A1 (en) Grouping processing method and system

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
TA01 Transfer of patent application right

Effective date of registration: 20221031

Address after: Room 1602, 16th Floor, Building 18, Yard 6, Wenhuayuan West Road, Beijing Economic and Technological Development Zone, Daxing District, Beijing 100176

Applicant after: Beijing Lajin Zhongbo Technology Co.,Ltd.

Address before: Floor 5, Sagittarius Block A, Jiangsu Software Outsourcing Industrial Park, Wuxi New District, Jiangsu Province, 214000

Applicant before: WUXI TVMINING MEDIA SCIENCE & TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20171229

WD01 Invention patent application deemed withdrawn after publication