CN105227399A - Based on network equipment Debugging message acquisition methods and the system of User space - Google Patents

Based on network equipment Debugging message acquisition methods and the system of User space Download PDF

Info

Publication number
CN105227399A
CN105227399A CN201510575353.9A CN201510575353A CN105227399A CN 105227399 A CN105227399 A CN 105227399A CN 201510575353 A CN201510575353 A CN 201510575353A CN 105227399 A CN105227399 A CN 105227399A
Authority
CN
China
Prior art keywords
debugging message
instruction
function
process function
user
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
CN201510575353.9A
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.)
Opzoon Technology Co Ltd
Original Assignee
Opzoon 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 Opzoon Technology Co Ltd filed Critical Opzoon Technology Co Ltd
Priority to CN201510575353.9A priority Critical patent/CN105227399A/en
Publication of CN105227399A publication Critical patent/CN105227399A/en
Pending legal-status Critical Current

Links

Abstract

The present invention relates to a kind of network equipment Debugging message acquisition methods based on User space and system, how in the debug process of the network equipment, to reduce the problem linking up cost and workload to solve.The method comprises: the Debugging message of S1, reception user input obtains instruction; S2, call to obtain with described Debugging message instruction corresponding first process function; S3, utilize described first process function obtain fault location Debugging message; S4, described fault location Debugging message to be exported successively.Present invention achieves the function that an instruction or a key obtain a large amount of Debugging message.Like this, avoid the support that front-end person who needs to check handbook or need rear end research staff in debug process, nor need to input debug command one by one, therefore the present invention had both decreased communication cost, also reduced workload.

Description

Based on network equipment Debugging message acquisition methods and the system of User space
Technical field
The present invention relates to network equipment debugging field, be specifically related to a kind of network equipment Debugging message acquisition methods based on User space and system.
Background technology
The existing network equipment, such as fire compartment wall, switch etc., generally have debugging mode and debug pattern.This pattern is the debugging method that when network equipment goes wrong in existing network environment, front-end person who often adopts, mode mainly through debug command supplies problem onsite application, after inputting different debug commands, corresponding Debugging message just can be printed directly to serial ports or show to user interface.But when needing to check a large amount of Debugging message, the quantity of debug command is various badly again to be remembered, this is a kind of burden concerning front-end person who.Therefore need the support of rear end research staff or check handbook, and then inputting corresponding debug command one by one, not only need to link up cost, and workload being large.
In some cases, front-end person who needs to copy and paste into file by being printed to serial ports or display to the Debugging message of user interface and issue rear end research staff, and rear end research staff positions produced problem according to the Debugging message in file.But the network equipment is not supported to copy stickup spanned file in some cases, such as, use equipment USB interface to connect the operation of display, the positioning problems of rear end research staff is impacted.
Summary of the invention
Technical problem to be solved by this invention how to reduce workload in network equipment debug process and links up cost.
Solve the problems of the technologies described above, the present invention proposes a kind of network equipment Debugging message acquisition methods based on User space and system.
Based on a network equipment Debugging message acquisition methods for User space, comprising:
The Debugging message of S1, reception user input obtains instruction;
S2, call to obtain with described Debugging message instruction corresponding first process function;
S3, utilize described first process function obtain fault location Debugging message;
S4, described fault location Debugging message to be exported successively.
Preferably, described step S3, utilize described first process function obtain required Debugging message, be specially: the collection order corresponding to each Debugging message in the Debugging message preset is sent to corresponding processing unit in the network equipment, performed by described processing unit and collect order accordingly, obtain described fault location Debugging message.
Preferably, also comprise:
S5, in storage medium, generate Debugging message collect file, and described fault location Debugging message to be write in described examination information file successively by output order.
Preferably, also comprise after step s 5:
The Debugging message receiving user's input derives instruction;
Call to derive with described Debugging message instruction corresponding second process function;
Utilize this second process function to derive described Debugging message and collect file.
Preferably, also comprise after step s 5:
Receive the Debugging message delete instruction of user's input;
Call the corresponding with described Debugging message delete instruction the 3rd and process function;
Utilize described 3rd process function to delete described Debugging message and collect file.
Network equipment Debugging message based on User space obtains a system, comprising:
Receiver module, obtains instruction for the Debugging message receiving user's input;
Calling module, for call to obtain with described Debugging message instruction corresponding first process function;
Processing module, obtains fault location Debugging message for utilizing described first process function;
Output module, exports successively for just described fault location Debugging message.
Preferably, described output module exports an END instruction after also exporting for all Debugging message.
Preferably, also comprise:
Writing module, collects file for generating Debugging message in storage medium, and described fault location Debugging message and END instruction is write successively in described examination information file by output order.
Based on a network equipment Debugging message acquisition methods for User space, comprising:
Setting data plane, control plane and user plane in the network device;
Wherein, user plane is responsible for the instruction and the output execution result that receive user's input; Control plane is used for resolving the instruction of user's input, and calls corresponding process function and the process of partial data according to resolving content; Datum plane is responsible for the process of data;
When user inputs a processing instruction, user plane receives described processing instruction, and described processing instruction is issued to control plane;
Control plane is resolved described processing instruction, calls and processes function accordingly, and described process function is issued to datum plane according to the content after parsing;
Datum plane carries out corresponding process according to described process function;
Wherein, described calling according to the content after parsing processes function accordingly, is specially: if learn that the object of described processing instruction is for obtaining Debugging message, then call the function relevant to obtaining Debugging message according to the content after resolving, i.e. the first process function; If learn that the object of described processing instruction derives Debugging message according to the content after resolving, then call the function relevant to deriving Debugging message, i.e. the second process function; If learn that the object of described processing instruction deletes Debugging message according to the content after resolving, then call the function relevant to deleting Debugging message, i.e. the 3rd process function.
Present invention achieves the function that an instruction or a key obtain a large amount of Debugging message.Like this, avoid the support that front-end person who needs to check handbook or need rear end research staff in debug process, adopt and transfer relevant Debugging message.Nor need to input debug command one by one, therefore the present invention had both decreased communication cost, also reduced workload.
Accompanying drawing explanation
Can understanding the features and advantages of the present invention clearly by reference to accompanying drawing, accompanying drawing is schematic and should not be construed as and carry out any restriction to the present invention, in the accompanying drawings:
Fig. 1 shows the schematic flow sheet according to network equipment Debugging message acquisition methods one embodiment that the present invention is based on User space;
Fig. 2 shows the structured flowchart obtaining system one embodiment according to the network equipment Debugging message that the present invention is based on User space.
Embodiment
In order to more clearly understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.It should be noted that, when not conflicting, the feature in the embodiment of the application and embodiment can combine mutually.
Set forth a lot of detail in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not by the restriction of following public specific embodiment.
The invention provides a kind of network equipment Debugging message acquisition methods based on User space, as shown in Figure 1, the method comprises:
The Debugging message of S1, reception user input obtains instruction;
S2, call to obtain with described Debugging message instruction corresponding first process function;
S3, utilize described first process function obtain fault location Debugging message;
S4, described fault location Debugging message to be exported successively.
In step S1, the network equipment can receive Debugging message and obtain instruction in the following two cases: user directly can obtain instruction, such as debuginfocollect at the user interface input Debugging message of the network equipment.Or, have a button at UI Preferences, when triggering this button, being just equivalent to have input Debugging message and obtaining instruction.
In step S3, described first process function is utilized to obtain required Debugging message, be specially: the collection order in the Debugging message preset corresponding to each Debugging message is sent to corresponding processing unit in the network equipment, described processing unit performs and collects order accordingly, obtains described fault location Debugging message.
In step S4, fault location Debugging message can be exported to the serial ports of PC, fault location Debugging message is presented at this serial ports.Or, the user interface that fault location Debugging message exports the network equipment to is shown.
With an example technique scheme made an explanation below or illustrate, should be appreciated that this example is not the restriction of the protection range to above technical scheme.
In the network device, such as fire compartment wall, setting data plane (dateplane is called for short dp), control plane (controlplane is called for short cp) and user plane (userplane is called for short up).Wherein, user plane is responsible for the instruction of reception user input and is exported execution result etc.Control plane is used for resolving the instruction of user's input, and calls corresponding process function according to resolving content, and the process of partial data.Datum plane is responsible for the process of data.
When user inputs a processing instruction, user plane receives this processing instruction, and this processing instruction is issued to control plane.Control plane is resolved this processing instruction, calls and processes function accordingly, and described process function is issued to datum plane according to the content after parsing.If learn that the object of this processing instruction is for obtaining Debugging message according to the content after resolving, namely this processing instruction is that Debugging message obtains instruction, then call the function relevant to obtaining Debugging message, i.e. the first process function.If learn that the object of this processing instruction derives Debugging message according to the content after resolving, then namely this processing instruction is that Debugging message derives instruction, then call the function relevant to deriving Debugging message, i.e. the second process function.If learn that the object of this processing instruction deletes Debugging message according to the content after resolving, namely this processing instruction is Debugging message delete instruction, then call the function relevant to deleting Debugging message, i.e. the 3rd process function.Datum plane carries out corresponding process according to this process function.The present invention can write processing command in advance and process function accordingly, is convenient to judge the type of processing command and calls relevant function.The acquisition (debuginfocollect) that processing command mainly comprises Debugging message is deleted (debuginfodelete) and derives orders such as (debuginfoexport).
When the processing instruction that user plane receives is Debugging message acquisition instruction, the collection order (such as showmemory, showcpuusage etc.) corresponding to the Debugging message needing to collect is sent to corresponding processing unit by control plane successively.The collection order at this place is extendible, and research staff adds the collection order corresponding to Debugging message needed according to the actual requirement of self poisoning problem.Therefore in the present invention, go for any Debugging message, just can send the collection order corresponding to this Debugging message.Collection order corresponding to Debugging message is different, and its address be sent out is also just different.Such as, when the collection order corresponding to Debugging message is for collecting CPU usage, control plane needs to be issued to datum plane through this collection order, after datum plane performs corresponding action, obtain CPU usage, and CPU usage is sent to control plane, then CPU usage is sent to user plane by control plane again, and namely user can learn CPU usage.Here processing unit is datum plane.
By above analysis, known the present invention can realize the function that an instruction or a key obtain a large amount of Debugging message.Like this, avoid the support that front-end person who needs to check handbook or need rear end research staff in debug process, adopt and transfer relevant Debugging message.Nor need to input debug command one by one, therefore the present invention had both decreased communication cost, also reduced workload.
Further, for the ease of preserving and deriving Debugging message, can also continue to perform:
S5, in storage medium, generate Debugging message collect file, and the described fault location Debugging message exported in step S4 to be write in described examination information file successively by output order.
Above-mentioned steps S5 can adopt following detailed process to realize:
Write operation flag bit flag1 is set, when receiving Debugging message and obtaining instruction, utilizes open function in storage medium, create a file, flag1 is put 1.Then will to obtain in step S4 and the Debugging message exported is written in the file that creates in storage medium by writing function.After all Debugging message all write the file created in storage medium, flag1 is set to 0, close this article part by close function simultaneously.This process can be performed by above-mentioned user plane.
Wherein, the storage medium of storage medium preferably power down not lost content.
Wherein, the title creating file in storage medium can be determined by following manner:
To connect out the title of Debugging message spanned file, such as debug_info_2015-05-06_18:12:22 according to the time of current time zone, be convenient to be distinguished or judge.Specifically can utilize in control plane and obtain the time that the corresponding process function of instruction obtains current time zone with Debugging message.
Collection order corresponding to all Debugging message preset all be sent in the network equipment after corresponding processing unit, send an END instruction, this END instruction available characters represents, such as " & * " etc., terminate process of transmitting.After obtaining corresponding Debugging message after order is collected in execution, exported by corresponding Debugging message, the output of each Debugging message exports one by one according to the corresponding former sending order collecting order.After all Debugging message export successively, END instruction is exported.Information due to all output all writes in the Debugging message spanned file in storage medium, and therefore, after all Debugging message write Debugging message spanned file successively, this END instruction also writes in Debugging message spanned file.Now, all Debugging message have write the file created in storage medium all following means can be adopted to judge whether:
While when performing write operation, whether the information detecting write is END instruction, when END instruction being detected, then thinks that Debugging message is collected complete, is set to 0 by flag1.
In addition, when the processing instruction of user's input is Debugging message delete instruction, the network equipment receives Debugging message delete instruction, then call the function relevant to deleting Debugging message, i.e. the 3rd process function, utilizes this function to delete Debugging message and collects file.Such as, system function is adopted to issue " rm-rfdebug_info* " order.
When the processing instruction of user's input is Debugging message derivation instruction, the network equipment receives Debugging message and derives instruction, then call the function relevant to deriving Debugging message, i.e. the second process function, and utilizes this function derivation Debugging message to collect file.Such as, derived by ftp or http mode.
Certainly, for the running situation needing timing monitor network equipment, or just there will be fault needs timing detection for a long time so that orientation problem, then regularly or periodically can call Debugging message and obtain function, realize the work of timing or periodicity acquisition Debugging message.Even, the Debugging message of timing acquisition can be sent to server, be sent to remote monitor device by server, utilize remote monitor device to realize remote monitoring or debugging.
The present invention also provides a kind of network equipment Debugging message based on User space to obtain system, and as shown in Figure 2, this system 100 comprises:
Receiver module 101, obtains instruction for the Debugging message receiving user's input;
Calling module 102, for call to obtain with described Debugging message instruction corresponding first process function;
Processing module 103, obtains fault location Debugging message for utilizing described first process function;
Output module 104, exports successively for just described fault location Debugging message.
Further, described output module 104 exports an END instruction after also exporting for all Debugging message.
Further, this system 100 also comprises:
Writing module 105, collects file for generating Debugging message in storage medium, and described fault location Debugging message and END instruction is write successively in described examination information file by output order.
The network equipment Debugging message that the present invention is based on User space obtains the function structure module that system is the network equipment Debugging message acquisition methods that the present invention is based on User space, the explanation of its relevant portion, explanation and beneficial effect etc., please refer to the appropriate section of the network equipment Debugging message acquisition methods that the present invention is based on User space, repeat no more here.
In sum, the network equipment Debugging message acquisition methods and the system that the present invention is based on User space have the following advantages:
The present invention can realize the function of a key or an order acquisition Debugging message, makes front-end person who need not check handbook when debugging network equipment, does not also need the technical support of rear end research staff, more do not need to input instruction one by one.Cost and workload is linked up because this reducing.
More than be described with reference to the accompanying drawings technical scheme of the present invention, consider the problem that in prior art, residual multiple users interference brings.By technical scheme of the present invention, residual multiple users interference can be reduced, thus reduce its various problems brought.
In the present invention, term " first ", " second ", " the 3rd " only for describing object, and can not be interpreted as instruction or hint relative importance.Term " multiple " refers to two or more, unless otherwise clear and definite restriction.
Although describe embodiments of the present invention by reference to the accompanying drawings, but those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, such amendment and modification all fall into by within claims limited range.

Claims (9)

1., based on a network equipment Debugging message acquisition methods for User space, it is characterized in that, comprising:
The Debugging message of S1, reception user input obtains instruction;
S2, call to obtain with described Debugging message instruction corresponding first process function;
S3, utilize described first process function obtain fault location Debugging message;
S4, described fault location Debugging message to be exported successively.
2. method according to claim 1, it is characterized in that, described step S3, utilize described first process function obtain required Debugging message, be specially: the collection order corresponding to each Debugging message in the Debugging message preset is sent to corresponding processing unit in the network equipment, performed by described processing unit and collect order accordingly, obtain described fault location Debugging message.
3. method according to claim 2, is characterized in that, also comprises:
S5, in storage medium, generate Debugging message collect file, and described fault location Debugging message to be write in described examination information file successively by output order.
4. method according to claim 3, is characterized in that, also comprises after step s 5:
The Debugging message receiving user's input derives instruction;
Call to derive with described Debugging message instruction corresponding second process function;
Utilize this second process function to derive described Debugging message and collect file.
5. method according to claim 3, is characterized in that, also comprises after step s 5:
Receive the Debugging message delete instruction of user's input;
Call the corresponding with described Debugging message delete instruction the 3rd and process function;
Utilize described 3rd process function to delete described Debugging message and collect file.
6. the network equipment Debugging message based on User space obtains a system, it is characterized in that, comprising:
Receiver module, obtains instruction for the Debugging message receiving user's input;
Calling module, for call to obtain with described Debugging message instruction corresponding first process function;
Processing module, obtains fault location Debugging message for utilizing described first process function;
Output module, exports successively for just described fault location Debugging message.
7. system according to claim 6, is characterized in that, described output module exports an END instruction after also exporting for all Debugging message.
8. system according to claim 7, is characterized in that, also comprises:
Writing module, collects file for generating Debugging message in storage medium, and described fault location Debugging message and END instruction is write successively in described examination information file by output order.
9., based on a network equipment Debugging message acquisition methods for User space, it is characterized in that, comprising:
Setting data plane, control plane and user plane in the network device;
Wherein, user plane is responsible for the instruction and the output execution result that receive user's input; Control plane is used for resolving the instruction of user's input, and calls corresponding process function and the process of partial data according to resolving content; Datum plane is responsible for the process of data;
When user inputs a processing instruction, user plane receives described processing instruction, and described processing instruction is issued to control plane;
Control plane is resolved described processing instruction, calls and processes function accordingly, and described process function is issued to datum plane according to the content after parsing;
Datum plane carries out corresponding process according to described process function;
Wherein, described calling according to the content after parsing processes function accordingly, is specially: if learn that the object of described processing instruction is for obtaining Debugging message, then call the function relevant to obtaining Debugging message according to the content after resolving, i.e. the first process function; If learn that the object of described processing instruction derives Debugging message according to the content after resolving, then call the function relevant to deriving Debugging message, i.e. the second process function; If learn that the object of described processing instruction deletes Debugging message according to the content after resolving, then call the function relevant to deleting Debugging message, i.e. the 3rd process function.
CN201510575353.9A 2015-09-10 2015-09-10 Based on network equipment Debugging message acquisition methods and the system of User space Pending CN105227399A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510575353.9A CN105227399A (en) 2015-09-10 2015-09-10 Based on network equipment Debugging message acquisition methods and the system of User space

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510575353.9A CN105227399A (en) 2015-09-10 2015-09-10 Based on network equipment Debugging message acquisition methods and the system of User space

Publications (1)

Publication Number Publication Date
CN105227399A true CN105227399A (en) 2016-01-06

Family

ID=54996109

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510575353.9A Pending CN105227399A (en) 2015-09-10 2015-09-10 Based on network equipment Debugging message acquisition methods and the system of User space

Country Status (1)

Country Link
CN (1) CN105227399A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105681410A (en) * 2016-01-07 2016-06-15 深圳市金证科技股份有限公司 Debugging information tracking and logging method and device
CN106506644A (en) * 2016-11-07 2017-03-15 深圳市共进电子股份有限公司 Terminal Debugging message collection method and system
CN107070694A (en) * 2017-01-16 2017-08-18 重庆金美通信有限责任公司 A kind of method in distributed communication network medium-long range batch debugging route-exchanging device
CN108897654A (en) * 2018-07-18 2018-11-27 北京中科网威信息技术有限公司 A kind of method and device of the acquisition Debugging message based on Shen prestige framework
CN112269701A (en) * 2020-11-11 2021-01-26 深圳创维-Rgb电子有限公司 User side debugging method, user side and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101083569A (en) * 2007-07-06 2007-12-05 中兴通讯股份有限公司 Router auxiliary debug system
CN102073489A (en) * 2009-11-23 2011-05-25 新奥特(北京)视频技术有限公司 Method and device for generating debug log
CN102355368A (en) * 2011-10-08 2012-02-15 大连环宇移动科技有限公司 Fault processing method of network equipment and system
CN104598202A (en) * 2014-12-26 2015-05-06 曙光信息产业股份有限公司 Command line management device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101083569A (en) * 2007-07-06 2007-12-05 中兴通讯股份有限公司 Router auxiliary debug system
CN102073489A (en) * 2009-11-23 2011-05-25 新奥特(北京)视频技术有限公司 Method and device for generating debug log
CN102355368A (en) * 2011-10-08 2012-02-15 大连环宇移动科技有限公司 Fault processing method of network equipment and system
CN104598202A (en) * 2014-12-26 2015-05-06 曙光信息产业股份有限公司 Command line management device and method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105681410A (en) * 2016-01-07 2016-06-15 深圳市金证科技股份有限公司 Debugging information tracking and logging method and device
CN105681410B (en) * 2016-01-07 2019-07-19 深圳市金证科技股份有限公司 A kind of method and apparatus tracking and recording Debugging message
CN106506644A (en) * 2016-11-07 2017-03-15 深圳市共进电子股份有限公司 Terminal Debugging message collection method and system
CN107070694A (en) * 2017-01-16 2017-08-18 重庆金美通信有限责任公司 A kind of method in distributed communication network medium-long range batch debugging route-exchanging device
CN108897654A (en) * 2018-07-18 2018-11-27 北京中科网威信息技术有限公司 A kind of method and device of the acquisition Debugging message based on Shen prestige framework
CN112269701A (en) * 2020-11-11 2021-01-26 深圳创维-Rgb电子有限公司 User side debugging method, user side and readable storage medium

Similar Documents

Publication Publication Date Title
CN105227399A (en) Based on network equipment Debugging message acquisition methods and the system of User space
CN107592238B (en) Automatic test method and system of interface, service terminal and memory
CN105788227B (en) Fault diagnosis equipment for electricity consumption information acquisition system
CN103544100B (en) Method of testing, system and the client of portable data processing equipment application program
CN104699598A (en) Automatic testing method, device, equipment and system
CN102967815B (en) Chip testing method, automated testing equipment and system
CN105808417A (en) Automated testing method and proxy server
CN108763086A (en) Script method for recording, terminal and computer readable storage medium based on remote real machine
CN103268289B (en) Record the method and system of application testing script on mobile terminals
CN104426945B (en) A kind of method, apparatus and system obtaining application performance data
CN105204991A (en) Internet of things test method and device
CN102609472A (en) Method and system for implementing performance test of distributed database system
CN105187608A (en) Method and device obtaining power consumption of application program in mobile terminal
CN113407393A (en) Chip verification method, terminal device, verification platform and storage medium
CN103595742B (en) A method and an apparatus for debugging webpage CSS
CN104899140A (en) Test method for mobile terminal assembly
CN103473173B (en) A kind of method and device iOS system being carried out to assembly level dynamic debugging
CN112822073A (en) Test method, device, system, electronic equipment and readable storage medium
CN106383765A (en) Data monitoring method and apparatus
CN109634856A (en) IOS intelligent terminal remote real machine debugging system and method based on cloud service
CN205486730U (en) Portable data acquisition system based on bluetooth and mobile terminal
CN110992671B (en) Ammeter address forwarding method, device and system and electronic equipment
CN103595819A (en) Method for online testing service usability of web system
CN105096215A (en) Patrol record analysis method based on Android system
CN103064789A (en) Automated testing method by software control

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination