Dispatch automation system application state management method
Technical field
The present invention relates to a kind of management method of system running state of server, belong to technical field of automation.
Background technology
In the existing dispatch automated system, active and standby machine management method generally be with a station server as unit, except that the server of state on duty, dispose the other redundant server be in hot stand-by duty again.This administrative mechanism underaction, the machine in case server on duty is delayed, standby server replaces its work, and all application systems of moving all will experience handoff procedure one time.
Summary of the invention
Technical problem to be solved by this invention provides a kind of fine size, flexible, reliable application system application state management method.
For solving the problems of the technologies described above, the invention provides a kind of dispatch automation system application state management method.The present invention is a unit with the application system on the server, the main frame of definition application level and the notion of standby host, arbitrarily main frame of using and standby host can separate configurations on any server, reach flexibly, manage reliably the purpose of all application system running statuses.
The present invention adopts following technical scheme to realize:
The management method of a kind of system running state of the present invention is characterized in that may further comprise the steps:
1) initialization of configuration management: start-up system managing process at first, start all processes that belong to certain application then, finish the initialization of application, after finishing, initialization determines the active and standby machine of this application by the main and standby competition method between using, starting node after all application starts are finished monitors and managing process, running status to server hardware monitors, configuration management is helped out;
2) after the configuration management initialization is finished,, judge whether to carry out the switching of application state automatically by checking the application state information in the whole system,
In described step 1), described main and standby competition method may further comprise the steps:
(1) as if a certain standby host that is applied as, and existing other main frames in the system, the message that this is applied as standby host then sent; If do not have main frame in the system, and the priority that should use is the highest, sends the message that this application is a main frame on duty;
(2) if this application is a main frame, detect in the system that to also have Another Application also be main frame, relatively should use and the priority of Another Application, with priority low switch to standby host;
In described step 2) in, its state information processing procedure is: at first judge the network state of this machine, if the network of this machine is obstructed, then application all on this machine is changed to the suspension state; If this meshed network is in good condition, then receive the application heartbeat message corresponding, and judge the running status of each application with this node, corresponding information is saved in the application state information table; All do not send the heartbeat message message if some application surpass N specified period, then this application is changed to suspension, relevant information is saved in the application state information table.
The automatic switchover of described application and main and standby competition method can be carried out between the application on the multiple servers, rather than only limit to two-server.
Be provided with the interface module of activestandby state information of each application of inquiry at work station, be used to realize that work station chooses the server at any applied host machine place at any time and connect.
Above-mentioned functions realizes by computer program, can operate on various UNIX and Linux, the Windows operating system, and not rely on the software that operating system carries.
The beneficial effect that the present invention reached:
The present invention is by above step, and can reach following technique effect: 1, granularity of division is thin, and the concept definition of active and standby machine is at application level; 2, the active and standby machine of each application system does not have relevance, and independent part is deployed on any server separately; 3, all functions are to have computer program to realize fully, may operate on various UNIX and Linux, the Windows operating system, not the software that need carry by any operating system; 4, have cross-platform ability, the active and standby machine of application system can be deployed on the server of different operating system; 5, state-detection cycle, switching time, parameter programming such as interval was adjustable; 6, application system can judge whether the running status of self is normal, and whether decision automaticallyes switch; 7, can be by the running status of interface to external world's output application system.In sum, the present invention is a kind of fine size, flexible, reliable application system application state management method.
Description of drawings
Fig. 1 is active and standby switching state figure among the present invention;
Fig. 2 is a configuration management initialization flowchart among the present invention;
Application initializes flow chart among Fig. 3 the present invention;
Fig. 4 is a state information handling process among the present invention;
Fig. 5 uses active and standby switching flow figure among the present invention.
Embodiment
Below in conjunction with accompanying drawing this bright dispatch automation system application state management method is further described.
Fig. 1 is active and standby switching state figure among the present invention, and each application has initialization, is equipped with states such as attitude, main frame, suspension, fault.
Use app
a(i) after the initialization, at first enter the standby host state.Check the state information of received application this moment: (1) is if use app
aExisting main frame app on duty
a(j), app then
a(i) be in standby host up to app always
aThere is not main frame; (2) do not have other main frames, check app
aThe application priority of all standby hosts, if app
a(i) priority is the highest, then app
a(i) become application app
aMain frame on duty.
App
a(i) be in Host Status, be checked through app
aAlso have other main frames, relatively app
aThe application priority of main frame, with priority low switch to standby host;
Work as app
a(i) detect own suspension after, state is set to suspension, when detect network recovery normal after, oneself state is switched to standby host;
Work as app
a(i) detect and to switch to malfunction when being in malfunction, no longer switch to standby host after being in fault case.
Fig. 2 is a configuration management initialization flowchart among the present invention, and the initialization of application is the initialized part of configuration management, and the initialization flow process of configuration management as shown in Figure 2.At first the start-up system managing process starts all processes that belong to certain application then, finishes the initialization of application.Determine the active and standby machine of this application after initialization is finished by the main and standby competition method between using, all application starts are finished the back and started node supervision and managing process, the running status of server hardware is monitored, configuration management is helped out.
Application initializes flow chart among Fig. 3 the present invention is used app
i(j) initialization flow process as shown in Figure 3.Relation according to application and node, application and process is carried out initialization, app to application
i(j) after starting successfully, enter a latent period, in this cycle, receive the information of other servers of self-application and report in the real-time storehouse, wait for finish after with app
i(j) be changed to standby host; If initialization is unsuccessful, then with app
i(j) be changed to fault case.
After the configuration management initialization was finished, hypervisor was in the state that sends and receive heartbeat message, and heartbeat message is exactly an application state information.By checking the application state information in the whole system, judge whether to carry out the switching of application state automatically.Fig. 4 is a state information handling process among the present invention, at first judges the network state of this machine, if the network of this machine is obstructed, then application all on this machine is changed to the suspension state; If this meshed network is in good condition, then receive the application heartbeat message corresponding, and judge the running status of each application with this node, corresponding information is saved in the application state information table; All do not send the heartbeat message message if some application surpass N specified period, then this application is changed to suspension, relevant information is saved in the application state information table.
Fig. 5 is that the present invention uses active and standby switching flow figure, checks in system-wide application state information and uses app
iThe activestandby state on Servers-all.If app
i(j) be standby host, and existing other main frames in the system, app then sent
i(j) for using app
iThe message of standby host; If do not have main frame, app in the system
i(j) priority is the highest, sends app
i(j) be the message of main frame on duty;
If app
i(j) be main frame, detect in the system and to also have app
i(k) also be main frame, relatively app
i(j) and app
i(k) priority, with priority low switch to standby host.
The present invention is illustrated according to the preferred embodiment, should be appreciated that but the foregoing description does not limit the present invention in any form, and all employings are equal to replaces or the technical scheme that form obtained of equivalent transformation, all drops within protection scope of the present invention.