Movatterモバイル変換


[0]ホーム

URL:


CN106059849A - Automatic trigger packet capture system and method - Google Patents

Automatic trigger packet capture system and method
Download PDF

Info

Publication number
CN106059849A
CN106059849ACN201610302195.4ACN201610302195ACN106059849ACN 106059849 ACN106059849 ACN 106059849ACN 201610302195 ACN201610302195 ACN 201610302195ACN 106059849 ACN106059849 ACN 106059849A
Authority
CN
China
Prior art keywords
client
code
thread
server
message
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
CN201610302195.4A
Other languages
Chinese (zh)
Other versions
CN106059849B (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.)
Beijing Blue Galaxy Terminal Technology Co ltd
Original Assignee
Shanghai Feixun Data Communication 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 Shanghai Feixun Data Communication Technology Co LtdfiledCriticalShanghai Feixun Data Communication Technology Co Ltd
Priority to CN201610302195.4ApriorityCriticalpatent/CN106059849B/en
Publication of CN106059849ApublicationCriticalpatent/CN106059849A/en
Application grantedgrantedCritical
Publication of CN106059849BpublicationCriticalpatent/CN106059849B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

The present invention discloses an automatic trigger packet capture system and method. The automatic trigger packet capture system comprises a plurality of clients used for executing corresponding tests, wherein each client comprises a plurality of threads, and each thread corresponds to a preset code and the corresponding preset capture time; and a server connected with the plurality of clients separately and used for providing a plurality of different preset codes, monitoring the test code of each client, and controlling the client corresponding to the test code to stare the thread corresponding to the preset code to execute an operation of capturing messages within the preset capture time when the test code is the preset code, and the clients turn off the threads when the capture time is ended.

Description

A kind of triggering packet snapping system and method automatically
Technical field
The present invention relates to automatic test field, particularly relate to a kind of be applied in automatic test the integration environment automaticTrigger packet snapping system and method.
Background technology
In existing automatic test the integration environment during test, start packet capturing service when initializing, terminate in testRear stopping packet capturing servicing.If equipment under test breaks down, although obtain all mutual message in whole test process, butMessage information when being that acquisition is broken down in the middle of the message of magnanimity is highly difficult, is unfavorable for the location of fault.
Summary of the invention
The problems referred to above existed for existing packet capturing service, now providing one to aim at can be integrated at automatic testEnvironment triggers automatically and captures error message, it is provided that triggering packet snapping system and the method automatically of fault location efficiency.
Concrete technical scheme is as follows:
One triggers packet snapping system automatically, including
A plurality of clients, described client tests accordingly in order to performing, and each described client includes multiple thread,The corresponding pre-set code of each thread and corresponding default crawl time;
One server, is connected with described a plurality of clients respectively, it is provided that a plurality of different described pre-set code, describedServer is in order to monitor the test code of each described client, when described test code is described pre-set code, and described clothesBusiness device controls described client terminal start-up corresponding to the described test code described thread corresponding with described pre-set code described pre-If performing to capture the operation of message in the time of crawl, described client closes described thread after the described crawl time terminates.
Preferably, described server includes:
One monitoring means, in order to monitor a plurality of described test code of described a plurality of client;
One memory element, in order to store a plurality of different described pre-set code;
One recognition unit, connects described monitoring means and described memory element respectively, in order to identify each described test generationWhether code is described pre-set code;
One processing unit, connects described recognition unit, when described test code is described pre-set code, and described process listUnit sends control instruction in order to the described client corresponding to described test code, pre-with described to control described client terminal start-upIf the described thread that code is corresponding performs to capture the operation of message within the described default crawl time, after the described crawl time terminatesDescribed client closes described thread.
Preferably, described client is in order to save as PCAP lattice by the described message captured after the described crawl time terminatesFormula.
Preferably, the described thread that the described pre-set code in described client is corresponding is in order to set up described pre-set code pairThe session channel being in original state between described client and the described server answered;Sign on is sent out by described serverWhen delivering to described client, described session channel is converted to state of activation by described original state;Described client executing capturesDuring the operation of message, described session channel is converted to waiting state by described state of activation;After the described crawl time terminates, describedSession channel is converted to close off state by described waiting state, and described thread is closed.
Preferably, when described session channel is in described waiting state, described client sends heartbeat message in order to timingTo described server.
One triggers packet snapping method automatically, and application triggers packet snapping system described above automatically, including:
Described server is in order to monitor the test code of each described client, when described test code is described default generationDuring code, described in described server controls, test the described line that described client terminal start-up corresponding to code is corresponding with described pre-set codeJourney performs to capture the operation of message within the described default crawl time, and described client closes institute after the described crawl time terminatesState thread.
Preferably, comprise the steps:
The a plurality of described test code of a plurality of clients described in the most described monitoring server;
Whether each described test code of the most described server identification is described pre-set code;
S3., when described test code is described pre-set code, described server is in order to corresponding to described test codeDescribed client sends control instruction, to control the described client terminal start-up described thread corresponding with described pre-set code describedPerform to capture the operation of message in presetting the crawl time;
The most described crawl time terminates rear described client and closes described thread.
Preferably, described client is in order to save as PCAP lattice by the described message captured after the described crawl time terminatesFormula.
Preferably, the described thread that the described pre-set code in client is corresponding described in described step S3 is in order to set upThe session channel being in original state between described client and described server that described pre-set code is corresponding;Described serviceWhen sign on is sent to described client by device, described session channel is converted to state of activation by described original state;DescribedWhen client executing captures the operation of message, described session channel is converted to waiting state by described state of activation;Described crawlAfter time terminates, described session channel is converted to close off state by described waiting state, and described thread is closed.
Preferably, when described session channel is in described waiting state, described client sends heartbeat message in order to timingTo described server.
The beneficial effect of technique scheme:
Automatically triggering packet snapping system obtains error code by the way of using monitoring client test code thus opens visitorIn the end of family, the triggering of corresponding thread captures message operation, and stopping crawl message closes this thread within the time set, it is achievedCan when client breaks down quick obtaining fault message, fault is positioned, the efficiency of location is high;
Automatically triggering packet snapping method support automatically triggers packet snapping system and achieves the technique effect of fast failure location.
Accompanying drawing explanation
Fig. 1 is the module map of a kind of embodiment of automatic triggering packet snapping system of the present invention;
Fig. 2 is session channel State Transferring schematic diagram between client of the present invention and server;
Fig. 3 is the method flow diagram of a kind of embodiment of automatic triggering packet snapping method of the present invention.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, completeDescribe, it is clear that described embodiment is only a part of embodiment of the present invention rather than whole embodiments wholely.Based onEmbodiment in the present invention, those of ordinary skill in the art obtained on the premise of not making creative work all itsHis embodiment, broadly falls into the scope of protection of the invention.
It should be noted that in the case of not conflicting, the embodiment in the present invention and the feature in embodiment can phasesCombination mutually.
The invention will be further described with specific embodiment below in conjunction with the accompanying drawings, but not as limiting to the invention.
As it is shown in figure 1, one triggers packet snapping system automatically, including
A plurality of clients 1, client 1 tests accordingly in order to performing, and each client 1 includes multiple thread, eachThe corresponding pre-set code of thread and corresponding default crawl time;
One server 2, is connected with a plurality of clients 1 respectively, it is provided that a plurality of different pre-set code, and server 2 is usedTo monitor the test code of each client 1, when testing code and being pre-set code, it is corresponding that server 2 controls test codeClient 1 starts the thread corresponding with pre-set code and performs to capture the operation of message within the default crawl time, and client 1 is being grabbedThe time of taking closes thread after terminating.
Further, pre-set code is test Error Code (error code), can set according to different Error CodePut the different crawl time.
In the present embodiment, automatically trigger packet snapping system and use Master (master)/Slave (from dish) framework, client 1For equipment under test.By the way of using monitoring client 1 to test code, obtain error code thus open in client 1 correspondingThread triggering captures message operation, and stopping crawl message closes this thread within the time set, it is achieved that can be in client 1Quick obtaining fault message when breaking down, positions fault, and the efficiency of fault location is high.
In a preferred embodiment, server 2 comprises the steps that
One monitoring means 21, in order to monitor a plurality of test codes of a plurality of client 1;
One memory element 22, in order to store a plurality of different pre-set code;
One recognition unit 23, connects monitoring means 21 and memory element 22, respectively in order to whether to identify each test codeFor pre-set code;
One processing unit 24, connects recognition unit 23, and when testing code and being pre-set code, processing unit 24 is in order to surveyExamination client 1 corresponding to code sends control instruction, starts the thread corresponding with pre-set code and grabs default controlling client 1Performing to capture the operation of message in taking the time, the crawl time terminates rear client 1 and closes thread.
In the present embodiment, server 2 uses multithread state conversion to realize controlling occur that the client 1 of error code is enteredRow captures the operation of message.When that is equipment under test breaks down client 1, the daily record output of the equipment under test of monitoring or testThe return value of script is corresponding Error Code, when monitoring Error Code, starts the operation capturing message, according to notSame Error Code carries out corresponding time delay, stops capturing the operation of message after arriving the crawl time.
In a preferred embodiment, client 1 is in order to save as PCAP lattice by the message of crawl after the crawl time terminatesFormula.
In the present embodiment, message saves as PCAP form can conveniently reduce equipment under test situation when going wrong, andEasily obtain the problem between message interaction.
In a preferred embodiment, the thread that the pre-set code in client 1 is corresponding is corresponding in order to set up pre-set codeThe session channel being in original state between client 1 and server 2;Sign on is sent to client 1 by server 2Time, session channel is converted to state of activation by original state;When client 1 performs the operation capturing message, session channel is by swashingState Transferring of living is waiting state;After the crawl time terminates, session channel is converted to close off state by waiting state, and thread closesClose.
As in figure 2 it is shown, in the present embodiment, after setting up session channel between client 1 and server 2, session channelIt is now in initial (OPEN) state;After client 1 receives the sign on that server 2 issues, session channel is turned by OPENBeing changed to activate (ALIVE) state, if there being abnormal appearance in this process, session channel is immediately returned to OPEN state;ClientAfter end 1 execution captures the operation of message, session channel is converted to wait (WAIT) state by alive state, in this processIf there being abnormal appearance, session channel is immediately returned to OPEN state;After reaching the crawl time corresponding for Error Code, sessionPassage is to close (Close) state by WAIT State Transferring, and the operation capturing message terminates, and thread is closed;Until can next timeTalking path is OPEN state by Close State Transferring.
In a preferred embodiment, when session channel is waited for, client 1 sends heartbeat message extremely in order to timingServer 2.
In the present embodiment, client 1 notification server 2 by the way of sending heartbeat message continuously keeps being somebody's turn to doSession.
One triggers packet snapping method automatically, and application triggers packet snapping system described above automatically, including:
Server 2 is in order to monitor the test code of each client 1, and when testing code and being pre-set code, server 2 is controlledThe client 1 that system test code is corresponding starts the thread corresponding with pre-set code and performs to capture message within the default crawl timeOperation, client 1 closes thread after the crawl time terminates.
In the present embodiment, automatically trigger packet snapping method and can be applicable in continuous integrating test environment, by judging clientWhether end 1 occurs that the mechanism of Error Code performs to capture the operation of message, many owing to having in the environment of continuous integrating testSet automatic test runs simultaneously, and after occurring in that Error Code in test process, this mechanism can be according to different ErrorCode calls corresponding thread, when there being multiple Error Code to occur, can call multiple corresponding thread simultaneously, and thread can lead toCross session channel mechanism and start the operation capturing message.Until thread terminates after time-out, continuous integrating environment proceeds follow-upTest.
As it is shown on figure 3, in a preferred embodiment, comprise the steps:
S1. server 2 monitors a plurality of test codes of a plurality of client 1;
S2. server 2 identifies whether each test code is pre-set code;
S3., when testing code and being pre-set code, server 2 sends in order to the client 1 corresponding to test code and controlsInstruction, with control client 1 start the thread corresponding with pre-set code perform within the default crawl time crawl message operation;
S4. the time that captures terminates rear client 1 and closes thread.
In the present embodiment, server 2 uses multithread state conversion to realize controlling occur that the client 1 of error code is enteredRow captures the operation of message.When that is equipment under test breaks down client 1, the daily record output of the equipment under test of monitoring or testThe return value of script is corresponding Error Code, when monitoring Error Code, starts the operation capturing message, according to notSame Error Code carries out corresponding time delay, stops capturing the operation of message after arriving the crawl time.
In a preferred embodiment, client 1 is in order to save as PCAP lattice by the message of crawl after the crawl time terminatesFormula.
In the present embodiment, message saves as situation when PCAP form convenient reduction equipment under test goes wrong, and holdsEasily obtain the problem between message interaction.
As in figure 2 it is shown, in a preferred embodiment, the thread that the pre-set code in client 1 is corresponding in step s3 is usedTo set up the session channel being in original state between client corresponding to pre-set code 1 and server 2;Server 2 will be openedWhen beginning to instruct transmission to client 1, session channel is converted to state of activation by original state;Client 1 performs to capture messageDuring operation, session channel is converted to waiting state by state of activation;After the crawl time terminates, session channel is changed by waiting stateFor closed mode, thread is closed.
Further, when session channel is waited for, client 1 sends heartbeat message to server 2 in order to timing.
In the present embodiment, as a example by the operation capturing message of a thread: server 2 and client 1 communicate,Trigger client 1 and perform to capture the operation of message.After occurring in that Error Code in test process, server 2 and clientSetting up a session channel between end 1, while setting up session channel, server 2 can send sign on and inform that client 1 canTo carry out capturing the operation of message, at this moment client 1 starts this session channel, starts to capture message, and by this session channelState is changed into Alive state.During capturing message, session channel is always maintained at, and in conversation procedure, client 1 can be heldThe continuous heartbeat message notification server 2 that constantly sends keeps this session.In the mechanism of Master/Slave, can be according to differentThe Error Code definition different crawl time determines to capture the duration of message, and server 2 can send stopping after a time out and refer toOrder, client 1 stops capturing the operation of message, terminates session simultaneously, and session channel state is changed into Close state.AsFruit has multiple thread simultaneously, and server 2 can carry out the operation of multiple crawl message simultaneously, is not take up mutually resource.
The present invention, can be according to the different settings of Error Code in server 2 in order to ensure to capture the accuracy of messageThe different crawl time, after exceeding the crawl time, stop capturing the operation of message, and crawl message is grabbed save as PCAP latticeFormula, closes corresponding thread.The present invention is to carry out the transmission of order line based on Master/Slave mechanism to control to capture messageAnd stop the operation of crawl message.Owing to continuous integrating automatic test is a continuous print test process, therefore addMulti-thread mechanism controls repeatedly to implement packet capturing operation, it is achieved thereby that go to trigger the behaviour capturing message according to Error CodeMake.
The foregoing is only preferred embodiment of the present invention, not thereby limit embodiments of the present invention and protection modelEnclose, to those skilled in the art, it should can appreciate that done by all utilization description of the invention and diagramatic contentScheme obtained by equivalent and obvious change, all should be included in protection scope of the present invention.

Claims (10)

4. automatically trigger packet snapping system as claimed in claim 1, it is characterised in that the described pre-set code in described clientCorresponding described thread is in order to set up being in initially between described client corresponding to described pre-set code and described serverThe session channel of state;Described server by sign on send to described client time, described session channel by described initiallyState Transferring is state of activation;When described client executing captures the operation of message, described session channel is by described state of activationBe converted to waiting state;After the described crawl time terminates, described session channel is converted to close off state by described waiting state, instituteState thread to close.
9. automatically trigger packet snapping method as claimed in claim 7, it is characterised in that described in described step S3 in clientDescribed thread corresponding to described pre-set code in order to set up described client corresponding to described pre-set code and described serverBetween the session channel being in original state;When sign on is sent to described client by described server, described sessionPassage is converted to state of activation by described original state;When described client executing captures the operation of message, described session channelWaiting state is converted to by described state of activation;After the described crawl time terminates, described session channel is turned by described waiting stateBeing changed to closed mode, described thread is closed.
CN201610302195.4A2016-05-092016-05-09A kind of automatic trigger packet snapping system and methodExpired - Fee RelatedCN106059849B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201610302195.4ACN106059849B (en)2016-05-092016-05-09A kind of automatic trigger packet snapping system and method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201610302195.4ACN106059849B (en)2016-05-092016-05-09A kind of automatic trigger packet snapping system and method

Publications (2)

Publication NumberPublication Date
CN106059849Atrue CN106059849A (en)2016-10-26
CN106059849B CN106059849B (en)2019-10-22

Family

ID=57176819

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201610302195.4AExpired - Fee RelatedCN106059849B (en)2016-05-092016-05-09A kind of automatic trigger packet snapping system and method

Country Status (1)

CountryLink
CN (1)CN106059849B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106506653A (en)*2016-11-152017-03-15汉柏科技有限公司 Packet capture method and device
CN109474492A (en)*2018-11-262019-03-15许继集团有限公司 A packet capture and positioning method
CN112311602A (en)*2020-10-302021-02-02上海中通吉网络技术有限公司 Data packet capture processing method, device and device
CN112838950A (en)*2020-12-302021-05-25浙江三维利普维网络有限公司Network fault analysis method and device, storage medium and electronic device
CN113741397A (en)*2021-09-092021-12-03四川虹美智能科技有限公司Performance test method and system of intelligent household equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101052020A (en)*2007-05-212007-10-10中兴通讯股份有限公司Monitor method and system for automatically measuring executing process
CN102169455A (en)*2010-02-262011-08-31国际商业机器公司Debugging method and system for software performance test
CN102739422A (en)*2011-04-082012-10-17中兴通讯股份有限公司Method, system and apparatus for tracking business signaling
US20120317642A1 (en)*2011-06-092012-12-13Barracuda Networks, Inc.Parallel Tracing Apparatus For Malicious Websites
CN103945445A (en)*2014-03-132014-07-23京信通信技术(广州)有限公司Method and device for testing performance of access controller
CN104657355A (en)*2013-11-152015-05-27阿里巴巴集团控股有限公司Web concurrent crawling method and system
CN105426278A (en)*2015-11-202016-03-23北京畅游天下网络技术有限公司Client equipment performance test method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101052020A (en)*2007-05-212007-10-10中兴通讯股份有限公司Monitor method and system for automatically measuring executing process
CN102169455A (en)*2010-02-262011-08-31国际商业机器公司Debugging method and system for software performance test
CN102739422A (en)*2011-04-082012-10-17中兴通讯股份有限公司Method, system and apparatus for tracking business signaling
US20120317642A1 (en)*2011-06-092012-12-13Barracuda Networks, Inc.Parallel Tracing Apparatus For Malicious Websites
CN104657355A (en)*2013-11-152015-05-27阿里巴巴集团控股有限公司Web concurrent crawling method and system
CN103945445A (en)*2014-03-132014-07-23京信通信技术(广州)有限公司Method and device for testing performance of access controller
CN105426278A (en)*2015-11-202016-03-23北京畅游天下网络技术有限公司Client equipment performance test method and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106506653A (en)*2016-11-152017-03-15汉柏科技有限公司 Packet capture method and device
CN109474492A (en)*2018-11-262019-03-15许继集团有限公司 A packet capture and positioning method
CN112311602A (en)*2020-10-302021-02-02上海中通吉网络技术有限公司 Data packet capture processing method, device and device
CN112838950A (en)*2020-12-302021-05-25浙江三维利普维网络有限公司Network fault analysis method and device, storage medium and electronic device
CN112838950B (en)*2020-12-302022-05-06浙江三维利普维网络有限公司Network fault analysis method and device, storage medium and electronic device
CN113741397A (en)*2021-09-092021-12-03四川虹美智能科技有限公司Performance test method and system of intelligent household equipment

Also Published As

Publication numberPublication date
CN106059849B (en)2019-10-22

Similar Documents

PublicationPublication DateTitle
CN106059849A (en)Automatic trigger packet capture system and method
CN103561308B (en)A kind of exchange method of smart mobile phone remote-controlled intelligent TV
US10452402B2 (en)Operation instruction response control method and terminal for human-machine interface
CN110071847A (en)Message processing method, device, terminal device and storage medium
CN102223655A (en)Underlying multi-thread data transmission method of mobile communication
CN112203132A (en)Method for quickly connecting Bluetooth remote controller during startup of android smart television
CN102014002B (en)Method and system for managing multiple kinds of network element equipment
CN115794313B (en)Virtual machine debugging method, system, electronic device and storage medium
CN106557362A (en)It is applied to the task immigration method and system of intelligent robot
WO2019218663A1 (en)Fault data acquisition method and fault data processing system
CN103001822A (en)Network anomaly handling method and device
US20120039457A1 (en)Teleconferencing control system and method
CN102984145A (en)Method for communicating with communication terminal with plurality of extension sets and communication device
CN112565659B (en)Method for executing voice command during audio and video application work
CN103108242A (en)Method of solving conflict between intelligent television video application and television video
CN104360611A (en)Concentrated automatic power supply switch on and off control system for fault recorder
CN105792241A (en)Automatic test system and method and mobile terminal
CN101466165B (en)Method for restarting mobile communication terminal remotely
CN104010058B (en)Automatic calling method and device
US20120076282A1 (en)Telephone notification method and system, signaling monitoring unit and server
WO2013034020A1 (en)Method and device for performing event reminding on terminal devices
CN101194466A (en)Method, system and device for processing task in equipment management
CN105634867B (en)A kind of automatic control ONU start and stop method and system
EP3550931B1 (en)Use of a user equipment connected to a mobile network, in which the user equipment uses an access point name for home operator services
CN103002003A (en)System and method of remote control for machine room facilities

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
TR01Transfer of patent right

Effective date of registration:20201110

Address after:Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after:Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

Address before:201600 Shanghai city Songjiang District Sixian Road No. 3666

Patentee before:Phicomm (Shanghai) Co.,Ltd.

TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20220225

Address after:522, floor 5, No. 56, dongxinglong street, Dongcheng District, Beijing 100010

Patentee after:Beijing blue galaxy Terminal Technology Co.,Ltd.

Address before:Room 10242, No. 260, Jiangshu Road, Xixing street, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before:Hangzhou Jiji Intellectual Property Operation Co.,Ltd.

TR01Transfer of patent right
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20191022

CF01Termination of patent right due to non-payment of annual fee

[8]ページ先頭

©2009-2025 Movatter.jp