Embodiment
The present invention program is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the embodiment of a part of the present invention, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, should belong to the scope of protection of the invention.
It should be noted that, term " first ", " second " etc. in specification of the present invention and claims and above-mentioned accompanying drawing are for distinguishing similar object, and need not be used for describing specific order or precedence.Should be appreciated that the data used like this can be exchanged in the appropriate case, so as embodiments of the invention described herein can with except here diagram or describe those except order implement.In addition, term " comprises " and " having " and their any distortion, intention is to cover not exclusive comprising, such as, contain those steps or unit that the process of series of steps or unit, method, system, product or equipment is not necessarily limited to clearly list, but can comprise clearly do not list or for intrinsic other step of these processes, method, product or equipment or unit.
Embodiment 1
According to the embodiment of the present invention, provide a kind of server state detection method, said method can be applied in detection system as shown in Figure 1, wherein, said system can include but not limited to: service server 102, detect client 104-1 to detecting client 104-4, server state detecting and controlling system 106, wherein, above-mentioned server state detecting and controlling system 106 can include but not limited in the present embodiment: data acquisition and procession module 108, analysis module 110, result output module 112, exploration policy management and configuration module 114, service basic information bank 116.Alternatively, in the present embodiment, the modules in above-mentioned server state detecting and controlling system 106 can be integrated in a network equipment, also can be arranged in the different network equipments in a distributed manner.
Alternatively, in the present embodiment, above-mentioned detection client 104-1 can be, but not limited to be deployed in different positions in a distributed manner to detecting client 104-4 from service server 102.Such as, detect client 104-1 and be positioned at Beijing, detect client 104-2 and be positioned at Shanghai, detect client 104-3 and be positioned at Guangzhou, detect client 104-3 and be positioned at Chengdu, service server 102 is positioned at Dalian.By the detection client of multiple diverse location, comprehensive state verification is carried out to service server.
Further, the number of above-mentioned detection client and residing position are only examples, and the present embodiment does not limit this, can detect the number of client according to detecting practically increase in demand and/or adjust the position detected residing for client.
Alternatively, in the present embodiment, as shown in Figure 2, above-mentioned server state detection method can comprise:
S202, generates the test assignment corresponding with the configuration parameter of server to be detected;
S204, is sent to multiple detection clients of distributed deployment by test assignment;
S206, receives test result server to be detected being performed to test assignment that multiple detection client returns;
S208, the test result returned according to multiple detection client judges the state of server to be detected.
Alternatively, in the present embodiment, the configuration parameter of server to be detected can include but not limited to following one of at least: protocol type, open port, operating system, open service and system control strategy.
Alternatively, in the present embodiment, the test assignment corresponding with the configuration parameter of server to be detected can be arranged in advance, such as, arranges the content in test packet and test response data bag.
Alternatively, in this enforcement, the test assignment that server to be detected generates be can be, but not limited to: generate different test assignments based on different types of service, generate different test assignments based on the different qualities of server.Wherein, above-mentioned type of service can include but not limited to: TCP/UDP server, WEB server, DNS server.Wherein, the characteristic of above-mentioned server can include but not limited to: PING delay, port connected ratio, life span (TTL, Time To Live), HTTP return code.Alternatively, in the present embodiment, the test assignment generated for server to be detected can be for testing above-mentioned server to be detected for different qualities during same task, also can be for testing above-mentioned server to be detected for same characteristic during different task.
Such as, shown in composition graphs 1, detect client 104-1 have sent 1000 requests execution business (such as, TCP/UDP server) in 1 hour test packet to service server 102, but, receive only 850 test response data bags from service server 102.That is, detection client 104-1 is 85% to the connected ratio of service server 102 requested service.In like manner, can obtain and detect client 104-2 to the connected ratio of service server 102 requested service is 80%, detection client 104-3 is 90% to the connected ratio of service server 102 requested service, detection client 104-4 is 75% to the connected ratio of service server 102 requested service, as shown in table 1.
Again such as, such as, shown in composition graphs 1, detect client 104-1 and send request business (such as to service server 102, TCP/UDP server) time of test packet be 10:00, and the time receiving the test response data bag sent by service server 102 is after 10ms, that is, the request delay that detection client 104-1 detects is 10ms.In like manner, can obtain and detect client 104-2 to the time delay of service server 102 requested service is 8ms, detection client 104-3 is 6ms to the time delay of service server 102 requested service, and detection client 104-4 is 12ms to the time delay of service server 102 requested service, as shown in table 1.
Table 1
Detect client |
Connected ratio |
Time delay (unit: ms) |
Detect client 104-1 |
85% |
10 |
Detect client 104-2 |
80% |
8 |
Detect client 104-3 |
90% |
6 |
Detect client 104-4 |
75% |
12 |
Alternatively, in the present embodiment, the measuring technology for detecting server to be detected can include but not limited to: TCP detection, UDP detection, IMCP detection.
Alternatively, in the present embodiment, the mode that above-mentioned test assignment is sent in multiple detection clients 104 of distributed deployment can include but not limited to: transmitted in parallel.Such as, as shown in Figure 1, set up detection client 104-1 to be used for server to be detected (such as, service server 102) send multiple process of test packet or thread, then can realize detecting client 104-1 and send multiple test packet concurrently to service server 102, improve the detection speed that server state detects.
Alternatively, in the present embodiment according to the test result that above-mentioned multiple detection client returns, judge that the mode of the state of above-mentioned server to be detected can include but not limited to: the result parameter in test result and history reference value are compared, by judging whether difference is therebetween greater than predetermined threshold, and whether what judge above-mentioned server to be detected is in normal condition.
Alternatively, in the present embodiment, by the real-time change according to server to be detected, the configuration parameter of the server above-mentioned to be detected that real-time update has been preserved.
Alternatively, in the present embodiment, the server state detection system shown in composition graphs 1, the execution flow process of above-mentioned detection method can as shown in Figure 3:
S302, exploration policy management obtains server to be detected (such as with configuration module 114 from business information base 116, service server 102) relevant information (such as, configuration parameter, includes but not limited to protocol type, open port, operating system, open service and system control strategy);
S304, the test assignment corresponding with the configuration parameter of server to be detected (such as, service server 102) that exploration policy management will generate with configuration module 114, and be issued to multiple detection clients 104 of distributed deployment;
S306, server to be detected performs test assignment, and by data acquisition and procession module 108 collecting test data;
S308, is back to analysis module 110 by the test data after the complete test assignment of multiple detection client executing;
S310, records a demerit the test after analysis and feeds back to exploration policy management and configuration module 114, judge that whether the state of server to be detected is normal.
S312, upgrades the data in business information base 116.Alternatively, can upgrade according to the result of feedback the information corresponding with server to be detected recorded in business information base, such as, the state information of service server 102.
By embodiment provided by the invention, by the test assignment corresponding with the configuration parameter of server to be detected being issued to multiple detection clients of distributed deployment, the test result returned by above-mentioned multiple detection client is comprehensively analyzed, judge whether the state of above-mentioned server to be detected is in normally, thus to avoid in prior art and only carry out from server native the inaccurate problem of detection that state-detection causes, from the state of the angle recognition server to be detected of the detection client of distributed deployment, improve the accuracy of state-detection.
As the optional scheme of one, according to the test result that multiple detection client returns, step S208, judges that the state of server to be detected comprises:
S1, judge whether the difference between result parameter in test result and corresponding history reference value is greater than predetermined threshold, wherein, history reference value repeatedly obtains adding up in first test result of obtaining of first test assignment server to be detected is executed;
S2, if difference is greater than predetermined threshold, then judges that server to be detected is in abnormality; Otherwise, judge that server to be detected is in normal condition.
Alternatively, in the present embodiment, the executed history reference value obtained after first test assignment statistics can for but be not limited to: repeatedly at the mean value of first test result, repeatedly in the desired value of first test result.Alternatively, in the present embodiment, the test parameter in test result can be but be not limited to: the mean value of multiple detection client test result, the desired value of multiple detection client test result.
Alternatively, in the present embodiment, with the predetermined threshold of the result parameter in test result and the difference comparsion between corresponding history reference value, can pre-configured identical or different value under different application scenarioss, the present embodiment does not do any restriction to this.
Such as, shown in composition graphs 1, detect client and have sent request execution business (such as to service server 102 in 1 hour, TCP/UDP server) test packet, suppose that the history reference value of the connected ratio of service server 102 is 80%, and the test result returned through multiple detection client is known, detection client 104-1 is 85% to the connected ratio of service server 102 requested service, detection client 104-2 is 80% to the connected ratio of service server 102 requested service, detection client 104-3 is 90% to the connected ratio of service server 102 requested service, detection client 104-4 is 75% to the connected ratio of service server 102 requested service.Suppose using the mean value of the test result of multiple detection client as final testing result, then above-mentioned is 82.5% for service server 102 about the connected ratio of business TCP/UDP server.
Further, judge that test parameter connected ratio in the final testing result obtained by above-mentioned multiple detection client (such as, connected ratio is 82.5%) and history reference value is (such as, history reference value is 80%) between difference be 2.5%, suppose that the predetermined threshold set in the present embodiment is 2%, then can judge that above-mentioned difference is greater than predetermined threshold 2%, then judge that above-mentioned service server is in abnormality.
By embodiment provided by the invention, by judging the result parameter in test result and the difference between corresponding history reference value, to realize analyzing test result based on history reference value, and then reach the whether normal object of the state judging server to be detected, achieve and the state ground of above-mentioned server to be detected is effectively detected, improve the accuracy of the state-detection of server to be measured further.
As the optional scheme of one, as shown in Figure 4, in step S202, before generating the test assignment corresponding with the configuration parameter of server to be detected, also comprise:
S402, performs repeatedly in first test assignment server to be detected, obtains in first test result;
S404, adds up and obtains the history reference value corresponding from different result parameters in first test result.
Illustrate below in conjunction with concrete example, shown in composition graphs 1, in the present embodiment, above-mentioned test assignment to ask the connected ratio of execution business (such as, TCP/UDPserver) to service server 102 for detecting client.Further, above-mentioned detection client 104-1 performs three time in first test assignment at 10:00-11:00,12:00-13:00,14:00-15:00 to service server 102 to detecting client 104-4, and the multiple detection clients obtaining each test result (such as, connected ratio) of each detection client as shown in table 2 and calculating gained test the mean value of the connected ratio obtained at every turn.
Table 2
As shown in table 2, the history reference value of the connected ratio obtained in first test result by above-mentioned statistics can be, but not limited to the mean value into above-mentioned detection client repeatedly test result, wherein, the test result that above-mentioned detection client is each can be, but not limited to the mean value of the test result into multiple detection client.Such as, it is detect the mean value 85% of client 104-1 to the test result of detection client 104-4 that statistics tests the connected ratio obtained for the first time, further, testing the connected ratio obtained for the second time is 82.5%, testing the connected ratio obtained for the third time is 83.75%, then service server 102 is (85%+82.5%+83.75%)/3=83.75% about the history reference value of the connected ratio of business TCP/UDP server.
By embodiment provided by the invention, by setting up history reference value, server state is detected to analyze based on history reference value, achieve and the state ground of above-mentioned server to be detected is effectively detected, improve the accuracy of the state-detection of server to be measured further.。
As the optional scheme of one, as shown in Figure 5, after multiple detection clients test assignment being sent to distributed deployment, and receive that multiple detection client returns the test result of test assignment is performed to server to be detected before, each (such as, detecting client 104-1) in multiple detection client all will perform following operation:
S502, generates the test packet corresponding with test assignment;
S504, sends to server to be detected (such as, service server 102) by test packet;
S506, receives the test result response message in response to test packet that server to be detected returns;
S508, generates test result according to test result response message.
Alternatively, the test result received by server to be detected can be fed back by each detection client be applied in the present embodiment in multiple detection clients of server state detection.
Alternatively, in the present embodiment, the test result of each detection client feedback in multiple detection client is added up, alternatively, in the present embodiment, the mode of statistics can include but not limited to: calculate the desired value of the test result of multiple detection client, calculate the mean value of multiple detection client test result.
Illustrate below in conjunction with concrete example, in composition graphs 1 and table 2 shown in first row, in the present embodiment, above-mentioned test assignment to ask the connected ratio of execution business (such as, TCP/UDP server) to service server 102 for detecting client.In multiple detection client each (such as, detect client 104-1) all will generate the test packet corresponding with the test assignment that connected ratio is tested, and above-mentioned test packet is sent to service server 102, then, the test result response message in response to test packet that above-mentioned detection client will receive service server 102 and returns, such as, it is 85% that detection client 104-1 receives with the connected ratio of service server 102, it is 80% that detection client 104-3 receives with the connected ratio of service server 102, it is 90% that detection client 104-3 receives with the connected ratio of service server 102, it is 85% that detection client 104-4 receives with the connected ratio of service server 102.Finally, the test result response message obtained according to multiple detection client is generated test result as shown in table 2 by above-mentioned detection client, and such as, the mean value of the connected ratio of multiple detection client is 85%.
By embodiment provided by the invention, the state-detection to server to be detected is carried out by the multiple detection clients in Network Based, to avoid in prior art and only carry out based on server native the inaccurate problem of detection that state-detection causes, thus achieve the state of the angle recognition server to be detected by the detection client from distributed deployment, improve the accuracy of state-detection.
As the optional scheme of one, test packet sends to server to be detected to comprise by multiple detection client:
S1, test packet is sent to server to be detected by multiple detection client concurrently.
Alternatively, in the present embodiment, each the detection client in multiple detection client all can be, but not limited to set up multiple process or thread.Such as, shown in composition graphs 1, detecting client 104-1 can to the multiple test packet of service server 102 transmitted in parallel, and test service server 102 is about multiple characteristics of certain business simultaneously, or, test certain characteristic of the multiple business in multiple service server simultaneously.
By embodiment provided by the invention, multiple detection client by the mode of transmitted in parallel test packet, and then achieves the detection speed improved the state-detection of server to be detected.
As the optional scheme of one, after test packet is sent to server to be detected by multiple detection client, also comprise:
S1, if judge, server to be detected is in abnormality, then arrange protection configuration parameter, and wherein, protection configuration parameter is used for the packet that filter part is sent to server to be detected.
Alternatively, protection configuration parameter in the present embodiment can be, but not limited to comprise: the quantity of the packet that the quantity of the packet that client sends, service server receive.Alternatively, in the present embodiment, the mode that filtration fraction is sent to the packet of server to be detected can include but not limited to: the quantity of the packet that restriction given client end sends within the unit interval in predetermined threshold range, the IP address of shielding given client end, limit the quantity of the packet that server to be detected receives within the unit interval.
Such as, shown in composition graphs 1, when judging that server to be detected (such as, service server 102) is in abnormality, then amendment arranges the protection configuration parameter of above-mentioned service server 102 to realize the packet that filter part is sent to service server 102.Wherein, the mode of filtering data bag can be as follows:
1) suppose that the quantity detecting the packet that client 104-1 sends within the unit interval is excessive (such as, 5000/hour), then can limit the quantity detecting the packet that client 104-1 sends within the unit interval and be less than 1000, then the packet being greater than 1000 all will be filtered.
2) suppose that the quantity detecting the packet that client 104-1 sends within the unit interval is excessive (such as, 5000/hour), then directly can shield the IP address of above-mentioned detection client 104-1, and then realize filtering out the entire packet detecting client 104-1 and send.
3) suppose that the quantity of the packet that service server 102 is received within the unit interval is excessive (such as, 8000/hour), then can limit the quantity detecting the packet that client 104-1 sends within the unit interval and be less than 5000, such as, the packet sent is entered row stochastic abandoning, to realize the packet filtering out larger amt.
By embodiment provided by the invention, by being arranged by the protection configuration parameter of the server to be detected being in abnormality, remain on healthier running status to make above-mentioned server to be detected.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that can add required general hardware platform by software according to the method for above-described embodiment and realize, hardware can certainly be passed through, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium (as ROM/RAM, magnetic disc, CD), comprising some instructions in order to make a station terminal equipment (can be mobile phone, computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.
Embodiment 2
According to the embodiment of the present invention, additionally provide a kind of server state checkout gear for implementing said method, said apparatus can be applied in detection system as shown in Figure 1, wherein, said system can include but not limited to: service server 102, detect client 104-1 to detecting client 104-4, server state detecting and controlling system 106, wherein, above-mentioned server state detecting and controlling system 106 can include but not limited in the present embodiment: data acquisition and procession module 108, analysis module 110, result output module 112, exploration policy management and configuration module 114, service basic information bank 116.Alternatively, in the present embodiment, the modules in above-mentioned server state detecting and controlling system 106 can be integrated in a network equipment, also can be arranged in the different network equipments in a distributed manner.
Alternatively, in the present embodiment, above-mentioned detection client 104-1 can be, but not limited to be deployed in different positions in a distributed manner to detecting client 104-4 from service server 102.Such as, detect client 104-1 and be positioned at Beijing, detect client 104-2 and be positioned at Shanghai, detect client 104-3 and be positioned at Guangzhou, detect client 104-3 and be positioned at Chengdu, service server 102 is positioned at Dalian.By the detection client of multiple diverse location, comprehensive state verification is carried out to service server.
Further, the number of above-mentioned detection client and residing position are only examples, and the present embodiment does not limit this, can detect the number of client according to detecting practically increase in demand and/or adjust the position detected residing for client.
Alternatively, in the present embodiment, as shown in Figure 6, this device comprises in the present embodiment:
1) generation unit 602, for generating the test assignment corresponding with the configuration parameter of server to be detected;
2) transmitting element 604, for being sent to multiple detection clients of distributed deployment by test assignment;
3) receiving element 606, for receiving test result server to be detected being performed to test assignment that multiple detection client returns;
4) judging unit 608, the test result for returning according to multiple detection client judges the state of server to be detected.
Alternatively, in the present embodiment, the configuration parameter of server to be detected can include but not limited to following one of at least: protocol type, open port, operating system, open service and system control strategy.
Alternatively, in the present embodiment, the test assignment corresponding with the configuration parameter of server to be detected can be arranged in advance, such as, arranges the content in test packet and test response data bag.
Alternatively, in this enforcement, the test assignment that server to be detected generates be can be, but not limited to: generate different test assignments based on different types of service, generate different test assignments based on the different qualities of server.Wherein, above-mentioned type of service can include but not limited to: TCP/UDP server, WEB server, DNS server.Wherein, the characteristic of above-mentioned server can include but not limited to: PING delay, port connected ratio, life span (TTL, Time To Live), HTTP return code.Alternatively, in the present embodiment, the test assignment generated for server to be detected can be for testing above-mentioned server to be detected for different qualities during same task, also can be for testing above-mentioned server to be detected for same characteristic during different task.
Such as, shown in composition graphs 1, detect client 104-1 have sent 1000 requests execution business (such as, TCP/UDP server) in 1 hour test packet to service server 102, but, receive only 850 test response data bags from service server 102.That is, detection client 104-1 is 85% to the connected ratio of service server 102 requested service.In like manner, can obtain and detect client 104-2 to the connected ratio of service server 102 requested service is 80%, detection client 104-3 is 90% to the connected ratio of service server 102 requested service, detection client 104-4 is 75% to the connected ratio of service server 102 requested service, as shown in table 3.
Again such as, such as, shown in composition graphs 1, detect client 104-1 and send request business (such as to service server 102, TCP/UDP server) time of test packet be 10:00, and the time receiving the test response data bag sent by service server 102 is after 10ms, that is, the request delay that detection client 104-1 detects is 10ms.。In like manner, can obtain and detect client 104-2 to the time delay of service server 102 requested service is 8ms, detection client 104-3 is 6ms to the time delay of service server 102 requested service, and detection client 104-4 is 12ms to the time delay of service server 102 requested service, as shown in table 3.
Table 3
Detect client |
Connected ratio |
Time delay (unit: ms) |
Detect client 104-1 |
85% |
10 |
Detect client 104-2 |
80% |
8 |
Detect client 104-3 |
90% |
6 |
Detect client 104-4 |
75% |
12 |
Alternatively, in the present embodiment, the measuring technology for detecting server to be detected can include but not limited to: TCP detection, UDP detection, IMCP detection.
Alternatively, in the present embodiment, the mode that above-mentioned test assignment is sent in multiple detection clients 104 of distributed deployment can include but not limited to: transmitted in parallel.Such as, as shown in Figure 1, set up detection client 104-1 to be used for server to be detected (such as, service server 102) send multiple process of test packet or thread, then can realize detecting client 104-1 and send multiple test packet concurrently to service server 102, improve the detection speed that server state detects.
Alternatively, in the present embodiment according to the test result that above-mentioned multiple detection client returns, judge that the mode of the state of above-mentioned server to be detected can include but not limited to: the result parameter in test result and history reference value are compared, by judging whether difference is therebetween greater than predetermined threshold, and whether what judge above-mentioned server to be detected is in normal condition.
Alternatively, in the present embodiment, by the real-time change according to server to be detected, the configuration parameter of the server above-mentioned to be detected that real-time update has been preserved.
By embodiment provided by the invention, by the test assignment corresponding with the configuration parameter of server to be detected being issued to multiple detection clients of distributed deployment, the test result returned by above-mentioned multiple detection client is comprehensively analyzed, judge whether the state of above-mentioned server to be detected is in normally, thus to avoid in prior art and only carry out from business server native the inaccurate problem of detection that state-detection causes, from the state of the angle recognition server to be detected of the detection client of distributed deployment, improve the accuracy of state-detection.
As the optional scheme of one, judging unit 608 comprises:
1) judge module, for judging whether the difference between result parameter in test result and corresponding history reference value is greater than predetermined threshold, wherein, history reference value repeatedly obtains adding up in first test result of obtaining of first test assignment server to be detected is executed; If difference is greater than predetermined threshold, then judge that server to be detected is in abnormality; Otherwise, judge that server to be detected is in normal condition.
Alternatively, in the present embodiment, the executed history reference value obtained after first test assignment statistics can for but be not limited to: repeatedly at the mean value of first test result, repeatedly in the desired value of first test result.Alternatively, in the present embodiment, the test parameter in test result can be but be not limited to: the mean value of multiple detection client test result, the desired value of multiple detection client test result.
Alternatively, in the present embodiment, with the predetermined threshold of the result parameter in test result and the difference comparsion between corresponding history reference value, can pre-configured identical or different value under different application scenarioss, the present embodiment does not do any restriction to this.
Such as, shown in composition graphs 1, detect client and have sent request execution business (such as to service server 102 in 1 hour, TCP/UDP server) test packet, suppose that the history reference value of the connected ratio of service server 102 is 80%, and the test result returned through multiple detection client is known, detection client 104-1 is 85% to the connected ratio of service server 102 requested service, detection client 104-2 is 80% to the connected ratio of service server 102 requested service, detection client 104-3 is 90% to the connected ratio of service server 102 requested service, detection client 104-4 is 75% to the connected ratio of service server 102 requested service.Suppose using the mean value of the test result of multiple detection client as final testing result, then above-mentioned is 82.5% for service server 102 about the connected ratio of business TCP/UDP server.
Further, judge that test parameter connected ratio in the final testing result obtained by above-mentioned multiple detection client (such as, connected ratio is 82.5%) and history reference value is (such as, history reference value is 80%) between difference be 2.5%, suppose that the predetermined threshold set in the present embodiment is 2%, then can judge that above-mentioned difference is greater than predetermined threshold 2%, then judge that above-mentioned service server is in abnormality.
By embodiment provided by the invention, by judging the result parameter in test result and the difference between corresponding history reference value, to realize based on history reference value, test result is analyzed, and then reach the whether normal object of the state judging server to be detected, achieve and the state ground of above-mentioned server to be detected is effectively detected, improve the accuracy of the state-detection of server to be measured further.
As the optional scheme of one, as shown in Figure 7, this device also comprises in the present embodiment:
1) test cell 702, for before generating the described test assignment corresponding with the configuration parameter of described server to be detected, repeatedly in first test assignment described in performing, obtains described in first test result to described server to be detected;
2) statistic unit 704, obtains the described history reference value corresponding from different result parameters for adding up described in first test result.
Illustrate below in conjunction with concrete example, shown in composition graphs 1, in the present embodiment, above-mentioned test assignment to ask the connected ratio of execution business (such as, TCP/UDPserver) to service server 102 for detecting client.Further, above-mentioned detection client 104-1 performs three time in first test assignment at 10:00-11:00,12:00-13:00,14:00-15:00 to service server 102 to detecting client 104-4, and the multiple detection clients obtaining each test result (such as, connected ratio) of each detection client as shown in table 4 and calculating gained test the mean value of the connected ratio obtained at every turn.
Table 4
As shown in table 4, the history reference value of the connected ratio obtained in first test result by above-mentioned statistics can be, but not limited to the mean value into above-mentioned detection client repeatedly test result, wherein, the test result that above-mentioned detection client is each can be, but not limited to the mean value of the test result into multiple detection client.Such as, it is detect the mean value 85% of client 104-1 to the test result of detection client 104-4 that statistics tests the connected ratio obtained for the first time, further, testing the connected ratio obtained for the second time is 82.5%, testing the connected ratio obtained for the third time is 83.75%, then service server 102 is (85%+82.5%+83.75%)/3=83.75% about the history reference value of the connected ratio of business TCP/UDP server.
By embodiment provided by the invention, by setting up history reference value, server state is detected to analyze based on history reference value, achieve and the state ground of above-mentioned server to be detected is effectively detected, improve the accuracy of the state-detection of server to be measured further.
As the optional scheme of one, each in above-mentioned multiple detection client detects client, comprising:
1) the first generation unit, for generating the test packet corresponding with test assignment;
2) transmitting element, for sending to server to be detected (such as, service server 102) by test packet;
3) receiving element, for receiving the test result response message in response to test packet that server to be detected returns;
4) the second generation unit, for generating test result according to test result response message.
Alternatively, the test result received by server to be detected can be fed back by each detection client be applied in the present embodiment in multiple detection clients of server state detection.
Alternatively, in the present embodiment, the test result of each detection client feedback in multiple detection client is added up, alternatively, in the present embodiment, the mode of statistics can include but not limited to: calculate the desired value of the test result of multiple detection client, calculate the mean value of multiple detection client test result.
Illustrate below in conjunction with concrete example, in composition graphs 1 and table 4 shown in first row, in the present embodiment, above-mentioned test assignment to ask the connected ratio of execution business (such as, TCP/UDP server) to service server 102 for detecting client.In multiple detection client each (such as, detect client 104-1) all will generate the test packet corresponding with the test assignment that connected ratio is tested, and above-mentioned test packet is sent to service server 102, then, the test result response message in response to test packet that above-mentioned detection client will receive service server 102 and returns, such as, it is 85% that detection client 104-1 receives with the connected ratio of service server 102, it is 80% that detection client 104-3 receives with the connected ratio of service server 102, it is 90% that detection client 104-3 receives with the connected ratio of service server 102, it is 85% that detection client 104-4 receives with the connected ratio of service server 102.Finally, the test result response message obtained according to multiple detection client is generated test result as shown in table 4 by above-mentioned detection client, and such as, the mean value of the connected ratio of multiple detection client is 85%.
By embodiment provided by the invention, the state-detection to server to be detected is carried out by the multiple detection clients in Network Based, to avoid in prior art and only carry out based on server native the inaccurate problem of detection that state-detection causes, thus achieve the state of the angle recognition server to be detected by the detection client from distributed deployment, improve the accuracy of state-detection.
As the optional scheme of one, described transmitting element comprises:
1) sending module, for sending to server to be detected by test packet concurrently.
Alternatively, in the present embodiment, each the detection client in multiple detection client all can be, but not limited to set up multiple process or thread.Such as, shown in composition graphs 1, detecting client 104-1 can to the multiple test packet of service server 102 transmitted in parallel, and test service server 102 is about multiple characteristics of certain business simultaneously, or, test certain characteristic of the multiple business in multiple service server simultaneously.
By embodiment provided by the invention, multiple detection client by the mode of transmitted in parallel test packet, and then achieves the detection speed improved the state-detection of server to be detected.
As the optional scheme of one, as shown in Figure 7, this device also comprises in the present embodiment:
1) filter element 706, after described test packet being sent to described server to be detected in described multiple detection client, when judging that described server to be detected is in abnormality, protection configuration parameter is then set, wherein, described protection configuration parameter is used for the packet that filter part is sent to described server to be detected.
Alternatively, protection configuration parameter in the present embodiment can be, but not limited to comprise: the quantity of the packet that the quantity of the packet that client sends, service server receive.Alternatively, in the present embodiment, the mode that filtration fraction is sent to the packet of server to be detected can include but not limited to: the quantity of the packet that restriction given client end sends within the unit interval in predetermined threshold range, the IP address of shielding given client end, limit the quantity of the packet that server to be detected receives within the unit interval.
Such as, shown in composition graphs 1, when judging that server to be detected (such as, service server 102) is in abnormality, then amendment arranges the protection configuration parameter of above-mentioned service server 102 to realize the packet that filter part is sent to service server 102.Wherein, the mode of filtering data bag can be as follows:
1) suppose that the quantity detecting the packet that client 104-1 sends within the unit interval is excessive (such as, 5000/hour), then can limit the quantity detecting the packet that client 104-1 sends within the unit interval and be less than 1000, then the packet being greater than 1000 all will be filtered.
2) suppose that the quantity detecting the packet that client 104-1 sends within the unit interval is excessive (such as, 5000/hour), then directly can shield the IP address of above-mentioned detection client 104-1, and then realize filtering out the entire packet detecting client 104-1 and send.
3) suppose that the quantity of the packet that service server 102 is received within the unit interval is excessive (such as, 8000/hour), then can limit the quantity detecting the packet that client 104-1 sends within the unit interval and be less than 5000, such as, the packet sent is entered row stochastic abandoning, to realize the packet filtering out larger amt.
By embodiment provided by the invention, by being arranged by the protection configuration parameter of the server to be detected being in abnormality, remain on healthier running status to make above-mentioned server to be detected.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
In the above embodiment of the present invention, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
In several embodiments that the application provides, should be understood that, disclosed client, the mode by other realizes.Wherein, device embodiment described above is only schematic, the such as division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of unit or module or communication connection can be electrical or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form of SFU software functional unit also can be adopted to realize.
If described integrated unit using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computer read/write memory medium.Based on such understanding, the part that technical scheme of the present invention contributes to prior art in essence in other words or all or part of of this technical scheme can embody with the form of software product, this computer software product is stored in a storage medium, comprises all or part of step of some instructions in order to make a computer equipment (can be personal computer, server or the network equipment etc.) perform method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), portable hard drive, magnetic disc or CD etc. various can be program code stored medium.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.