CN102135911B - Method, device and system for starting and stopping server process - Google Patents

Method, device and system for starting and stopping server process Download PDF

Info

Publication number
CN102135911B
CN102135911B CN 201110071064 CN201110071064A CN102135911B CN 102135911 B CN102135911 B CN 102135911B CN 201110071064 CN201110071064 CN 201110071064 CN 201110071064 A CN201110071064 A CN 201110071064A CN 102135911 B CN102135911 B CN 102135911B
Authority
CN
China
Prior art keywords
server
stop
record
configuration file
information
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.)
Active
Application number
CN 201110071064
Other languages
Chinese (zh)
Other versions
CN102135911A (en
Inventor
贾琳飞
王祖峰
曹辉健
吴斐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN 201110071064 priority Critical patent/CN102135911B/en
Publication of CN102135911A publication Critical patent/CN102135911A/en
Application granted granted Critical
Publication of CN102135911B publication Critical patent/CN102135911B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method, device and system for starting and stopping a server process. The system comprises an information editing server, an information storage server, an information reading server, a concurrent execution server, an abnormality processing server and a plurality of application servers, wherein the information editing server is used for editing a server process configuration file; the information storage server is used for storing the server process configuration file and a log file; the information reading server is used for reading records to be processed, in the configuration file; the concurrent execution server is used for starting the start/stop process of the specified number of the application servers according to concurrent parameters; and the abnormality processing server is used for recording the information of the start/stop process of the application servers. According to the invention, modifications for the applied start/stop program during the increase and decrease of the servers can be avoided; concurrent control in specified number can be realized, thus, larger pressure to the servers can be avoided, and the time consumption of the whole start/stop operation can be reduced owing to multi-process running.

Description

A kind of server processes start and stop method, Apparatus and system
Technical field
The invention relates to the server processes control technology, is about a kind of server processes start and stop method, Apparatus and system concretely.
Background technology
In the application system in fields such as bank, to use a large amount of application server (as websphere) usually and support daily operation system.In the prior art, the start stop operation of these application server process is normally finished by the wsadmin.sh invoke script of carrying out under the server, script under this start stop mode has two kinds of jacl and jython, and jacl and jython need the server(apply names of start and stop) and the node(node name) all write in the script.Under developer and pattern that the O﹠M personnel separate, if newly-increased server must be faced with the problem of update routine version.The identical situation of server name for same application under each physical server, can in script, use for circulation to realize, but for the application of having used cluster, the server title does not have rule, then can't realize by for circulation, the script of a necessary every trade realizes that program and data just mix fully like this.
And, because jacl and jython are scripts, just be used for encapsulating function and the data of start stop operation, packaged script is submitted to wsadmin.sh to be carried out, there is not to obtain the function of operating system state, also can't assemble out the function of the status information of obtaining running environment according to existing syntax rule, application program just can't detect the process that starts like this, and then the process of number is formulated in uncontrollable startup, usually need all start up the server of all definition, but under the more situation of server, can cause dmgr(node administration process) the excessive and machine of delaying of pressure.Therefore, in jacl or jython script, can't effectively realize concurrent control.
In addition, because concrete start and stop information is to finish in script, and is very high for the requirement of abnormality processing, so must carry out abnormality processing in script, this just causes the size of code of script very big, and be not easy to the location be that problem has taken place which server process.When certain or certain several servers take place need re-execute unusually, owing to existing pattern is not judged server state, can cause repeating, thereby increase the consuming time of whole start stop operation.
Summary of the invention
The invention provides a kind of server processes start and stop method, Apparatus and system, revise when avoiding increasing and decreasing server and use the start and stop program, avoid reducing the consuming time of whole start stop operation to the bigger pressure of server.
To achieve these goals, the invention provides a kind of server processes start and stop method, this method comprises: steps A, establishment server processes configuration file are also preserved described server processes configuration file; Step B, order read the pending record in the configuration file; Whether the described pending record that step C, check are read exists the corresponding server process; If step D exists, obtain the status attribute of described server processes, and judge whether the start and stop parameter in the described pending record that reads is consistent with described status attribute; If step e is inconsistent, according to described start and stop parameter described server is carried out start stop operation.
Further, before whether the described pending record that check is read exists the corresponding server process, described method also comprises: the start and stop program process number that has started in the inquiry existing session, and the concurrent parameter of described start and stop program process number and storage compared, if described start and stop program process number carries out step C less than described concurrent parameter.
Further, before preserving described server processes configuration file, described method also comprises: whether the storage directory of judging described server processes configuration file exists; If not, create storage directory.
Further, after steps A, described method also comprises: judge whether logfile directory exists; If not, create logfile directory.
Further, before step B, described method also comprises: judge whether to exist pending record.
Further, described step B specifically comprises: judge whether comprise apply names in the described pending record, node, user name, password and five key elements of start and stop parameter; If described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories; Described 5 element informations are decrypted.
Further, if the consistent or described status attribute with described status attribute of the start and stop parameter in the described pending record that reads writes the key element in the described pending record and described status attribute in the described journal file for unusual.
Further, after step e, the information that start stop operation is returned is written in the journal file, and repeating step B is to step e.
To achieve these goals, the invention provides a kind of server processes start stop apparatus, this device comprises: the document creation unit is used for creating the server processes configuration file and preserving described server processes configuration file; The record reading unit is used for the pending record that order reads configuration file; The process verification unit is used for checking the described pending record that reads whether to have the corresponding server process; Judging unit is used for obtaining the status attribute of described server processes, and judges whether the start and stop parameter in the described pending record that reads is consistent with described status attribute; The start stop operation unit is used for according to described start and stop parameter described server being carried out start stop operation.
Further, this device also comprises: process is counted query unit, is used for the start and stop program process number that the inquiry existing session has started; Comparing unit is used for the concurrent parameter of described start and stop program process number and storage is compared.
Further, this device also comprises: the storage directory judging unit is used for judging whether the storage directory of described server processes configuration file exists; The storage directory creating unit is used for creating storage directory.
Further, this device also comprises: the logfile directory judging unit is used for judging whether logfile directory exists; The logfile directory creating unit is used for creating logfile directory.
Further, described device also comprises: the record judging unit is used for judging whether to exist pending record.
Further, described record reading unit comprises: the key element judge module is used for judging whether described pending record comprises apply names, node, user name, password and five key elements of start and stop parameter; The key element processing module is used for described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories; The key element deciphering module is used for described 5 element informations are decrypted.
Further, described device also comprises: the daily record writing unit, when the consistent or described status attribute with described status attribute of the start and stop parameter in the described pending record that reads when being unusual, be used for key element and the described status attribute of described pending record are write in the described journal file.
Further, described daily record writing unit also is written to journal file for the information that start stop operation is returned.
To achieve these goals, the invention provides a kind of server processes start stop system, this system comprises: information editing's server, and information storage server, information reads server, concurrent execution server, abnormality processing server and a plurality of application server; Described information editing's server is connected with information storage server, described information storage server reads server with information and is connected, described information reads server and is connected with concurrent execution server, described concurrent execution server is connected with the abnormality processing server, and described concurrent execution server is connected with application server by internal network; Described information editing's server is used for editing server process configuration file; Described information storage server is used for storage server process configuration file and journal file; Described information reads the pending record that server is used for reading configuration file; Described concurrent execution server is used for starting according to concurrent parameter the start and stop process of the described application server of specified quantity; Described abnormality processing server is used for the described application server start and stop progress information of record.
Further, described information editing's server comprises: the information creating device is used for creating the server processes configuration file; The information checking device is connected with described information checking device, and whether the key element that is used for the described server processes configuration file of check is complete; The information format device is connected with described information creating device, is used for described server processes configuration file is converted into the form of system identification.
Further, described information storage server comprises: the directory management device is used for server processes configuration file and journal file are carried out storage and managenent; Information storage apparatus is connected with described directory management device, is used for server processes configuration file and journal file are stored; The information cleaning plant is connected with described information storage apparatus, is used for regularly file size being detected, and after journal file reaches the upper limit journal file is cleared up.
Further, described information reads server and comprises: the format verification device, for form and the key element of the described server processes configuration file of check; Information read device is for the pending record that reads from described server processes configuration file order the configuration file; The information analysis device is connected with described information read device, is used for described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories; Information transmission device is connected with described information analysis device, is used for described 5 key elements are passed to described concurrent execution server.
Further, described concurrent execution server comprises: the concurrent scheduling device is used for starting according to concurrent parameter the start and stop process of the described application server of specified quantity, and monitors described start and stop running state of a process; The application state verifying attachment is connected with described concurrent scheduling device, is used for the process status of the described pending record corresponding application server of check, and judges that carrying out start stop operation still skips; The password to decipher device is connected with described application state verifying attachment, is used for described 5 key elements are decrypted; The start stop operation device is connected with described password to decipher device, is used for obtaining the process status of described pending record corresponding application server, and described application server is carried out start stop operation.
Further, described abnormality processing server comprises: the beginning log recording apparatus is used for the zero-time of each application server start and stop program scheduler is recorded to total daily record; The state verification log recording apparatus is used for the described application state verifying attachment information of record, and the described information write state checking daily record that will return; The deciphering log recording apparatus is used for successful decryption or failure information that the described password to decipher device of record returns; The abnormality processing device, successful, the failure or the abnormal information that are used for each application server start stop operation is returned are recorded to abnormal log; The daily record resolver with the described abnormality processing device that is connected, is used for resolving described abnormal log, and mistake or unusual whether occurs according to the key word coupling that start stop operation is carried out; The result log pen recorder is used for the information of the described abnormal log of described parsing is recorded to total daily record.
Further, if described 5 key elements are incomplete, described format verification device also is used for the uneven perfect information of key element is recorded to abnormal log.
The useful technique effect of the embodiment of the invention is, the present invention has realized separating of server info and start and stop programs, do not need server and the node title of application server are directly fixed in the program, thus avoided increase and decrease server in the prior art the time need revise the problem of using the start and stop program.Owing to the startup of process and in service state of a process is detected, can realize the concurrent control that specifies number, namely can start according to the concurrent parameter of from configuration file, obtaining, both avoided to the bigger pressure of server, again can be owing to the multi-process operation reduces the consuming time of whole start stop operation.This system has realized automation mechanized operation simultaneously, can move automatically in the time of carrying out.Owing to complete daily record and abnormality processing are arranged, are convenient to analysis and the location of problem.When repeating start stop operation, the present invention can prejudge the state of server, can avoid a server is carried out repeated priming or shut-down operation, has saved the working time of start stop operation.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.In the accompanying drawings:
Fig. 1 is the structural representation of embodiment of the invention server processes start stop system;
Fig. 2 is the structured flowchart of embodiment of the invention information editing server;
Fig. 3 is the element synoptic diagram of embodiment of the invention configuration file;
Fig. 4 is the structured flowchart of embodiment of the invention information storage server;
Fig. 5 reads the structured flowchart of server for embodiment of the invention information;
Fig. 6 is the structured flowchart of the concurrent execution server of the embodiment of the invention;
Fig. 7 is the structured flowchart of embodiment of the invention abnormality processing server;
Fig. 8 is embodiment of the invention server processes start and stop method flow diagrams;
Fig. 9 is the detail flowchart of embodiment of the invention server processes start and stop method;
Figure 10 is the structural representation of embodiment of the invention server processes start stop apparatus;
Figure 11 is the structured flowchart of embodiment of the invention record reading unit.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer, below in conjunction with accompanying drawing the embodiment of the invention is described in further details.At this, illustrative examples of the present invention and explanation thereof are used for explanation the present invention, but not as a limitation of the invention.
As shown in Figure 1, the embodiment of the invention provides a kind of server processes start stop system, and this system comprises: information editing's server 101, information storage server 102, information reads server 103, concurrent execution server 104, abnormality processing server 105 and a plurality of application server 106.
Described information editing's server 101 is connected with information storage server 102, described information storage server 102 reads server 103 with information and is connected, described information reads server 103 and is connected with concurrent execution server 104, described concurrent execution server 104 is connected with abnormality processing server 105, and described concurrent execution server 104 is connected with application server 106 by internal network.
Information editing's server 101 can be used for editing server process configuration file.As shown in Figure 2, information editing's server 101 comprises: information creating device 201, information checking device 202 and information format device 203.In addition, information editing's server 101 can also comprise for the input media of input editing information (as keyboard), is used for the display device of display file information etc.
Information creating device 201 be used for to be created the server processes configuration file, but and provides editing interface.The configuration file sample as shown in Figure 3.In Fig. 3, node uses corresponding node, server apply names, user user name, password password, and action represents the parameter of start stop operation, concrete 0 corresponding the startup, and 1 correspondence stops.
Whether information checking device 202 is connected with described information checking device, and the configuration file of user input is carried out verification, check the key element of described server processes configuration file complete, if not entirely then point out the user.
Information format device 203, be connected with described information creating device, be used for described server processes configuration file format is turned to the discernible form of system, as under the unix system, needing configuration file is transformed the unix form, otherwise program can read mess code.
Information storage server 102 can be used for storage server process configuration file and journal file.As shown in Figure 4, information storage server 102 comprises: directory management device 401, information storage apparatus 402 and information cleaning plant 403.
401 pairs of server processes configuration files of directory management device and journal file carry out storage and managenent, the output text of whole start stop operation system is managed, and deposit according to the form of catalogue.For configuration file, general employing fixedly catalogue is deposited, and for example can be placed under the config catalogue.According to the date organization directory, for example can set up with " 20100901 " is the catalogue of directory name for various journal files (total journal file, thermodynamic state verification journal file, journal file), is used for preserving the various daily records that on September 1st, 2010 generated.
Information storage apparatus 402 is connected with described directory management device, and server processes configuration file and journal file are stored, and the information of exporting in the system is saved in the file of appointment, and these files are kept at separately assigned catalogue.Information storage apparatus 402 can be various storeies, as SRAM storer, DDR storer, CAM storer, also can be USB flash disk, hard disk etc.
Information cleaning plant 403 is connected with described information storage apparatus, regularly file size is detected, and after journal file reaches storage cap journal file is cleared up.
Information reads server 103 can read pending record in the configuration file, and as shown in Figure 5, information reads server 103 and comprises: format verification device 501, information read device 502, information analysis device 503 and information transmission device 504.
Format verification device 501 is opened the server processes configuration file of execution, and form and the key element of check server processes configuration file.At first obtain the code system information of the text, confirm whether be the file layout that to identify.Open file again, by the row reading and recording, and the record of every row carried out cutting according to separator, with the key element of check server if complete element information is uneven then can be in the recording exceptional daily record, and skip this record.Five key elements of configuration file are: node uses corresponding node, server apply names, user user name, password password, action start stop operation parameter.The form of every record of configuration file can be server node user password action, and separator can be the space, and for example cm1p55a2c6Node01root root 1).If described 5 key elements are incomplete, format verification device 501 is also with the uneven perfect information of key element being recorded in the abnormal log.
Information read device 502 order from described server processes configuration file reads the pending record in the configuration file, and namely order reads every line item from the configuration file of appointment.
Information analysis device 503 is connected with described information read device, is used for described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories.
Information transmission device 504, be connected with described information analysis device, described 5 key elements are passed to described concurrent execution server, if transmit successfully then the instruction that back pass continues to read reads next record for information read device 502, if fail then log and point out the user.
Concurrent execution server 104 starts the start and stop process of the described application server of specified quantity according to concurrent parameter; As shown in Figure 6, concurrent execution server 104 comprises: concurrent scheduling device 601, application state verifying attachment 602, password to decipher device 603 and start stop operation device 604.
Concurrent scheduling device 601 starts the start and stop process of the described application server of specified quantity according to concurrent parameter, and monitors described start and stop running state of a process.Wherein, the similar para_num=4 of concurrent parameter format, expression concurrent process form is 4, is installed in system by the system maintenance personnel to arrange under the congfig of application service catalogue initialized the time.Concurrent scheduling device 601 starts the start and stop application server process of specified quantity, and monitors these runnings state of a process, after certain service processes finishes, can continue to start the start and stop process up to the Servers-all complete operation.
Application state verifying attachment 602, be connected with described concurrent scheduling device, the process status that is used for the described pending record corresponding application server of check, if this application server has been when starting or stopping, according to startup or the shut-down operation that will carry out, judging whether needs to continue to carry out still to skip, and can effectively reduce consuming time that repetitive operation brings.
In order to prevent that password from leaking, general password in configuration file is preserved with the ciphertext form, and password to decipher device 603 is connected with described application state verifying attachment, use the 3DES algorithm that described 5 key elements are decrypted, to make things convenient for next step start stop operation.
Start stop operation device 604, be connected with described password to decipher device, process status according to the described pending record corresponding application server of start and stop parameter acquiring in 5 element informations that import into, and described application server carried out start stop operation, and the information that application server returns is outputed in the daily record.
The described application server start and stop progress information of abnormality processing server 105 records.As shown in Figure 7, abnormality processing server 105 comprises: beginning log recording apparatus 701, state verification log recording apparatus 702, deciphering log recording apparatus 703, abnormality processing device 704, daily record resolver 705 and result log pen recorder 706.
Beginning log recording apparatus 701 is recorded to the zero-time of each application server start and stop program scheduler in total daily record, and total daily record is used for the zero-time of each module of record and the operation result of each server.
State verification log recording apparatus 702, be used for the described application state verifying attachment information of record, and the described information write state checking daily record that will return, if the state return message (is that current state has been expecting state for skipping, need not execution command, then skip), element information, time, the execution of then recording this application server information such as skips in order to search the analysis reason in the future.
Successful decryption or failure information that the described password to decipher device of deciphering log recording apparatus 703 record returns are if the deciphering failure then is logged in the daily record so that orientation problem afterwards.Abnormal log is used for the abnormal information that each checking procedure of record produces.
Abnormality processing device 704 is recorded to successful, failure or the abnormal information that each application server start stop operation returns in the abnormal log, and this information comprises success or failure information incessantly, also comprises all abnormal informations that service is returned when carrying out.Record these information and help the problem that takes place in the Analysis server start and stop.
Daily record resolver 705 with the described abnormality processing device that is connected, is used for resolving described abnormal log, and mistake or unusual whether occurs according to the key word coupling that start stop operation is carried out.
Result log pen recorder 706 is used for the information of the described abnormal log of described parsing is recorded to total daily record.
Abnormality processing server 105 has not only recorded time and the key message of each committed step, and can also take place unusual in catching exception information, and carry out abnormality processing, avoid because the failure that causes whole concurrent actuating unit to be carried out unusually of an application server.
As shown in Figure 8, the embodiment of the invention provides a kind of server processes start and stop method, and this method comprises: create the server processes configuration file and preserve described server processes configuration file step S801; Order reads the pending recording step S802 in the configuration file; Whether the described pending record that check is read exists corresponding server process steps S803; If exist, obtain the status attribute of described server processes, and judge start and stop parameter and the described status attribute consistent step S804 whether in the described pending record that reads; If inconsistent, according to described start and stop parameter described server is carried out start stop operation step S805.
Whether the described pending record that reads in check exists corresponding server process (step S803) before, this method can also comprise: the start and stop program process number that has started in the inquiry existing session, and the concurrent parameter of described start and stop program process number and storage compared, if described start and stop program process number carries out step C less than described concurrent parameter.
Before preserving described server processes configuration file, this method can also comprise: whether the storage directory of judging described server processes configuration file exists; If not, create storage directory.
After step S801, described method also comprises: judge whether logfile directory exists; If not, create logfile directory.If the consistent or described status attribute with described status attribute of the start and stop parameter in the described pending record that reads is for unusual, need the key element in the described pending record and described status attribute are write in the described journal file, and return step S802 and read the pending record of next bar in the configuration file in proper order.
The order read in the configuration file pending record (step S802) before, this method also comprises: judge whether to exist pending record.Step S802 specifically comprises: judge whether comprise apply names in the described pending record, node, user name, password and five key elements of start and stop parameter; If described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories; Described 5 element informations are decrypted.The pending record that order reads in the configuration file can be the pending record that reads line by line in the configuration file, reads the pending record of last column always.
After step S805, the information that start stop operation need be returned is written in the journal file, and repeating step S802 is to step S805.
Fig. 9 is the detail flowchart of embodiment of the invention server processes start and stop method.As shown in Figure 9, this flow process comprises:
Step S901: information creating device 201 editors need the configuration file of the application server process correspondence of start and stop.(the 5th key element action is the start and stop parameters in the configuration file, when it is 0 corresponding enabled instruction startServer, is 1 corresponding halt instruction stopServer).
Step S902: 202 pairs of configuration files of information checking device carry out format check.If verification is passed through, information checking device 202 passes to information storage apparatus 402 with configuration file.If verification not by point out user error information.
Step S903: directory management device 401 judges that whether the catalogue of configuration file exists, and if there is no then sets up catalogue.For example the congfig catalogue can be used for the administration configuration file.
Step S904: information storage apparatus 402 is preserved configuration file under designated directory.
Step S905: directory management device 401 judges whether the catalogue of journal file exists.If do not exist, then read the system data on the same day, and be that directory name is set up catalogue with the date.For example, 20100901 catalogues are used for the various journal files of management.
Step S906: information read device 502 judges whether record that need to handle, if not then enter step S917, if having then enter step S907.
Step S907: information read device 502 reads the pending record in the configuration file line by line.And the pending record of this bar passed to format verification device 501, whether the five elements information of judging the server processes start and stop is complete, if information is complete, then recalls information resolver 503 is resolved, recalls information conveyer 504 carries out the data transmission again, enters step S908.Otherwise call abnormality processing device 704 error message that element information and the form demo plant 501 of the pending record of this bar returns is written to daily record, and jump procedure S906.
Step S908: password to decipher device 603 receives the element information that information transmission device 504 passes over, and enciphered message is decrypted.If deciphering failure is then called deciphering log recording apparatus 703 error message that element information and the password to decipher device 603 of the pending record of this bar returns is written to abnormal log, and jump procedure S906.
Step S909: concurrent scheduling device 601 obtains started what start and stop program process (obtaining progress information as the mode by ps-ef under the unix system) in the existing session by the session information of inquiry system, this number and the concurrent parameter of importing into is compared again.If existing process number is less than concurrent parameter, invocation step S910 then, otherwise enter step S916.
Step S910: the element information after password to decipher device 603 will be deciphered passes to application state verifying attachment 602.
Step S911: whether the key element that application state verifying attachment 602 is searched this pending record has existed the corresponding server process.If do not exist, the key element corresponding server process status attribute that then records this pending record is that STOP(represents that server processes stop); If exist, then obtain this state of a process attribute: have this moment STARTED(to represent that server processes normally move) or EXCEPTION(represent that server processes are unusual).
Step S912: the start and stop parameter that application state verifying attachment 602 compares in status attribute and the key element, if consistent, represent that this operation does not need to carry out, the server processes state has been the desired result of operation, then enters step S913.The situation that status attribute is consistent with the start and stop parameter can be as follows: be resolved to " STARTED ", the start and stop parameter is 0; The server processes state that perhaps is resolved to is STOP, and the start and stop parameter is 1.If both are more inconsistent, then jump to step 300.If the server state of resolving is EXCEPTION, enter step S913.
Step S913: state verification log recording apparatus 702 is written to element information and the corresponding with service device process status attribute thereof of the pending record of this bar in the state verification daily record, and jumps to step S906.
Step S914: start stop operation device 604 is finished this instruction corresponding server process operation respectively according to the start and stop parameter, as receives 0, then imports the start-up operation that element information is finished the given server process into to starting in the server processes order.For example call the AdminControl.startServer operation among the wsadmin.sh, finish the startup server operation.If receive 1,604 in start stop operation device calls the AdminControl.stopServer operation, finishes to stop server operation.
Step S915: abnormality processing device 704 is caught the information of returning after the start and stop instruction is carried out, and these information are logged in the daily record.And jump to step S906.
Step S916: concurrent scheduling device 601 is waited for 10 seconds, jump procedure S909.Reduce the server burden that frequent detection brings with this.
Step S917: concurrent scheduling device 601 checks all start and stop processes, after all start and stop processes finish, calls daily record resolver 705 and is responsible for resolving daily record.Whether daily record resolver 705 has taken place wrong according to analysis result or is unusual, then calls the unusual or error message that result log pen recorder 706 will parse and outputs in total daily record if having, and whole start stop operation is finished.
As shown in figure 10, the invention provides a kind of server processes start stop apparatus, this device comprises: document creation unit 1001, record reading unit 1002, process verification unit 1003, judging unit 1004 and start stop operation unit 1005.
Document creation unit 1001 is used for creating the server processes configuration file and preserving described server processes configuration file.(the 5th key element action is the start and stop parameters in the configuration file, when it is 0 corresponding enabled instruction startServer, is 1 corresponding halt instruction stopServer).
Further, as shown in figure 10, this server processes start stop apparatus can also comprise: storage directory judging unit 1006 and storage directory creating unit 1007, and storage directory judging unit 1006 is used for judging whether the storage directory of described server processes configuration file exists; Storage directory creating unit 1007 is used for creating storage directory.The server processes configuration file of creating is kept in the storage directory of establishment, and for example the congfig catalogue can be used for the administration configuration file.
Further, as shown in figure 10, this server processes start stop apparatus also comprises: logfile directory judging unit 1008 and logfile directory creating unit 1009, logfile directory judging unit 1008 is used for judging whether logfile directory exists, if do not exist, can utilize logfile directory creating unit 1009 to read system data on the same day, and be that directory name is set up catalogue with the date.For example, 20100901 catalogues are used for the various journal files of management.
Further, this server processes start stop apparatus also comprises: record judging unit (scheming not shown) is used for judging whether to exist pending record.
Record reading unit 1002 is used for the pending record that order reads configuration file.As shown in figure 11, record reading unit 1002 comprises: key element judge module 1101, key element processing module 1102 and key element deciphering module 1103.Key element judge module 1101 is used for judging whether described pending record comprises apply names, node, user name, password and five key elements of start and stop parameter; Key element processing module 1102 is used for described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories; Key element deciphering module 1103 is used for described 5 element informations are decrypted.
Further, as shown in figure 10, this server processes start stop apparatus can also comprise: process is counted query unit 1010 and comparing unit 1011.Process is counted query unit 1010 and is used for the start and stop program process number that the inquiry existing session has started, and comparing unit 1011 is used for the concurrent parameter of described start and stop program process number and storage is compared.Obtain started what start and stop program process (obtaining progress information as the mode by ps-ef under the unix system) in the existing session by the session information of inquiry system, again this number and the concurrent parameter of importing into are compared.
Process verification unit 1003 is used for checking the described pending record that reads whether to have the corresponding server process, if do not exist, recording this record corresponding server process status attribute to be matched is that STOP(represents that server processes stop).
If exist, obtain this state of a process attribute: have this moment STARTED(to represent that server processes normally move) or EXCEPTION(represent that server processes are unusual).
If exist, judging unit 1004 is used for obtaining the status attribute of described server processes, and judges whether the start and stop parameter in the described pending record that reads is consistent with described status attribute.If consistent, represent that this operation does not need to carry out, the server processes state has been the desired result of operation.The situation that status attribute is consistent with the start and stop parameter can be as follows: be resolved to " STARTED ", the start and stop parameter is 0; The server processes state that perhaps is resolved to is STOP, and the start and stop parameter is 1.
Further, this server processes start stop apparatus also comprises: daily record writing unit (scheming not shown), when the consistent or described status attribute with described status attribute of the start and stop parameter in the described pending record that reads when being unusual, the daily record writing unit writes the key element in the described pending record and described status attribute in the described journal file.
If both are more inconsistent, start stop operation unit 1005 is used for according to described start and stop parameter described server being carried out start stop operation.The information that above-mentioned daily record writing unit also is used for start stop operation is returned is written to journal file.
This device also comprises daily record resolution unit and daily record result treatment unit (not shown).After all start and stop processes finish; call the daily record resolution unit and resolve daily record; whether taken place wrong or unusual according to analysis result, then called the unusual or error message that daily record result treatment unit will parse and output in total daily record if having, whole start stop operation is finished.
The useful technique effect of the embodiment of the invention is, the present invention has realized separating of server info and start and stop programs, do not need server and the node title of application server are directly fixed in the program, thus avoided increase and decrease server in the prior art the time need revise the problem of using the start and stop program.Owing to the startup of process and in service state of a process is detected, can realize the concurrent control that specifies number, namely can start according to the concurrent parameter of from configuration file, obtaining, both avoided to the bigger pressure of server, again can be owing to the multi-process operation reduces the consuming time of whole start stop operation.This system has realized automation mechanized operation simultaneously, can move automatically in the time of carrying out.Owing to complete daily record and abnormality processing are arranged, are convenient to analysis and the location of problem.When repeating start stop operation, the present invention can prejudge the state of server, can avoid a server is carried out repeated priming or shut-down operation, has saved the working time of start stop operation.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is specific embodiments of the invention; and be not intended to limit the scope of the invention; within the spirit and principles in the present invention all, any modification of making, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (16)

1. server processes start and stop method is characterized in that described method comprises:
Steps A, establishment server processes configuration file are also preserved described server processes configuration file;
Step B, order read the pending record in the configuration file;
Whether the described pending record that step C, check are read exists the corresponding server process;
If step D exists, obtain the status attribute of described server processes, and judge whether the start and stop parameter in the described pending record that reads is consistent with described status attribute;
If step e is inconsistent, according to described start and stop parameter described server processes are carried out start stop operation.
2. the method for claim 1 is characterized in that, before whether the described pending record that check is read existed the corresponding server process, described method also comprised:
Inquire about the start and stop program process number that has started in the existing session, and the concurrent parameter of described start and stop program process number and storage is compared, if described start and stop program process number carries out step C less than described concurrent parameter.
3. method as claimed in claim 1 or 2 is characterized in that, before preserving described server processes configuration file, described method also comprises:
Whether the storage directory of judging described server processes configuration file exists;
If not, create storage directory.
4. method as claimed in claim 1 or 2 is characterized in that, after steps A, described method also comprises:
Judge whether logfile directory exists;
If not, create logfile directory.
5. method as claimed in claim 1 or 2 is characterized in that, before step B, described method also comprises: judge whether to exist pending record.
6. method as claimed in claim 1 or 2 is characterized in that, described step B specifically comprises:
Judge whether comprise apply names in the described pending record, node, user name, password and five key elements of start and stop parameter;
If described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories;
Described 5 element informations are decrypted.
7. method as claimed in claim 4, it is characterized in that, if the consistent or described status attribute with described status attribute of the start and stop parameter in the described pending record that reads is for unusual, key element in the described pending record and described status attribute are write in the described journal file, and return step B and read the pending record of next bar in the configuration file in proper order.
8. method as claimed in claim 5 is characterized in that, after step e, the information that start stop operation is returned is written in the journal file, and repeating step B is to step e.
9. a server processes start stop apparatus is characterized in that, described device comprises:
The document creation unit is used for creating the server processes configuration file and preserving described server processes configuration file;
The record reading unit is used for the pending record that order reads configuration file;
The process verification unit is used for checking the described pending record that reads whether to have the corresponding server process;
Judging unit if there is the corresponding server process in described pending record, is used for obtaining the status attribute of described server processes, and judges whether the start and stop parameter in the described pending record that reads is consistent with described status attribute;
The start stop operation unit if the start and stop parameter in the described pending record that reads and described status attribute are inconsistent, is used for according to described start and stop parameter described server processes being carried out start stop operation.
10. device as claimed in claim 9 is characterized in that, described device also comprises:
Process is counted query unit, is used for the start and stop program process number that the inquiry existing session has started;
Comparing unit, be used for the concurrent parameter of described start and stop program process number and storage is compared, if described start and stop program process number is less than described concurrent parameter, whether the described pending record that reads by described process verification unit check exists the corresponding server process.
11. as claim 9 or 10 described devices, it is characterized in that described device also comprises:
The storage directory judging unit is used for judging whether the storage directory of described server processes configuration file exists;
The storage directory creating unit if the storage directory of described server processes configuration file does not exist, is used for creating storage directory.
12. as claim 9 or 10 described devices, it is characterized in that described device also comprises:
The logfile directory judging unit is used for judging whether logfile directory exists;
The logfile directory creating unit if logfile directory does not exist, is used for creating logfile directory.
13. as claim 9 or 10 described devices, it is characterized in that described device also comprises: the record judging unit is used for judging whether to exist pending record.
14., it is characterized in that described record reading unit comprises as claim 9 or 10 described devices:
The key element judge module is used for judging whether described pending record comprises apply names, node, user name, password and five key elements of start and stop parameter;
The key element processing module if comprise apply names, node, user name, password and five key elements of start and stop parameter in the described pending record, is used for described pending record is divided into 5 territories, and is 5 key elements with the information analysis in described 5 territories;
The key element deciphering module is used for described 5 element informations are decrypted.
15. device as claimed in claim 12 is characterized in that, described device also comprises:
The daily record writing unit, if the consistent or described status attribute with described status attribute of the start and stop parameter in the described pending record that reads is for unusual, be used for key element and the described status attribute of described pending record are write in the described journal file, and read the pending record of next bar in the configuration file in proper order by described record reading unit.
16. device as claimed in claim 15, it is characterized in that, after the start stop operation unit carries out start stop operation according to described start and stop parameter to described server, the information that described daily record writing unit also is used for start stop operation is returned is written to journal file, and repeats the operation of described record reading unit, process verification unit, judging unit and start stop operation unit.
CN 201110071064 2011-03-23 2011-03-23 Method, device and system for starting and stopping server process Active CN102135911B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110071064 CN102135911B (en) 2011-03-23 2011-03-23 Method, device and system for starting and stopping server process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110071064 CN102135911B (en) 2011-03-23 2011-03-23 Method, device and system for starting and stopping server process

Publications (2)

Publication Number Publication Date
CN102135911A CN102135911A (en) 2011-07-27
CN102135911B true CN102135911B (en) 2013-08-28

Family

ID=44295702

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110071064 Active CN102135911B (en) 2011-03-23 2011-03-23 Method, device and system for starting and stopping server process

Country Status (1)

Country Link
CN (1) CN102135911B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103138985B (en) * 2011-12-01 2016-03-02 中国移动通信集团浙江有限公司 A kind of supporting network business host processes control method and system
CN103618788A (en) * 2013-11-26 2014-03-05 曙光信息产业股份有限公司 System high-availability method supporting B/S structure
CN107423620B (en) * 2017-03-12 2020-11-24 苏州浪潮智能科技有限公司 Management method and device for storage server service process
CN107317873B (en) * 2017-07-21 2020-08-11 曙光信息产业(北京)有限公司 Session processing method and device
CN107832133A (en) * 2017-11-20 2018-03-23 中国银行股份有限公司 Course control method and device under CICS cluster environment
CN109582530B (en) * 2018-09-30 2024-05-14 中国平安人寿保险股份有限公司 System control method, device, computer and computer readable storage medium
CN112579385A (en) * 2019-09-29 2021-03-30 中国石油天然气集团有限公司 Server file monitoring method and device
CN112764989A (en) * 2021-01-12 2021-05-07 湖北宸威玺链信息技术有限公司 Method for monitoring start-stop time of application service
CN113377463B (en) * 2021-07-06 2022-11-08 上海通联金融服务有限公司 Credit card core system process starting and stopping method and system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1386222A (en) * 2000-01-21 2002-12-18 梦擎科技股份有限公司 Apparatus and method for starting application software on a computer and multi-monitor computer using said apparatus and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2005106623A1 (en) * 2004-04-28 2008-03-21 松下電器産業株式会社 CPU clock control device, CPU clock control method, CPU clock control program, recording medium, and transmission medium
JP4886558B2 (en) * 2007-03-13 2012-02-29 株式会社東芝 Information processing device
JP5138322B2 (en) * 2007-09-14 2013-02-06 東京エレクトロン株式会社 Processing system control apparatus, processing system control method, and storage medium storing control program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1386222A (en) * 2000-01-21 2002-12-18 梦擎科技股份有限公司 Apparatus and method for starting application software on a computer and multi-monitor computer using said apparatus and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP特开2008-225929A 2008.09.25

Also Published As

Publication number Publication date
CN102135911A (en) 2011-07-27

Similar Documents

Publication Publication Date Title
CN102135911B (en) Method, device and system for starting and stopping server process
Beizer Black-box testing: techniques for functional testing of software and systems
Carter et al. Building organizational decision support systems
CN103069385B (en) System and method for dynamic load calculating based on figure
US20140181793A1 (en) Method of automatically testing different software applications for defects
US20110113287A1 (en) System for Automated Generation of Computer Test Procedures
US20180197123A1 (en) Robotics process automation platform
US11481246B1 (en) Systems, devices, and methods for mainframe data management
CN102650938B (en) Management method for log system and log system
WO2016093803A1 (en) Separating test verifications from test executions
CN101170568B (en) A method for automatically generating and executing Telnet command via batch mode
CN115309648A (en) Robot automation process management method and system
US7313786B2 (en) Grid-enabled ANT compatible with both stand-alone and grid-based computing systems
CN201548954U (en) Device for automatically testing Web page
CN111026604B (en) Log file analysis method and device
CN117033492A (en) Data importing method and device, storage medium and electronic equipment
CN114416601B (en) Network security information acquisition engine and task management system and method
JP2009122754A (en) Software development support device
US6427208B1 (en) Image file change capture method and apparatus
CN102597965B (en) Operation verification device, operation verification method
JP5592828B2 (en) Patch impact analysis apparatus, method and program
CN116594917B (en) UI testing method and device, electronic equipment and machine-readable storage medium
CN111241191A (en) Database synchronization method and device
CN113094265B (en) Analysis method and analysis device for test script and electronic equipment
US20120150951A1 (en) Computer system, recording medium and maintenance support system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant