Summary of the invention
Technical problem to be solved by this invention is to provide the method that realizes in a kind of network management system that high efficiency, extensive historical performance are gathered, and can improve the efficient and the speed of collection by technology such as multithreading, thread pools.
The present invention specifically is achieved in that
Realize the method that historical performance is gathered in a kind of network management system, comprise following processing:
First step, when NM server starts, startability acquisition controlling thread;
Second step is obtained every historical performance acquisition configuration parameter from the configuration file of performance collection control thread;
Third step, but realize the interface of a dynamic load for every kind of performance collection thread;
The 4th step, in performance collection control thread, according to the NE type of network management system management, the tabulation of obtaining every kind of network element by data base querying repeatedly;
The 5th step is to the tabulation of certain network element of obtaining, according to every historical performance acquisition configuration parameter of obtaining from the configuration file of performance collection control thread, the performance collection thread of this kind of dynamic creation network element;
The 6th step in the pairing performance collection thread of certain network element, in the moment that each timing cycle arrives, is gathered each the network element circulation execution performance in the acquisition network element tabulation of this performance collection thread.
Described control from performance collection obtained the configuration parameter that every historical performance is gathered the thread, comprise the maximum acquisition network element number of the maximum collecting thread number of the performance collection thread relevant with NE type, every kind of network element, every kind of collecting thread.
Certain network element is carried out obtaining network element state by snmp protocol before the performance collection;
If obtain the network element state failure, then in the tabulation of the acquisition network element from the performance collection thread this network element is deleted;
If after deleting this network element, there have not been other network elements in the acquisition network element of this performance collection thread tabulation, then collecting thread is stopped and deleting.
After network management system is found a network element, send the request that starts the network element performance collection to performance acquisition controlling thread, performance collection control thread is searched for all properties collecting thread that this kind NE type has started, and judges that then this network element is in the acquisition network element tabulation of certain performance collection thread Already in;
If exist then return, otherwise just this network element is increased to during the acquisition network element of performance collection thread that certain acquisition network element number do not reach the maximum acquisition network element number of every thread of configuration tabulates;
If the acquisition network element number in all properties collecting thread of current establishment has all reached the maximum of configuration, and the collecting thread sum does not also reach the maximum performance collection Thread Count that allows, then create a new performance collection thread for this network element.
Behind network element of network management system deletion, send the request that stops the network element performance collection to performance acquisition controlling thread, performance collection control thread is searched for all properties collecting thread that this kind NE type has started, therefrom find the performance collection thread at this network element place, from the acquisition network element tabulation, delete this network element, if after deleting this network element, no longer comprise other network element in the acquisition network element of this performance collection thread tabulation, this collecting thread is stopped and deleting.
Realize the method that historical performance is gathered in the described network management system, when a large amount of network elements break down can't communicate by letter with network management system the time, described first step further comprises:
When NM server starts, in database, obtain all network elements;
Obtain the maximum number of acquisition network element simultaneously of each poll thread from the poll configuration file;
Be that a plurality of network elements start the status poll thread that a circulation is carried out one by one.
After the status poll thread is found a network element, send the request that starts the network element performance collection to performance acquisition controlling thread, performance collection control thread is searched for all properties collecting thread that this kind NE type has started, and judges that then this network element is in the acquisition network element tabulation of certain performance collection thread Already in;
If exist then return, otherwise just this network element is increased to during the acquisition network element of performance collection thread that certain acquisition network element number do not reach the maximum acquisition network element number of every thread of configuration tabulates;
If the acquisition network element number in all properties collecting thread of current establishment has all reached the maximum of configuration, and the collecting thread sum does not also reach the maximum performance collection Thread Count that allows, then create a new performance collection thread for this network element.
When the poll network element is failed, send the request that stops the network element performance collection to performance acquisition controlling thread, performance collection control thread is searched for all collecting threads that this kind NE type has started, therefrom find the performance collection thread at this network element place, from the acquisition network element tabulation, delete this network element, if after deleting this network element, do not comprised other network element in the acquisition network element tabulation, this collecting thread is stopped and deleting.
Described network management system finds or the success of deletion network element, sends message initiated or stops status poll to respective network elements to the status poll thread.
Adopt the method for the invention, the historical performance acquisition function of high efficiency, high scalability, high reliability can be provided, be easy to adapt to the requirement of the network management system of extensive, multiple network element mixed management.
Embodiment
Network management system with broadband wireless access (BWA) system is an example below, introduces implementation method of the present invention in detail.
BWA (BWA) is the broadband access means that telecom operators provide two-forty, big capacity, high reliability, full duplex with the signal load mode of point-to-multipoint, realizes the broadband wireless access of user terminal to backbone network.The BWA network management system is a subsystem of BWA system.In the present embodiment, the BWA network management system is the standard client/server configuration, and background data base adopts Microsoft SQL Server, and the Operation and Maintenance personnel use graphic user interface (GUI) terminal by BWA NM server visit SQL Server database.Between NM server and the network element system by snmp protocol communication.
As shown in Figure 1,1, start a performance collection remote service (RMI:Remote MethodInvocation) in the NM server start-up course.In the performance collection remote service, create a performance acquisition controlling thread;
2, performance collection control thread obtains the performance collection parameter from the performance collection configuration file, at first the reading performance acquisition parameter comprises time interval performance collection thread class name, the maximum collecting thread number of every kind network element and the maximum acquisition network element number of every kind collecting thread relevant with NE type that whether carries out performance collection, performance collection.
Every kind of performance collection thread class is all realized an interface, can dynamic load, if increase a kind of NE type like this newly, only need increase a kind of collecting thread class newly at this network element, the collecting thread class that increases newly for this NE type configuration in configuration file does not need to revise performance collection control thread class then.
3, obtain the performance collection parameter after, in performance collection control thread, from the performance collection configuration file, obtain and obtain all NE types of BWA series in the BWA network management system database, obtain every type network element tabulation then by database query operations;
4, performance collection control thread is according to performance collection parameter and network element tabulation, create the performance collection thread, for each performance collection network element thread distributes some network elements, the NE No. in the tabulation of the acquisition network element of performance collection thread can not surpass the maximum acquisition network element number of the every thread that is provided with in the configuration file;
5, each performance collection thread starts a timer automatically in the process of creating, and timing cycle is the performance collection time interval.Whenever the moment that the timing cycle of performance collection thread arrives, the operation below each the network element circular order in the acquisition network element tabulation carried out:
Judge at first whether the SNMP link between network element and the network management system is normal, if it is undesired, then from the acquisition network element tabulation, this network element is deleted, if delete in the acquisition network element tabulation of this collecting thread behind this network element and do not have other network elements, then collecting thread is stopped and deleting, and send the request that stops this network element performance collection to performance acquisition controlling thread.Carry out performance collection operation then to next network element;
If the SNMP link between network element and the NM server is normal, then obtain performance data to the network element side by snmp protocol, write the network management data storehouse.Carry out then the operation of the performance collection of next network element, up to all finished the acquisition network element tabulation in the performance collection operation of all network elements.
Be that performance collection gets main flow above, in order to improve that performance collection gets efficient and to be to answer network change to need, performance collection control thread can receive and outsidely must start or stop that certain network element is got the performance collection function and get message.
Network element in the network management system can dynamically increase and delete, and the state of network element also might change, and the invention provides the processing to both of these case.
The handling process of increase network element after network element success of NM server discovery, sends a message to the performance collection remote service as shown in Figure 2, and request starts the performance collection function of this network element.After the performance collection remote service is received request message, forwards is controlled thread to performance collection.After performance collection control thread is received request message, search for the collecting thread that all have been created.To each collecting thread, judge the network element that whether comprises request startability acquisition function in the acquisition network element tabulation.If the network element of request startability acquisition function has been included in the acquisition network element tabulation of certain collecting thread, the request response finishes.If the network element of request startability acquisition function is not present in the acquisition network element tabulation in any one collecting thread that has started.Performance collection control thread begins to start the performance collection function of network element.Performance collection control thread is searched for the collecting thread that all have been created, and searches the thread that does not also reach maximum acquisition network element number.Performance collection control thread is increased to this network element in this collecting thread, and request finishes.If all collecting threads of having created have all reached maximum acquisition network element number, and the collecting thread sum does not also reach maximum thread and gathers number, new collecting thread of performance collection control thread creation joins this network element in this collecting thread.Request finishes.
The handling process of deletion network element after network element success of NM server deletion, sends a message to the performance collection remote service as shown in Figure 3, and request stops the performance collection function of this network element.After the performance collection remote service is received request message, forwards is controlled thread to performance collection.After performance collection control thread is received request message, search for the collecting thread that all have been created.To each collecting thread, judge the network element that whether comprises request startability acquisition function in the acquisition network element tabulation.If comprise the network element that request stops the performance collection function in certain collecting thread, then this network element is deleted from the acquisition network element tabulation of collecting thread.
If run into opposite extreme situations in addition, there are a large amount of network elements to break down in the system, can't communicate by letter with network management system, and when each network element carried out performance collection, need to judge network element state, but need long time like this, if a lot of network elements break down simultaneously, then have a strong impact on the efficient of performance collection,, in the process that NM server starts, started a network element state poll thread in order to address this problem.Concrete processing is as follows:
When (i) NM server starts, in database, obtain all network elements.
(j) obtain the maximum number of acquisition network element simultaneously of each poll thread from the poll configuration file.
(k) be that a plurality of network elements start the status poll flow process that a circulation is carried out one by one.
(l) in the status poll thread, regularly detect network element state, polling cycle can be regulated according to the network element number, and when the network element number was big, polling cycle can be provided with longer.
(m) after poll is newly successfully found a network element, send the request that starts the network element performance collection to performance acquisition controlling thread, performance collection control thread is searched for all properties collecting thread that this kind NE type has started, judge that then this network element is in the acquisition network element tabulation of certain performance collection thread Already in, if exist then return, otherwise just this network element is increased to during the acquisition network element of performance collection thread that certain acquisition network element number do not reach the maximum acquisition network element number of every thread of configuration tabulates.If the acquisition network element number in all properties collecting thread of current establishment has all reached the maximum of configuration, and the collecting thread sum does not also reach the maximum performance collection Thread Count that allows, then create a new performance collection thread for this network element.
(n) when the poll network element is failed, send the request that stops the network element performance collection to performance acquisition controlling thread, performance collection control thread is searched for all collecting threads that this kind NE type has started, therefrom find the performance collection thread at this network element place, from the acquisition network element tabulation, delete this network element, if after deleting this network element, do not comprised other network element in the acquisition network element tabulation, this collecting thread is stopped and deleting.
Because the poll thread gets polling cycle generally much smaller than collection period, so most of poll failure fault can be before execution performance be gathered, find and notify performance collection control thread, thereby improved collecting efficiency.
Consider that the network equipment changes through regular meeting; when increasing a network element; after performance collection control thread receives corresponding message; meeting automatically newly-increased network element is distributed to certain performance collection thread or a newly-built performance collecting thread comes this network element is carried out history performance data collection; when network element of deletion; after performance collection control thread receives corresponding message; can travel through each performance collection thread automatically up to searching the performance collection thread that comprises deleted network element, then this network element be deleted from the acquisition network element tabulation of this performance collection thread.
Consider the network communication problem, the network element on off operating mode sometimes can change, network management system can start network element state poll thread when starting, be responsible for the variation of monitoring network element state, when network element generation state variation, network element state poll thread sends the message that network element state changes to performance acquisition controlling thread, after performance collection control thread receives message, starts or stops performance collection task to this network element according to the state decision of network element.If automatic+startup that newly-increased network element, network element state poll thread are understood is to the polling tasks of this network element, if delete a network element, network element state poll thread can stop the polling tasks to this network element automatically.
Regularly adopt snmp protocol visit network element,, illustrate that network element and network management system are obstructed if do not receive the message that network element returns.For obstructed network element, needs in time be deleted them from the performance collection thread, otherwise can have a strong impact on the collecting efficiency of performance collection thread.The method that adopts is to find that when the poll thread network element changes to obstructed state from normal condition, then sends a message to the performance collection remote service, and request stops the performance collection function of this network element, as shown in Figure 5.Find that when the poll thread network element changes to normal condition from obstructed state, send a message to the performance collection remote service, request starts the performance collection function of this network element, as shown in Figure 4.
Below provide the format description of configuration file, consider the autgmentability of configuration file, configuration file adopts the xml file format.Mainly comprise following configuration item in the configuration file:
1, NE type;
2, whether the type network element is carried out the historical performance collection;
3, historical performance collection period Class1;
4, historical performance collection period type 2;
5, collecting thread class name;
6, this NE type collecting thread maximum number;
7, the maximum acquisition network element number of the every collecting thread of this NE type.
Though the embodiment of the invention is to be example with the BWA network management system, the inventive method is applicable in all kinds of network management systems.