CN108959015A - Judge system or the method and apparatus whether system module blocks - Google Patents

Judge system or the method and apparatus whether system module blocks Download PDF

Info

Publication number
CN108959015A
CN108959015A CN201710356948.4A CN201710356948A CN108959015A CN 108959015 A CN108959015 A CN 108959015A CN 201710356948 A CN201710356948 A CN 201710356948A CN 108959015 A CN108959015 A CN 108959015A
Authority
CN
China
Prior art keywords
module
counter
value
system module
carries out
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
CN201710356948.4A
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 Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710356948.4A priority Critical patent/CN108959015A/en
Publication of CN108959015A publication Critical patent/CN108959015A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data

Abstract

The present invention provides a kind of method and apparatus for judging system or system module and whether blocking, it can simply and effectively judge the thread block situation of system or system module, can monitoring system is overall and the performance of each module, and judgement can be realized in the case where extremely low performance is lost.This method comprises: counter is arranged in system or system module;Each system module is performed, and is carried out to the counter plus 1 operation, if the system module does not block, carries out subtracting 1 operation to the counter;If the value of the counter is higher than threshold value, judge the system or system module for the system of obstruction or system module.

Description

Judge system or the method and apparatus whether system module blocks
Technical field
The present invention relates to field of computer technology more particularly to a kind of methods for judging system or system module and whether blocking And device.
Background technique
The features such as general Large-Scale Interconnected net application suffers from high concurrent, mass users, distributed structure/architecture, system can be comprising very Multi-tool block, many submodules can be related to use, distributed queue, RPC far call, distributed data base of various locks etc. Operation.So quickly judging that backstage performance issue becomes particularly important, i.e., once Caton occurs for service, such as low-response, time-out The problems such as, need quickly to judge which system sub-modules there is a problem.
The time difference that prior art usage log frame (Apache Log4j etc.) Method of printing executes, by system day The execution time difference of each module is searched in will to judge problem module.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
1. reaching day PV (Page View) for the website of high concurrent, mass users access is necessarily even more than one hundred million, backstage is big When the record operation of scale, log can cause to be lost to systematic entirety.
2. the performance-relevant information that needs are filtered out from the system log of magnanimity be it is highly difficult, when necessary even need Category filter is carried out by backstage batch processing system even real-time system.
3. can not simple, intuitive reflection current system overall performance.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus for judging system or system module and whether blocking, It can simply and effectively judge the thread block situation of system or system module, it can monitoring system be overall and the property of each module Can, and judgement can be realized in the case where extremely low performance is lost.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of judgement system or system mould are provided The method whether block blocks.
A kind of method for judging whether system or system module block of the embodiment of the present invention includes: in system or system module Interior setting counter;Each system module is performed, and carries out to the counter plus 1 operates, if the system mould Block does not block, then carries out subtracting 1 operation to the counter;If the value of the counter be higher than threshold value, judgement described in System or system module are the system or system module of obstruction.
Optionally, the counter is carried out plus 1 operation and carries out subtracting 1 operation to execute atomic operation.
Optionally, further includes: the value of counter is output to monitoring file;Wherein, sliding window or visualization circle are utilized Face shows the monitoring file.
Optionally, the system module includes: standalone module and intermediate module;Wherein, the intermediate module is to have invoked The module of other modules, the sum of the value of counter of other modules that the value of the counter of the intermediate module is called for it.
Optionally, further includes: global counter is set in system.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of judgement system or system mould are provided The device whether block blocks.
A kind of device for judging whether system or system module block of the embodiment of the present invention includes: counter setup module, For counter to be arranged in system or system module;Counting module is performed, to described for each system module Counter carries out plus 1 operation, if the system module does not block, carries out subtracting 1 operation to the counter;Judge mould Block judges the system or system module for the system or system of obstruction if the value for the counter is higher than threshold value Module.
Optionally, in the counting module, the counter is carried out plus 1 operation and carries out subtracting 1 operation to execute atom Operation.
Optionally, further includes: output module, for the value of counter to be output to monitoring file;Wherein, sliding window is utilized Mouth or visualization interface show the monitoring file.
Optionally, the system module includes: standalone module and intermediate module;Wherein, the intermediate module is to have invoked The module of other modules, the sum of the value of counter of other modules that the value of the counter of the intermediate module is called for it.
Optionally, the counter setup module is also used to: global counter being arranged in system.
To achieve the above object, according to an embodiment of the present invention in another aspect, providing a kind of realization judgement system or being The electronic equipment for the method whether system module blocks.
The a kind of electronic equipment of the embodiment of the present invention includes: one or more processors;Storage device, for storing one Or multiple programs, when one or more of programs are executed by one or more of processors, so that one or more of The method for judging system or system module and whether blocking of the processor realization embodiment of the present invention.
To achieve the above object, another aspect according to an embodiment of the present invention, provides a kind of computer-readable medium.
A kind of computer-readable medium of the embodiment of the present invention, is stored thereon with computer program, and described program is processed For realizing the side for judging system or system module and whether blocking for making the computer execute the embodiment of the present invention when device executes Method.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that because using counter is introduced, is being Each module of uniting is performed carry out global counter or the corresponding counter of each module plus 1 operation, does not send out in each module of system Raw obstruction and at the end of carry out the operation that subtracts 1 of global counter or the corresponding counter of each module, thus according to the value of counter Judge the system of obstruction or the technological means of system module, so overcoming log frame can cause to be lost to systematic entirety, And the technical issues of carrying out category filter by backstage batch processing system or real-time system is needed if necessary, and then reach reduction Complicated degree of analysis realizes the technical effect of blocking module quickly judged using extremely low resource;By background thread by counter Value be output to monitoring file, so as to intuitively reflect the performance of system and its each module;By atomic operation, thus The operation of high-performance and thread-safe may be implemented.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment With explanation.
Detailed description of the invention
Attached drawing for a better understanding of the present invention, does not constitute an undue limitation on the present invention.Wherein:
Fig. 1 is showing for the key step according to an embodiment of the present invention for judging method that whether system or system module block It is intended to;
Fig. 2 is that the counter according to an embodiment of the present invention for judging method that whether system or system module block is arranged Schematic diagram;
Fig. 3 is the stream of the method for counting according to an embodiment of the present invention for judging method that whether system or system module block Journey schematic diagram;
Fig. 4 is the visualization interface according to an embodiment of the present invention for judging method that whether system or system module block Schematic diagram;
Fig. 5 is the flow diagram of the system of judgement obstruction according to an embodiment of the present invention;
Fig. 6 is showing for the main modular according to an embodiment of the present invention for judging device that whether system or system module block It is intended to;
Fig. 7 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present application Figure.
Fig. 8 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
The technical solution of the embodiment of the present invention is by being added counter in system or each module of system, in each module of system Entrance and exit at carry out global counter or the corresponding counter of each module respectively plus the 1, operation that subtracts 1, thus and system Log overcomes the complicated degree of analysis of system log without intersection;Then further according to system or each module of system to system or this mould The congestion situations of all requests of block, obtain the value of counter, if the value of counter is higher than threshold value, judge system or corresponding There are obstructing problems for module, and value is higher, and proof obstruction is more serious, to realize choke system or system using extremely low resource The quick judgement of module.In addition, technical solution of the present invention can also export the value of all counters to monitoring file, thus intuitively Ground reflects the performance of system and each module of system.
Fig. 1 is showing for the key step according to an embodiment of the present invention for judging method that whether system or system module block It is intended to;
As shown in Figure 1, the embodiment of the present invention judges that the method whether system or system module block mainly includes as follows Step:
Step S101: counter is set in system or system module.In this step, can system standalone module, Counter is set in intermediate module or whole system.
Step S102: each system module is performed, and carries out to the counter plus 1 operates, if the system System module is not blocked, then carries out subtracting 1 operation to the counter.It in this step, can be when system module be triggered It executes counter and adds 1 operation, the counter operation that subtracts 1 is executed when system module does not block.This step carries out plus 1 operation Operation can be realized by atomic operation with subtracting 1.
Step S103: if the value of the counter is higher than threshold value, judge the system or system module for obstruction System or system module.In this step, system or system mould can be judged according to the size for the value and threshold value for comparing counter The congestion situations of block.The threshold value of this step can be set according to different system scales.
Implementation of the invention is specific as follows:
1. (counter setup module) is arranged in counter
The method of counter setting of the present invention is as follows:
Embodiment one:
Fig. 2 is that the counter according to an embodiment of the present invention for judging method that whether system or system module block is arranged Schematic diagram;
As shown in Fig. 2, application program has included 4 submodules, module count device is respectively arranged in each submodule, In the module due to the setting of module count device, so being module level, the counter of different submodules does not allow to repeat to name.
Submodule 1, submodule 3, submodule 4 be not due to calling other internal modules, so be all standalone module, in The counter in portion is separate counters.Submodule 1, submodule 3, the counter in submodule 4 only reflect its corresponding submodule Performance (thread block).
Submodule 2 is an intermediate module, it has invoked submodule 3 and submodule 4.The value of counter 2 be counter 3 with The sum of the value of counter 4.Dependence between submodule determines the relationship between counter, counter 3 or counter 4 Value increases, and the value that can all show as counter 2 increases.
Application program can there are many forms, such as: desktop application, mobile APP, WEB web station system or enterprise-oriented system Deng.
Embodiment two:
Fig. 5 is the flow diagram of the system of judgement obstruction according to an embodiment of the present invention;
In Fig. 5, system is provided with a global counter (bv).Global counter bv is arranged in system, is being All execute the plus-minus operation of global counter bv in uniting at the entrance and exit of all modules respectively, global counter is able to reflect The performance (thread block) of system.
2. counter counts (counting module)
System or system module request to be triggered (execution) according to different.
As shown in Fig. 2, browser client has accessed submodule 1 using HTTP interface, mobile APP is visited using HTTP interface Ask that submodule 2, other background services use RPC (Remote Procedure Call Protocol, remote procedure call association View) and SOCKET interface have invoked submodule 2.
Request interface can there are many, such as: HTTP interface, HTTPS interface, RPC (remote procedure call) interface, SOCKET protocol interface, Distributed Message Queue protocol interface (asynchronous call) etc..
The method that counter of the present invention counts is as follows:
Embodiment one:
Each module count device initializes in the entire application program launching stage, the initial value default value of current all counters It is 0.
Fig. 3 is the stream of the method for counting according to an embodiment of the present invention for judging method that whether system or system module block Journey schematic diagram;
As shown in figure 3, after the entrance and exit for entering module, can execute respectively the module count device plus 1 and the behaviour that subtracts 1 Make.But (" execution thread enters ready state " in figure at this time after execution module function logic blocks.The execution at this time Thread (module) temporarily concedes CPU, is in ready state (waiting is run), is possible to be run at any time.Externally performance is to be somebody's turn to do The obstruction of module, Caton.), the counter operation that subtracts 1 can be skipped, causes the value of counter that can continue to increase, the value of counter is higher That is the obstruction of proof system is more.
Each counter is the example of the included atom integer class AtomicInteger of a JDK.In high concurrent environment In, ++ i and i++ operation be not thread-safe, need to realize by synchrolock thread-safe plus, reducing, still, Synchrolock will cause system performance it is very low under.And AtomicInteger using without lock design come reach thread-safe plus, Reducing provides atomic operation instruction using hardware and realizes, provides very high performance counting operation.
Embodiment two:
As shown in figure 5, global counter bv executes global meter respectively in system at the entrance and exit of all modules Number device bv's plus the 1, operation that subtracts 1, the value of global counter bv be the Thread Count that represent whole system obstruction.
3. judging (judgment module)
Application program can open thread (or opening thread by other random procedures) on backstage, by system or The value of the counter of each module is output in a monitoring file, prints the value of primary each counter, and root at regular intervals Judge that the system or system module of obstruction, the value of counter represent corresponding system according to the value of the counter of system or each module The thread block value of system or system module, if this value is higher than set system thresholds (counter reference value), it was demonstrated that there is resistance It is more serious to be worth higher proof obstruction for plug problem.This monitoring file can be known as one " sliding window " or visualized by us Interface.
The reference value of counter be not it is absolute, the system of different scales has different counter reference values, needs (i.e. according to the default threshold value of different scales) depending on system itself scale, load, response time requirement.Such as one The video website of 4000 ten thousand users, concurrent user are 15-20 ten thousand or so, and 12 servers on line, the page response time is in 400ms Within scene under, it 50 is a reference value that the sum of value of all separate counters, which is equal to, if the sum of all separate counters height In 50, the performance of system is subject to different degrees of influence.
Embodiment one:
As shown in fig. 5, it is assumed that the maximum value for the concurrent amount of access that system allows is 60, then can start to execute often Before a module logic, the value of bv is judged, if bv > 60, directly exit module and execute logic, return to error code, thus can Enough reflect the overall performance of system, moreover it is possible to which the quick failure mechanism for realizing system plays the role of anti-snowslide.
Embodiment two:
In a video items, there are modules several in this way: search module (counter names sr), video playback module (counter names pb), individual video list block (counter names pl), popular video module (counter names tv), video Watch history module (counter names rv).Search module needs to search for individual video list block and popular video screen module in this example Block, the i.e. value of counter sr=counter pl value+counter tv value.
Table 1 illustrates the case where value sampling of 4 groups of counters.
As shown in Table 1, popular video module, counter are named as tv, No. 4 counter sampled values are respectively 6,5,8, 6, this is because the request amount of access of same time point background program is different, the value of counter can all have a little floating, but basic Control is very low within 10, belongs to normal value.
But the value of the counter of search module increases to 256 from 26 1 tunnels, is higher than counter reference value.Due to search module according to Rely individual video list block and popular video module, so the case where needing further to judge the two module count devices, hair Counter reference value of the value of the counter of existing individual video list block also above it.It can be intuitive to see from table 1 The value of individual video list block counter goes up, and very close with the value of search module counter, it is clear that this is The reason for causing the value hurricane of entire search module counter high.Next the research and development of individual video list block can be notified negative Duty people carries out problem and checks, and problem (blocking module) judges successfully.
4. exporting (output module)
Embodiment one:
In a video items, there are modules several in this way: search module (counter names sr), video playback module (counter names pb), individual video list block (counter names pl), popular video module (counter names tv), video Watch history module (counter names rv).Search module needs to search for individual video list block and popular video screen module in this example Block, the i.e. value of counter sr=counter pl value+counter tv value.
A background thread is opened, by the value of the counter of each module, is output to the monitoring per diem generated within every 10 seconds In file (sliding window).When finding that entire video website page Caton is serious, we can check the counting of sliding window The case where the case where device sampled value, table 1 illustrates the value sampling of 4 groups of counters:
Table 1
Embodiment two:
Fig. 4 is the visualization interface according to an embodiment of the present invention for judging method that whether system or system module block Schematic diagram;
As shown in figure 4, the present invention can by a visualization interface (can be accomplished using any chart frame frame, than Such as Highcharts), the case where more intuitively to embody each time point counter of background system.
The method according to an embodiment of the present invention for judging whether system or system module block can be seen that because using drawing Enter counter, is performed carry out global counter or the corresponding counter of each module plus 1 operation in each module of system, is being Each module of uniting do not occur obstruction and at the end of carry out the operation that subtracts 1 of global counter or the corresponding counter of each module, thus root According to the system of the value judgement obstruction of counter or the technological means of system module, so overcoming log frame to systematic entirety It can cause to be lost, and need the technical issues of carrying out category filter by backstage batch processing system or real-time system if necessary, And then reach reduction complicated degree of analysis, the technical effect of blocking module quickly judged is realized using extremely low resource;Pass through backstage The value of counter is output to monitoring file by thread, so as to intuitively reflect the performance of system and its each module;Pass through Atomic operation, so as to realize the operation of high-performance and thread-safe.
Fig. 6 is showing for the main modular according to an embodiment of the present invention for judging device that whether system or system module block It is intended to;
As shown in fig. 6, the device 60 for judging whether system or system module block of the embodiment of the present invention specifically includes that meter Number device setup module 601, counting module 602, judgment module 603.Wherein:
Counter setup module 601 can be used for that counter is arranged in system or system module;Counting module 602 can be used for When each system module is triggered, the counter is carried out plus 1 operates, if the system module does not block, Then carry out subtracting 1 operation to the counter;If the value that judgment module 603 can be used for the counter is higher than threshold value, by institute It states system or system module is judged as the system or system module of obstruction.
In addition, counter setup module 601 can also be used in: global counter being arranged in system.
From the above, it can be seen that because being performed the global meter of progress in each module of system using counter is introduced Number device or the corresponding counter of each module plus 1 operation, each module of system do not occur obstruction and at the end of carry out global counting The operation that subtracts 1 of device or the corresponding counter of each module, thus according to the system of the value of counter judgement obstruction or system module Technological means so overcoming log frame can cause to be lost to systematic entirety, and is needed if necessary by backstage batch The technical issues of reason system or real-time system carry out category filter, and then reach reduction complicated degree of analysis, it is real using extremely low resource The technical effect of existing blocking module quickly judged;The value of counter is output to monitoring file by background thread, so as to Intuitively to reflect the performance of system and its each module;By atomic operation, so as to realize high-performance and thread-safe Operation.
According to an embodiment of the invention, the present invention also provides a kind of electronic equipment and a kind of readable medium.
Electronic equipment of the invention includes: one or more processors;Storage device, for storing one or more journeys Sequence, when one or more of programs are executed by one or more of processors, so that one or more of processors are real The method for judging system or system module and whether blocking of the existing embodiment of the present invention.
Computer-readable medium of the invention is stored thereon with computer program, uses when described program is executed by processor Make the method for judging system or system module and whether blocking of the computer execution embodiment of the present invention in realization.
Fig. 7 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present application Figure.
As shown in fig. 7, it illustrates the computer systems 700 for the terminal device for being suitable for being used to realize the embodiment of the present application Structural schematic diagram.Terminal device shown in Fig. 7 is only an example, should not function and use scope to the embodiment of the present application Bring any restrictions.
As shown in fig. 7, computer system 700 includes central processing unit (CPU) 701, it can be read-only according to being stored in Program in memory (ROM) 702 or be loaded into the program in random access storage device (RAM) 703 from storage section 708 and Execute various movements appropriate and processing.In RAM 703, also it is stored with system 700 and operates required various programs and data. CPU 701, ROM 702 and RAM 703 are connected with each other by bus 704.Input/output (I/O) interface 705 is also connected to always Line 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.; And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon Computer program be mounted into storage section 708 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.? In such embodiment, which can be downloaded and installed from network by communications portion 709, and/or from can Medium 711 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 701, the system that executes the application The above-mentioned function of middle restriction.
Fig. 8 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein.Fig. 8 is shown can be using this The Method of Commodity Recommendation of inventive embodiments or the exemplary system architecture 800 of the device for recommending the commodity.
As shown in figure 8, system architecture 800 may include terminal device 801,802,803, network 804 and server 805. Network 804 between terminal device 801,802,803 and server 805 to provide the medium of communication link.Network 804 can be with Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 801,802,803 and be interacted by network 804 with server 805, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 801,802,803 (merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 801,802,803 can be the various electronic equipments with display screen and supported web page browsing, packet Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 805 can be to provide the server of various services, such as utilize terminal device 801,802,803 to user The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception To the data such as information query request analyze etc. processing, and by processing result (such as target push information, recommendation quotient Product information -- merely illustrative) feed back to terminal device.
It should be noted that computer-readable medium shown in the application can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In this application, computer readable storage medium can be it is any include or storage journey The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this In application, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction It closes to realize.
Being described in module involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet Include counter setup module, counting module, judgment module and output module.Wherein, these do not have the title of module in certain situation Under do not constitute restriction to the module itself, for example, counter setup module is also described as " setting in system module Set the module of counter ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes Obtaining the equipment includes: that counter is arranged in system or system module;Each system module is performed, to the counting Device carries out plus 1 operation, if the system module does not block, carries out subtracting 1 operation to the counter;If the meter The value of number device is higher than threshold value, then judges the system or system module for the system of obstruction or system module.
Method provided by the embodiment of the present invention can be performed in the said goods, has the corresponding functional module of execution method and has Beneficial effect.The not technical detail of detailed description in the present embodiment, reference can be made to method provided by the embodiment of the present invention.
Technical solution according to an embodiment of the present invention because using introduce counter, each module of system be performed into Row global counter or the corresponding counter of each module plus 1 operation, each module of system do not occur obstruction and at the end of carry out The operation that subtracts 1 of global counter or the corresponding counter of each module, to according to the system of the value of counter judgement obstruction or be The technological means for module of uniting, so overcoming log frame can cause to be lost to systematic entirety, and need if necessary by The technical issues of backstage batch processing system or real-time system carry out category filter, and then reach reduction complicated degree of analysis, use pole The technical effect of low-resource realization blocking module quickly judged;The value of counter is output to monitoring text by background thread Part, so as to intuitively reflect the performance of system and its each module;By atomic operation, so as to realize high-performance and The operation of thread-safe.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention Within.

Claims (12)

1. a kind of method for judging system or system module and whether blocking characterized by comprising
Counter is set in system or system module;
Each system module is performed, and carries out to the counter plus 1 operates, if the system module does not hinder Plug then carries out subtracting 1 operation to the counter;
If the value of the counter is higher than threshold value, judge the system or system module for the system of obstruction or system mould Block.
2. the method according to claim 1, wherein being carried out to the counter plus 1 operation and carrying out subtracting 1 operation To execute atomic operation.
3. the method according to claim 1, wherein further include: the value of the counter is output to monitoring text Part;Wherein,
Show the monitoring file using sliding window or visualization interface.
4. the method according to claim 1, wherein the system module includes: standalone module and intermediate module; Wherein,
The intermediate module is the module for having invoked other modules, the value of the counter of the intermediate module call for it other The sum of value of counter of module.
5. the method according to claim 1, wherein further include: global counter is set in system.
6. a kind of device for judging system or system module and whether blocking characterized by comprising
Counter setup module, for counter to be arranged in system or system module;
Counting module is performed for each system module, carries out to the counter plus 1 operates, if the system System module is not blocked, then carries out subtracting 1 operation to the counter;
Judgment module judges the system or system module for obstruction if the value for the counter is higher than threshold value System or system module.
7. device according to claim 6, which is characterized in that in the counting module, carried out to the counter plus 1 grasps Make and carries out subtracting 1 operation to execute atomic operation.
8. device according to claim 6, which is characterized in that further include:
Output module, for the value of counter to be output to monitoring file;Wherein,
Show the monitoring file using sliding window or visualization interface.
9. device according to claim 6, which is characterized in that the system module includes: standalone module and intermediate module; Wherein,
The intermediate module is the module for having invoked other modules, the value of the counter of the intermediate module call for it other The sum of value of counter of module.
10. device according to claim 6, which is characterized in that the counter setup module is also used to: being set in system Set global counter.
11. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
12. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor Such as method as claimed in any one of claims 1 to 5 is realized when row.
CN201710356948.4A 2017-05-19 2017-05-19 Judge system or the method and apparatus whether system module blocks Pending CN108959015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710356948.4A CN108959015A (en) 2017-05-19 2017-05-19 Judge system or the method and apparatus whether system module blocks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710356948.4A CN108959015A (en) 2017-05-19 2017-05-19 Judge system or the method and apparatus whether system module blocks

Publications (1)

Publication Number Publication Date
CN108959015A true CN108959015A (en) 2018-12-07

Family

ID=64462158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710356948.4A Pending CN108959015A (en) 2017-05-19 2017-05-19 Judge system or the method and apparatus whether system module blocks

Country Status (1)

Country Link
CN (1) CN108959015A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053858A (en) * 2010-12-28 2011-05-11 华中科技大学 Virtual CPU dispatching method
CN103092746A (en) * 2013-02-05 2013-05-08 上海大唐移动通信设备有限公司 Positioning method and system for thread anomaly
US20170116287A1 (en) * 2014-01-29 2017-04-27 International Business Machines Corporation Automatically generating and reporting merged performance and capacity statistics

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102053858A (en) * 2010-12-28 2011-05-11 华中科技大学 Virtual CPU dispatching method
CN103092746A (en) * 2013-02-05 2013-05-08 上海大唐移动通信设备有限公司 Positioning method and system for thread anomaly
US20170116287A1 (en) * 2014-01-29 2017-04-27 International Business Machines Corporation Automatically generating and reporting merged performance and capacity statistics

Similar Documents

Publication Publication Date Title
CN110083660A (en) A kind of method, apparatus of synchrodata, medium and electronic equipment
CN104572167B (en) The method and computer system of starting and the unmanned application program participated in of management
CN108228906B (en) Method and apparatus for generating information
CN110245011A (en) A kind of method for scheduling task and device
US9009850B2 (en) Database management by analyzing usage of database fields
CN110196790A (en) The method and apparatus of abnormal monitoring
CN110427304A (en) O&M method, apparatus, electronic equipment and medium for banking system
CN107506256A (en) A kind of method and apparatus of crash data monitoring
CN107169077A (en) Method and apparatus for pushed information
CN110019437A (en) A kind of method and system exporting data
CN107908662A (en) The implementation method and realization device of search system
CN109684027A (en) The method and apparatus of dynamically track Java Virtual Machine operation
CN110473043A (en) A kind of item recommendation method and device based on user behavior
CN109002925A (en) Traffic prediction method and apparatus
CN110083501A (en) Interface calls method of counting and device
CN108959015A (en) Judge system or the method and apparatus whether system module blocks
CN108959636A (en) Data processing method, device, system, computer-readable medium
CN109740130A (en) Method and apparatus for generating file
CN109146672A (en) It is a kind of that matching process and device are brought together based on production model
CN110032283A (en) The method and apparatus that a kind of pair of associational word is ranked up
CN110309187A (en) A kind of method and apparatus for applying streaming computing in SAAS system
CN110879818B (en) Method, device, medium and electronic equipment for acquiring data
CN114553555A (en) Malicious website identification method and device, storage medium and electronic equipment
CN107256244A (en) Data processing method and system
CN108768742B (en) Network construction method and device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20181207

RJ01 Rejection of invention patent application after publication