CN1282926C - Positioning method of recording general progress anomal recede using sharing core-object - Google Patents

Positioning method of recording general progress anomal recede using sharing core-object Download PDF

Info

Publication number
CN1282926C
CN1282926C CN 02126795 CN02126795A CN1282926C CN 1282926 C CN1282926 C CN 1282926C CN 02126795 CN02126795 CN 02126795 CN 02126795 A CN02126795 A CN 02126795A CN 1282926 C CN1282926 C CN 1282926C
Authority
CN
China
Prior art keywords
common process
shared drive
information
drive object
common
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.)
Expired - Fee Related
Application number
CN 02126795
Other languages
Chinese (zh)
Other versions
CN1470992A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 02126795 priority Critical patent/CN1282926C/en
Publication of CN1470992A publication Critical patent/CN1470992A/en
Application granted granted Critical
Publication of CN1282926C publication Critical patent/CN1282926C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention relates to a positioning method by utilizing a shared memory object to record the abnormal receding of common process. The shared memory object uses a loop type buffer zone form to directly record the current latest information of each common process. The monitoring process and the common process are set to carry out timing handshake to judge whether the common process recedes or not, which is convenient to solve the positioning problem of the abnormal receding of the process. In addition, as the shared memory object uses the loop type buffer region form to store information, the stored information amount can be greatly reduced, the memory expense is reduced, and the operation speed is increased.

Description

A kind of localization method to utilizing the common process exception of shared drive object record to withdraw from
Technical field
The present invention relates to the localization method that common process exception withdraws from, be specifically related to utilize the method for the locating information that the common process exception of shared drive object record withdraws from.
Background technology
Often have in the product development that system or common process withdraw from suddenly, abortive situation, withdraw from because common process is whole, do not preserve effective information, prior art lacks the method for a kind of effective debugging and orientation problem to this.
In time sharing operating system commonly used at present, between common process, all realize common interprocess communication in the mode that shared drive is provided.Characteristics of shared drive are that relevant information can't be eliminated when one of them common process withdraws from, so we can adopt the mode of writing shared drive, write down the information that is write down before common process withdraws from, and make things convenient for orientation problem.
The mode of orientation problem commonly used has two kinds at present: a kind of is to come the analyzing and positioning problem by the core file of analyzing after common process withdraws from, the shortcoming of this method is to analyze to need suitable professional knowledge, simultaneously because core file is operating system generation automatically, the programmer does not have control, can not control and write down which content.Also having a kind of way commonly used is the log file, but because we do not know where can go wrong in advance, so for effectively and all sidedly problem analysis, the quantity of information of record will be very big, the expense of log file is also very big simultaneously.And then can have a strong impact on the speed of system.
Summary of the invention
Purpose of the present invention is cut the localization method to utilizing the common process exception of shared drive object record to withdraw from easy to use soon for a kind of speed is provided.
To achieve these goals, the present invention has taked following technical scheme:
A kind of localization method to utilizing the common process exception of shared drive object record to withdraw from is characterized in that this method may further comprise the steps:
One, be provided with and start monitoring process, monitoring process waits for that common process registers to it;
Two, start each common process and to monitoring process registration, the back of succeeding in registration is distributed the shared drive object of a single-piece (Singleton) pattern respectively for each common process, each common process shared drive object initialization shared drive corresponding with it;
Three, common process is write shared drive record operation information, and whether the method real-time judge of utilizing monitoring process and common process regularly to shake hands has common process exception to withdraw from, if having, and execution in step four;
Four, monitoring process is read this shared drive object information that withdraws from common process correspondence unusually, and this shared drive object information that withdraws from common process correspondence unusually is dumped in the file, closes the shared drive object that this withdraws from common process correspondence unusually;
Five, monitoring process is reported the common process that withdraws from unusually to the client, and the message file of dump is reported to the client.
The method that common process is write shared drive record operation information in the described step 3 also further comprises:
(1) common process is write the shared drive object, charges to up-to-date operation information;
(2) the shared drive object utilizes ring-like buffer zone that the up-to-date information that writes is covered the information that writes in the past, writes down the up-to-date information of each common process.
Whether the method real-time judge of utilizing monitoring process and common process regularly to shake hands in the described step 3 has method that common process exception withdraws from regularly to shake hands for monitoring process and common process, the failure if continuous several times is shaken hands, then judging has common process exception to withdraw from.
Since adopted technique scheme, so the present invention has the following advantages:
1, because the information of shared drive object record is not system's generation automatically, readable strong, make things convenient for the location, thereby solved the existing technical matters that is not easy to locate to utilizing localization method that the common process exception of shared drive object record withdraws to need suitable professional knowledge.
2, because the shared drive object adopts the form of ring-like buffer zone to come preservation information, the quantity of information of preservation is reduced greatly, reduced internal memory cost, improved travelling speed.
3, can adopt the technology of plug-in mounting output statement, write down the entrance and exit information of all function calls.
Description of drawings
Fig. 1 is the overall flow figure of the specific embodiment of the invention.
Embodiment:
As shown in Figure 1, a kind of localization method to utilizing the common process exception of shared drive object record to withdraw from may further comprise the steps:
One, be provided with and start monitoring process, monitoring process waits for that common process registers to it;
Two, start each common process and to monitoring process registration, the back of succeeding in registration is distributed the shared drive object of a Singleton (single-piece) pattern respectively for each common process, each common process shared drive object initialization shared drive corresponding with it;
Three, common process is write the shared drive object, charges to up-to-date operation information; The shared drive object utilizes ring-like buffer zone that the up-to-date information that writes is covered the information that writes in the past, write down the up-to-date information of each common process, whether the method real-time judge of utilizing monitoring process and common process regularly to shake hands has common process exception to withdraw from, be that monitoring process and common process are regularly shaken hands, the failure if continuous several times is shaken hands, then judging has common process exception to withdraw from.If have, execution in step four;
Four, monitoring process is read this shared drive object information that withdraws from common process correspondence unusually, and this shared drive object information that withdraws from common process correspondence unusually is dumped in the file, closes the shared drive object that this withdraws from common process correspondence unusually;
Five, monitoring process is reported the common process that withdraws from unusually to the client, and the message file of dump is reported to the client, and having common process exception to withdraw to client report can be in the mode of graphical interfaces and alarm to user report.
In the concrete implementation procedure, be also noted that following problems:
At first start monitoring process, then other common process initiations and register to monitoring process.In this process,, when starting, be responsible for initialization shared drive object by this common process to shared drive object of each common process definition, and the necessary information of record.Because in the use of reality, the information that just that a bit of time before common process withdraws from that really needs writes down, therefore shared drive is used around mode, be about to shared drive and be divided into the buffer zone that can hold hundreds of bar message size, and stipulate that the up-to-date content that writes covers the content that writes in the past and deposit current writing position in article one message, and then know which bar is up-to-date writing into when guaranteeing to read, which bar is the oldest.
Monitoring process and other common processes will constantly shake hands (both sides set up the process of communicating by letter), if monitoring process is not received the handshake of a common process continuously for several times, just can judge that this common process exception withdraws from, the number of times of failing of shaking hands continuously can be set as required, as being set to twice, also can be set at three times or repeatedly.This moment, monitoring process will be responsible for reading the information in the shared drive of this common process correspondence, and in these memory dumps to one file, close shared drive, be responsible for having a common process exception to withdraw from simultaneously, and give the user report information of noting to user report.
In the actual use, if a large amount of hand-kept function calls information, so with regard to the shortcoming of efficient low and difficult location, the output of adopting the mode of source code plug-in mounting to come organizational information in the present invention, source code is carried out comprehensive plug-in mounting, the entrance and exit of each function is all carried out the plug-in mounting output statement.When common process takes place to withdraw from unusually, drop out common process and withdraw from preceding output information like this, just can find the function call process before common process withdraws from an easy rate, make things convenient for the location of problem.
Adopt the method for shared drive, its emphasis is that the execution speed to common process can not have tangible influence, because therefore our recorded information all the time in normal operational process must be guaranteed the influence of normal system as much as possible little.If to the far-reaching words of the travelling speed of system, method just can not be applied in the actual system in this.Therefore in the use of reality, performance optimization be must carry out, very right execution speed and smaller system overhead guaranteed.
Because present operating system is supported the mechanism of multithreading, therefore just exist a plurality of threads to write the possibility of shared drive simultaneously, if do not carry out certain synchronisation measures, it is inconsistent to cause that data take place, and produces serious run time error.But locking is a very large expense synchronously, very big to whole travelling speed influence, and through actual test, only locking will cause expense to increase being twice, so whether our idea is to be determined by parameter adding when being locked in the initialization shared drive.If the program of multithreading then must lock, if single-threaded program, just never call in the process of implementation and added latching operation.
Also having the thing of a needs decision is whether the row of writing shared drive is needed to add restriction, is can write the content of random length or can only write relatively shorter content.If write very long content, when writing shared drive, carry out branch so again and still simply block.Should carry out branch in theory, like this can guarantee information complete, but this part is the code of speed particular importance, if carry out the words of branch line operate, also can influence program implementation speed to a certain extent, testing according to reality approximately to influence 5% to 10%.In the actual implementation procedure, we also allow the user keep the right of selection, can decision whether realize branch when common process initialization shared drive.
In order to ensure in each common process a shared drive object being arranged, the shared drive object should be realized with single-piece Singleton pattern, this object has static member's function instance, all operations to this object all realize by the instance function interface, guarantee to have a unique example.

Claims (2)

1, a kind of localization method to utilizing the common process exception of shared drive object record to withdraw from is characterized in that, may further comprise the steps:
One, be provided with and start monitoring process, monitoring process waits for that common process registers to it;
Two, start each common process and to monitoring process registration, the back of succeeding in registration is distributed the shared drive object of a Singleton Pattern, each common process shared drive object initialization shared drive corresponding with it respectively for each common process;
Three, common process is write shared drive record operation information, and whether the method real-time judge of utilizing monitoring process and common process regularly to shake hands has common process exception to withdraw from, if having, and execution in step four, if do not have, execution in step five;
Four, monitoring process is read this shared drive object information that withdraws from common process correspondence unusually, and this shared drive object information that withdraws from common process correspondence unusually is dumped in the file, closes the shared drive object that this withdraws from common process correspondence unusually;
Five, monitoring process is reported the common process that withdraws from unusually to the client, and the message file of dump is reported to the client;
The method that common process is write shared drive record operation information in the described step 3 also further comprises:
(1) common process is write the shared drive object, charges to up-to-date operation information;
(2) the shared drive object utilizes ring-like buffer zone that the up-to-date information that writes is covered the information that writes in the past, writes down the up-to-date information of each common process;
Whether the method real-time judge of utilizing monitoring process and common process regularly to shake hands in the described step 3 has method that common process exception withdraws from regularly to shake hands for monitoring process and common process, the failure if continuous several times is shaken hands, then judging has common process exception to withdraw from.
2, the localization method to utilizing the common process exception of shared drive object record to withdraw from according to claim 1 is characterized in that, having common process exception to withdraw to client report in the described step 5 can be in the mode of graphical interfaces and alarm to user report.
CN 02126795 2002-07-23 2002-07-23 Positioning method of recording general progress anomal recede using sharing core-object Expired - Fee Related CN1282926C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 02126795 CN1282926C (en) 2002-07-23 2002-07-23 Positioning method of recording general progress anomal recede using sharing core-object

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 02126795 CN1282926C (en) 2002-07-23 2002-07-23 Positioning method of recording general progress anomal recede using sharing core-object

Publications (2)

Publication Number Publication Date
CN1470992A CN1470992A (en) 2004-01-28
CN1282926C true CN1282926C (en) 2006-11-01

Family

ID=34143396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 02126795 Expired - Fee Related CN1282926C (en) 2002-07-23 2002-07-23 Positioning method of recording general progress anomal recede using sharing core-object

Country Status (1)

Country Link
CN (1) CN1282926C (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100555228C (en) * 2006-11-08 2009-10-28 中兴通讯股份有限公司 A kind of method for supervising of embedded LINUX applications progress
CN101373461B (en) * 2003-03-19 2010-12-08 松下电器产业株式会社 Data sharing device, method for sharing data in processor

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100359483C (en) * 2004-08-27 2008-01-02 华为技术有限公司 Background monitoring system and method thereof
CN100454241C (en) * 2006-02-28 2009-01-21 华为技术有限公司 Method and device for storing C++ object in shared memory
CN101166334B (en) * 2006-10-18 2010-06-09 中兴通讯股份有限公司 Method for remote RF unit to record information in radio communication system
CN101290587B (en) * 2008-06-12 2010-06-16 中兴通讯股份有限公司 Realization progress start-up and control process
CN102087612B (en) * 2009-12-03 2015-05-20 腾讯科技(深圳)有限公司 Method and device for acquiring process key data
CN102129502B (en) * 2011-04-26 2012-10-24 广东省电力设计研究院 Optimal electrical power line selection method and system
CN103150226A (en) * 2013-04-01 2013-06-12 山东鲁能软件技术有限公司 Abnormal dump and recovery system for computer model and dump and recovery method thereof
CN104537074A (en) * 2014-12-31 2015-04-22 天津南大通用数据技术股份有限公司 Method for improving log writing property of database system
CN106708705B (en) * 2015-07-15 2020-06-16 腾讯科技(深圳)有限公司 Terminal background process monitoring method and system
CN106681651A (en) * 2016-05-05 2017-05-17 安徽南瑞继远电网技术有限公司 Log management system design method of two-stage buffer mechanism

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373461B (en) * 2003-03-19 2010-12-08 松下电器产业株式会社 Data sharing device, method for sharing data in processor
CN100555228C (en) * 2006-11-08 2009-10-28 中兴通讯股份有限公司 A kind of method for supervising of embedded LINUX applications progress

Also Published As

Publication number Publication date
CN1470992A (en) 2004-01-28

Similar Documents

Publication Publication Date Title
CN1282926C (en) Positioning method of recording general progress anomal recede using sharing core-object
CN109643273B (en) Computer system, method, hardware storage device for recording playable traces
EP3382551B1 (en) Distributed hardware tracing
US5802272A (en) Method and apparatus for tracing unpredictable execution flows in a trace buffer of a high-speed computer system
US8418149B2 (en) Differential comparison system and method
US20040153999A1 (en) System and method for managing operating systems
US20170061304A1 (en) Three-dimensional chip-based regular expression scanner
Netzer et al. Debugging race conditions in message-passing programs
CN106462484A (en) Distributed stream processing in the cloud
CA2625533A1 (en) A generic multiinstance method and gui detection system for tracking and monitoring computer applications
US5333304A (en) Method and apparatus for software application evaluation utilizing compiler applications
CN1282085C (en) Method of parallel regulating multi-task of imbedding system
EP4036737A1 (en) Cache-based tracing for time travel debugging and analysis
US7493615B2 (en) Apparatus and method for synchronizing multiple threads in an out-of-order microprocessor
CN1400529A (en) Fault location method of real-time embedding system
CA2383832A1 (en) System and method for intelligent trap analysis
JPH04229340A (en) Debug system of common-memory multiprocessor computer
US20070150866A1 (en) Displaying parameters associated with call statements
Leu et al. Efficient execution replay technique for distributed memory architectures
CN1180551C (en) Fault location method of program mode
Heikkinen et al. LOGDIG log file analyzer for mining expected behavior from log files.
Ronsse et al. Rolt/sup MP/-replay of Lamport timestamps for message passing systems
Wagner et al. Runtime message uniquification for accurate communication analysis on incomplete MPI event traces
CN1356634A (en) Method and device for automatically recording and reproducing operation path on simulator
CN1779655A (en) Automatic alarm testing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20061101

Termination date: 20160723