CN113835966A - Service process management method, device, storage system and storage medium - Google Patents
Service process management method, device, storage system and storage medium Download PDFInfo
- Publication number
- CN113835966A CN113835966A CN202111136550.2A CN202111136550A CN113835966A CN 113835966 A CN113835966 A CN 113835966A CN 202111136550 A CN202111136550 A CN 202111136550A CN 113835966 A CN113835966 A CN 113835966A
- Authority
- CN
- China
- Prior art keywords
- service process
- service
- restarting
- acquiring
- type
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 450
- 230000008569 process Effects 0.000 title claims abstract description 418
- 238000007726 management method Methods 0.000 title claims abstract description 41
- 238000012544 monitoring process Methods 0.000 claims abstract description 33
- 230000002159 abnormal effect Effects 0.000 claims abstract description 31
- 230000015654 memory Effects 0.000 claims description 22
- 238000013515 script Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 8
- 238000012545 processing Methods 0.000 description 6
- 238000004590 computer program Methods 0.000 description 5
- 230000002093 peripheral effect Effects 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000008439 repair process Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3034—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1415—Saving, restoring, recovering or retrying at system level
- G06F11/1438—Restarting or rejuvenating
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
- Retry When Errors Occur (AREA)
Abstract
The invention provides a service process management method, a service process management device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring types of service processes, wherein the types comprise a standard service process and a private service process; starting the service process according to the type of the service process; monitoring the running state of the service process; judging whether the service process is abnormal or not; when the service process is abnormal, acquiring the restarting times of the service process according to the type of the service process; judging whether the restarting times of the service process exceed the corresponding restarting threshold value or not; and if the restarting times of the service process do not exceed the corresponding restarting threshold, restarting the service process according to the type of the service process. The service process management method in the scheme manages the standard service process and the private service process, ensures the normal starting and working of the service process, and processes according to different conditions when the service process has abnormal faults.
Description
Technical Field
The invention relates to the technical field of storage, in particular to a service process management method, a service process management device, a service process management storage system and a service process management storage medium.
Background
With the widespread use of information technology, storage technology is also constantly evolving. In a cloud computing data center, the requirement on a storage system is higher and higher, the functions of the storage system are more and more, and peripheral service processes required by the storage system are increased. For example, in a storage system, a standard service process for running an operating system (such as a Linux system) and a private service process developed based on other functions of the storage system need to be run. Because the standard service process of the operating system in the storage system is managed by the operating system alone, the standard service process and the private service process are not managed in a unified way, the process management is insufficient, and the system is affected in normal, so that how to manage the standard service and the private service process in the storage system becomes an important problem to be solved.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for managing a service process, a computer device, and a storage medium, so as to solve the problem that a standard service process and a private service process in a storage system in the prior art cannot be effectively managed.
According to a first aspect, an embodiment of the present invention provides a service process management method, including:
acquiring types of service processes, wherein the types comprise a standard service process and a private service process;
starting the service process according to the type of the service process;
monitoring the running state of the service process;
judging whether the service process is abnormal or not;
when the service process is abnormal, acquiring the restarting times of the service process according to the type of the service process;
judging whether the restarting times of the service process exceed the corresponding restarting threshold value or not;
and if the restarting times of the service process do not exceed the corresponding restarting threshold, restarting the service process according to the type of the service process.
The service process management method in the scheme manages the standard service process and the private service process, ensures the normal starting and the working of the service process, restarts or processes abnormity according to the condition when the service process has abnormal faults, because the restarting frequency of each service process in a unit time period is limited, the restarting frequency is set according to different service processes, if the restarting frequency is still in the normal range, the restarting operation can still be carried out, and ensures the normal operation of the system.
With reference to the first aspect and the optional implementation manner of the first aspect, in the optional implementation manner of the first aspect, the obtaining the number of times of restarting the service process according to the type of the service process includes
For a standard service process, acquiring the restarting times of the service process through error information of an operating system;
and for the private service process, acquiring the restart times of the process through the running record information of the service process.
In the method, different methods are adopted to obtain the restart times for different types of service processes, and because the standard service process and the operating system can restart and record process exception, the restart times of each standard service process can be obtained from the error information of the operating system. For the private service process, the restart caused by the private service process is not recorded in the operating system independently, the restart times of each private service process are extracted by analyzing the running record information of the service process, and the restart times of the current service process can be obtained in the mode and used as the basis for whether the service process is restarted or not.
With reference to the first aspect or an optional implementation manner of the first aspect, in the optional implementation manner of the first aspect, the obtaining, according to a type of a service process, a restart time of the service process further includes:
acquiring the restart times of the current service process as first restart times;
acquiring the restart times of the service process related to the service process as second restart times;
and overlapping the first restart times and the second restart times to be used as the final restart times of the service process.
In the method, the situations of the related service processes which are abnormal may be associated, so that when the restart times are calculated, the restart times of the related service processes are further combined and calculated, and thus, the abnormalities of related problems can be better summarized, the running condition of the system can be better represented, the operation condition can be used as a basis for subsequent processing, and the accuracy and the rationality are better.
With reference to the first aspect or the optional implementation manner of the first aspect, in the optional implementation manner of the first aspect, after restarting the service process according to the type of the service process, the method further includes updating the restart times of the service process.
After the system is restarted, according to the restart, the restart times of the service process in the period can be updated, and the real-time performance of data is ensured.
With reference to the first aspect or an optional implementation manner of the first aspect, in an optional implementation manner of the first aspect, if the number of times of restarting of the service process exceeds a corresponding restart threshold, it is determined that a service exception exists in the system. This indicates that the system has been restarted a number of times due to the anomaly in the service process, requiring repair, replacement, or other after-market services.
With reference to the first aspect or any implementation manner thereof, in an implementation manner of the first aspect, the starting the service process according to the type of the service process, or the restarting the service process according to the type of the service process includes:
for the standard service process, starting through a service starting command of an operating system;
and for the private service process, starting by correspondingly developed execution scripts.
In this way, for a standard service process, the operating system is provided with a start command and is started through a corresponding command in the operating system, and for a private process service, the operating system is not started by a corresponding execution script in response to the set start command.
With reference to the first aspect or optional implementations thereof, in an optional implementation of the first aspect, the monitoring an operation state of the service process includes:
starting a service monitoring thread, and monitoring the service process according to the service configuration file;
and acquiring the running state of the service process according to the process file of the service process.
In the method, the service process is monitored through the configuration file, the running state of the service process is obtained in real time, and the running states of the standard service process and the private service process are monitored.
According to a second aspect, an embodiment of the present invention further provides a service process management apparatus, including:
the type acquisition unit is used for acquiring the types of the service processes, wherein the types comprise a standard service process and a private service process;
the starting unit is used for starting the service process according to the type of the service process;
the monitoring unit is used for monitoring the running state of the service process;
the judging unit is used for judging whether the service process is abnormal or not;
the restarting time acquiring unit is used for acquiring the restarting time of the service process according to the type of the service process when the service process is abnormal;
the restarting judging unit is used for judging whether the restarting times of the service process exceed the corresponding restarting threshold value or not;
and the restarting unit is used for restarting the service process according to the type of the service process if the restarting times of the service process do not exceed the corresponding restarting threshold.
With reference to the second aspect and optional embodiments thereof, in an optional embodiment of the second aspect, the restart time number obtaining unit includes:
the first acquiring subunit is used for acquiring the restarting times of the standard service process through the error information of the operating system;
and the second acquiring subunit is used for acquiring the restart times of the private service process through the running record information of the service process.
With reference to the second aspect or an optional implementation manner thereof, in an optional implementation manner of the second aspect, the restart time obtaining unit further includes:
a third obtaining subunit, configured to obtain a restart frequency of the current service process as the first restart frequency;
a fourth sub-acquiring unit, configured to acquire a number of restart times of a service process related to the service process as a second number of restart times;
and the calculating subunit is used for superposing the first restart times and the second restart times as the final restart times of the service process.
With reference to the second aspect or the optional implementation manner of the second aspect, in an optional implementation manner of the second aspect, an updating unit is further included, configured to update the restart times of the service process.
With reference to the second aspect or an optional implementation manner of the second aspect, in an optional implementation manner of the second aspect, the system further includes an exception handling unit, configured to determine that a service exception exists in the system if the number of times of restarting the service process exceeds a corresponding restart threshold.
With reference to the second aspect or alternative embodiments thereof, in alternative embodiments of the second aspect, the starting unit or the restarting unit includes:
the first sub-unit is used for starting the standard service process through a service starting command of an operating system;
and the second starting subunit is used for starting the private service process through the correspondingly developed execution script.
With reference to the second aspect or alternative embodiments thereof, in an alternative embodiment of the second aspect, the monitoring unit includes:
the monitoring starting sub-unit is used for starting a service monitoring thread and monitoring the service process according to the service configuration file;
and the state acquisition unit is used for acquiring the running state of the service process according to the process file of the service process.
According to a third aspect, an embodiment of the present invention further provides a storage system, including a memory and a processor, where the memory and the processor are communicatively connected to each other, and the memory stores computer instructions, and the processor executes the computer instructions to perform the service process management method according to the first aspect or any one of the optional implementations thereof.
According to a fourth aspect, the present invention further provides a computer-readable storage medium, where the computer-readable storage medium stores computer instructions for causing the computer to execute the service process management method according to the first aspect or any one of the optional implementations thereof.
According to a fifth aspect, an embodiment of the present invention provides a computer program product, the computer program product includes a computer program stored on a computer-readable storage medium, the computer program includes program instructions, when executed by a computer, cause the computer to execute the service process management method of the first aspect or any one of the implementation manners of the first aspect.
Drawings
The features and advantages of the present invention will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the invention in any way, and in which:
FIG. 1 is a flow diagram that illustrates the steps of a method for service process management in one embodiment;
FIG. 2 is a flow diagram illustrating the steps of a method for service process management in another embodiment;
FIG. 3 is a flow diagram illustrating the steps of a method for service process management in another embodiment;
FIG. 4 is a flow diagram illustrating the steps of a method for service process management in another embodiment;
FIG. 5 is a block diagram showing the construction of a service process management apparatus in one embodiment;
FIG. 6 is a block diagram showing the construction of a service process management apparatus in another embodiment;
FIG. 7 illustrates a block diagram of a storage system in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As the functions of the storage system become more and more sound, more and more peripheral services are being developed for the storage system. In a storage system, a process predefined in an operating system is called a standard service process, for example, an SSH (Secure Shell, Secure Shell protocol) service process of a Linux system standard; for a service process developed for a peripheral function in a storage system, a private service process is called, for example, a service process corresponding to some program developed based on usage.
The embodiment of the invention provides a service process management method, which manages a standard service process and a private service process and effectively manages a plurality of service processes in a storage system, and as shown in figure 1, the method comprises the following steps:
s1, obtaining the types of the service processes, wherein the types comprise standard service processes and private service processes.
Since different types of service processes are different in starting mode and restarting judgment mode, the type of the current service process is determined at first. The type of the embodiment comprises a standard service process and a private service process, wherein the standard service process is a service process carried by an operating system and is preset in the operating system; a private service process refers to a service process developed by a worker based on the use of subsequent peripheral functions or requirements of the storage system.
And S2, starting the service process according to the type of the service process.
Because the two different types of service processes are different in starting mode, the service process is started according to the type of the current service process. And starting the service process management thread in the initialization process of the storage system, determining the starting mode of each service process according to the attribute configured by each service process in the configuration file of the service process, and finishing the starting work of the service process.
And S3, monitoring the running state of the service process.
After the service processes are started, reading the ID of each service process according to the process ID record file in the service configuration item, and then acquiring the running state of the service process from the Linux kernel according to the process ID of the service, thereby monitoring the service processes in real time.
The specific process of monitoring the running state of the service process comprises the following steps:
firstly, starting a service monitoring thread, and monitoring the service process according to a service configuration file;
and then, acquiring the running state of the service process according to the process file of the service process.
In the method, the service process is monitored through the configuration file, the running state of the service process is obtained in real time, and the running states of the standard service process and the private service process are monitored.
And S4, judging whether the service process is abnormal or not. If there is no exception, the running state of the service process is continuously monitored, and if there is an exception, step S5 is executed.
According to the real-time monitoring information of the service process, whether the service process works normally or not can be judged, and if the service process works abnormally, abnormal processing is carried out.
And S5, when the service process is abnormal, acquiring the restarting times of the service process according to the type of the service process.
And when the service process is abnormal, the abnormal condition is processed. If the service process has a few reboots, then it is allowed to reboot, and if multiple reboots have occurred, then a problem with the system is indicated, requiring further maintenance or after-sales. The number of restarts here refers to the number of restarts within a statistical time, for example, within 1 day, or within 1 hour, or within 8 hours, the statistical time is set as required, and the system only records the number of restarts within the statistical time.
And S6, judging whether the restart times of the service process exceed the corresponding restart threshold.
The restart threshold here is set individually for each process according to the type and importance of the service process, for example, the restart threshold may be set to 3 times a day for a general standard service process, and lower for some important service processes, such as setting the threshold to 1 or 2 times a day; furthermore, for some very important service processes, such as some private service processes of important application functions, the threshold may be set to 1 time every day or once a week, where the restart threshold is set according to the importance of each service process.
If the restart times of the service process do not exceed the corresponding restart threshold, executing step S7; and if the restarting times of the service process exceed the corresponding restarting threshold, judging that the system has abnormal service, and executing the operations of warranty and maintenance or informing a client and the like according to the needs. This indicates that the system has been restarted a number of times due to the anomaly in the service process, requiring repair, replacement, or other after-market services.
And S7, if the restart times of the service process do not exceed the corresponding restart threshold, restarting the service process according to the type of the service process. When the restarting frequency does not reach the upper limit, the abnormal service process can be recovered in a restarting mode.
The service process management method in the scheme manages the standard service process and the private service process, ensures the normal starting and the working of the service process, restarts or processes abnormity according to the condition when the service process has abnormal faults, because the restarting frequency of each service process in a unit time period is limited, the restarting frequency is set according to different service processes, if the restarting frequency is still in the normal range, the restarting operation can still be carried out, and ensures the normal operation of the system.
As a specific implementation manner, the step S5 of obtaining the number of times of restarting the service process according to the type of the service process includes the following steps:
and for the standard service process, acquiring the restarting times of the service process through the error information of the operating system. Because the standard service process and the operating system can restart and record the process exception, the restart times of each standard service process can be obtained from the error information of the operating system.
And for the private service process, acquiring the restart times of the process through the running record information of the service process. In the method, different methods are adopted to obtain the restarting times aiming at different types of service processes, for the private service processes, the restarting caused by the private service processes is not recorded in an operating system independently, the restarting times of each private service process are extracted by analyzing the running record information of the service processes, and the restarting times of the current service processes can be obtained by the method and used as the basis for whether the service processes are restarted or not.
Considering that there is management between some service processes, and therefore, the abnormal situations occurring in these service processes are also related, it should be considered comprehensively that, in a further embodiment, the step S5 further includes the following steps, as shown in fig. 2:
and S51, acquiring the restart times of the current service process as a first restart time. The calculation manner of the current storage process here is calculated as described above according to the type of the service process.
And S52, acquiring the restart times of the service process related to the service process as second restart times.
Besides the number of restart words of the current service process, the number of restart times of other processes related to the current service process is further considered. The related information can be preset in advance or extracted according to conditions, that is, for the service processes with the association relationship, the associated identification information can be set for the service processes in advance, so that when one of the service processes is abnormal, the restart times of the rest related service processes in the statistical period are considered when the restart times are calculated.
And S53, overlapping the first restart times and the second restart times to be used as the final restart times of the service process.
In the method, the situations of the related service processes which are abnormal may be associated, so that when the restart times are calculated, the restart times of the related service processes are further combined and calculated, and thus, the abnormalities of related problems can be better summarized, the running condition of the system can be better represented, the operation condition can be used as a basis for subsequent processing, and the accuracy and the rationality are better.
In order to guarantee the accuracy of the restart times, the restart times of the service process are updated after the service process is restarted according to the type of the service process. After the system is restarted, according to the restart, the restart times of the service process in the period can be updated, and the real-time performance of data is ensured.
As a specific implementation manner, starting the service process according to the type of the service process, or restarting the service process according to the type of the service process, where the starting manner includes:
for the standard service process, starting through a service starting command of an operating system;
and for the private service process, starting by correspondingly developed execution scripts.
In this way, for a standard service process, the operating system is provided with a start command and is started through a corresponding command in the operating system, and for a private process service, the operating system is not started by a corresponding execution script in response to the set start command.
In order to better understand the service process management method provided in the embodiment of the present application, the present embodiment provides a complete implementation of the service process management method, and its steps are shown in fig. 3, including:
s01, acquiring types of service processes, wherein the types comprise a standard service process and a private service process;
s02, starting the service process according to the type of the service process, including:
for the standard service process, starting through a service starting command of an operating system;
and for the private service process, starting by correspondingly developed execution scripts.
S03, monitoring the running state of the service process, including:
starting a service monitoring thread, and monitoring the service process according to the service configuration file;
and acquiring the running state of the service process according to the process file of the service process.
S04, judging whether the service process is abnormal or not;
s05, when the service process is abnormal, obtaining the restart times of the service process according to the type of the service process, including:
for a standard service process, acquiring the restarting times of the service process through error information of an operating system;
and for the private service process, acquiring the restart times of the process through the running record information of the service process.
Further, still include:
acquiring the restart times of the current service process as first restart times;
acquiring the restart times of the service process related to the service process as second restart times;
overlapping the first restart times and the second restart times to be used as the final restart times of the service process
S06, judging whether the restart times of the service process exceed the corresponding restart threshold, if not, executing S07, and if so, executing S09.
And S07, if the restart times of the service process do not exceed the corresponding restart threshold, restarting the service process according to the type of the service process.
And S08, updating the restarting times of the service process.
And S09, if the restart times of the service process exceed the corresponding restart threshold, judging that the system has service abnormity.
In order to better understand the service process management method provided in the embodiment of the present application, the embodiment provides another complete specific implementation manner of the service process management method, and the steps of the method are shown in fig. 4, and include:
s001, initializing;
s002, reading configuration files of all service processes;
s003, starting the service process according to the attribute of the service process configuration file;
s004, starting a service monitoring thread, and monitoring a process according to a service configuration file;
s005, judging the running state of the service process according to the process file of the service process;
s006, judging whether the service process is abnormal;
s007, judging whether the service process exceeds the restarting times or not when the service process is abnormal; executing S008 if the restart frequency is exceeded, executing S003 if the restart frequency is not exceeded, and restarting;
s008, if the number of restarting times is exceeded, informing a client of abnormal service of the storage system;
and S009, prompting the customer service to contact customer service personnel for maintenance or replacing spare parts.
It should be understood that although the various steps in the flow charts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.
An embodiment of the present invention further provides a service process management apparatus, as shown in fig. 5, including:
the type obtaining unit 01 is used for obtaining the types of the service processes, wherein the types comprise a standard service process and a private service process;
a starting unit 02, configured to start the service process according to the type of the service process;
the monitoring unit 03 is configured to monitor an operating state of the service process;
a judging unit 04, configured to judge whether the service process is abnormal;
a restart time acquiring unit 05, configured to acquire, when the service process is abnormal, a restart time of the service process according to a type of the service process;
a restart judging unit 06, configured to judge whether the restart times of the service process exceed a corresponding restart threshold;
and the restarting unit 07 is used for restarting the service process according to the type of the service process if the number of times of restarting the service process does not exceed the corresponding restarting threshold.
Wherein, the restart times acquiring unit 06 includes:
the first acquiring subunit is used for acquiring the restarting times of the standard service process through the error information of the operating system;
and the second acquiring subunit is used for acquiring the restart times of the private service process through the running record information of the service process.
As a further embodiment, the restart times acquiring unit 06 further includes:
a third obtaining subunit, configured to obtain a restart frequency of the current service process as the first restart frequency;
a fourth sub-acquiring unit, configured to acquire a number of restart times of a service process related to the service process as a second number of restart times;
and the calculating subunit is used for superposing the first restart times and the second restart times as the final restart times of the service process.
As a further embodiment, the service process management apparatus in this embodiment, as shown in fig. 6, further includes:
and the updating unit 08 is used for updating the restarting times of the service process.
And the exception handling unit 09 is configured to determine that the service exception exists in the system if the number of restart times of the service process exceeds a corresponding restart threshold.
As a specific implementation manner, the starting unit 02 or the restarting unit 07 includes:
the first sub-unit is used for starting the standard service process through a service starting command of an operating system;
and the second starting subunit is used for starting the private service process through the correspondingly developed execution script.
As a specific implementation, the monitoring unit 03 includes:
the monitoring starting sub-unit is used for starting a service monitoring thread and monitoring the service process according to the service configuration file;
and the state acquisition unit is used for acquiring the running state of the service process according to the process file of the service process.
For specific limitations and beneficial effects of the service process management apparatus, reference may be made to the above limitations on the data storage method, which is not described herein again. The modules in the service process management device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
Fig. 7 is a schematic diagram of a hardware structure of a storage system according to an embodiment of the present invention, as shown in fig. 7, the apparatus includes one or more processors 710 and a memory 720, and one processor 710 is taken as an example in fig. 7. The apparatus may further include: an input device 730 and an output device 740.
The processor 710, the memory 720, the input device 730, and the output device 740 may be connected by a bus or other means, such as the bus connection in fig. 7.
The memory 720, which is a non-transitory computer readable storage medium, can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the business management methods in the embodiments of the present application. The processor 710 implements the above-described data storage method by executing non-transitory software programs, instructions, and modules stored in the memory 720 to perform various functional applications of the server and data processing.
The memory 720 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data used as needed, and the like. Further, the memory 720 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 720 optionally includes memory located remotely from processor 710, which may be connected to a data processing device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 730 may receive input numeric or character information and generate key signal inputs related to user settings and function control. The output device 740 may include a display device such as a display screen.
The one or more modules are stored in the memory 720 and, when executed by the one or more processors 710, perform a service process management method as shown in fig. 1-4.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Details of the technique not described in detail in the present embodiment may be specifically referred to the related description in the embodiments shown in fig. 1 to 4.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the service management method in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims (10)
1. A service process management method, comprising:
acquiring types of service processes, wherein the types comprise a standard service process and a private service process;
starting the service process according to the type of the service process;
monitoring the running state of the service process;
judging whether the service process is abnormal or not;
when the service process is abnormal, acquiring the restarting times of the service process according to the type of the service process;
judging whether the restarting times of the service process exceed the corresponding restarting threshold value or not;
and if the restarting times of the service process do not exceed the corresponding restarting threshold, restarting the service process according to the type of the service process.
2. The method of claim 1, wherein obtaining the number of reboots of the service process according to the type of the service process comprises
For a standard service process, acquiring the restarting times of the service process through error information of an operating system;
and for the private service process, acquiring the restart times of the process through the running record information of the service process.
3. The method of claim 2, wherein obtaining the number of reboots of the service process according to the type of the service process further comprises:
acquiring the restart times of the current service process as first restart times;
acquiring the restart times of the service process related to the service process as second restart times;
and overlapping the first restart times and the second restart times to be used as the final restart times of the service process.
4. The method according to claim 1, 2 or 3, wherein after restarting the service process according to the type of the service process, further comprising updating the number of restarts of the service process.
5. The method of claim 4, further comprising:
and if the restarting times of the service process exceed the corresponding restarting threshold, judging that the system has service abnormity.
6. The method according to claim 1 or 2 or 3 or 5, wherein the starting the service process according to the type of the service process or the restarting the service process according to the type of the service process comprises:
for the standard service process, starting through a service starting command of an operating system;
and for the private service process, starting by correspondingly developed execution scripts.
7. The method of claim 1, 2, 3 or 5, wherein the monitoring the running state of the service process comprises:
starting a service monitoring thread, and monitoring the service process according to the service configuration file;
and acquiring the running state of the service process according to the process file of the service process.
8. A service process management apparatus, comprising:
the type acquisition unit is used for acquiring the types of the service processes, wherein the types comprise a standard service process and a private service process;
the starting unit is used for starting the service process according to the type of the service process;
the monitoring unit is used for monitoring the running state of the service process;
the judging unit is used for judging whether the service process is abnormal or not;
the restarting time acquiring unit is used for acquiring the restarting time of the service process according to the type of the service process when the service process is abnormal;
the restarting judging unit is used for judging whether the restarting times of the service process exceed the corresponding restarting threshold value or not;
and the restarting unit is used for restarting the service process according to the type of the service process if the restarting times of the service process do not exceed the corresponding restarting threshold.
9. A storage system comprising a memory and a processor, wherein the memory and the processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the service process management method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer instructions for causing a computer to perform the service process management method of any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111136550.2A CN113835966B (en) | 2021-09-27 | 2021-09-27 | Service process management method, device, storage system and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111136550.2A CN113835966B (en) | 2021-09-27 | 2021-09-27 | Service process management method, device, storage system and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113835966A true CN113835966A (en) | 2021-12-24 |
CN113835966B CN113835966B (en) | 2023-06-16 |
Family
ID=78970831
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111136550.2A Active CN113835966B (en) | 2021-09-27 | 2021-09-27 | Service process management method, device, storage system and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113835966B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340567A (en) * | 2008-08-25 | 2009-01-07 | 武汉烽火网络有限责任公司 | Reliability guarantee method of network video monitoring frontend |
US20140180667A1 (en) * | 2012-12-20 | 2014-06-26 | Stenotran Services, Inc. | System and method for real-time multimedia reporting |
CN110955514A (en) * | 2019-10-09 | 2020-04-03 | 烽火通信科技股份有限公司 | Method, system and computer readable medium for improving utilization rate of Linux business process |
CN113032183A (en) * | 2021-03-24 | 2021-06-25 | 西安闻泰信息技术有限公司 | System management method, device, computer equipment and storage medium |
-
2021
- 2021-09-27 CN CN202111136550.2A patent/CN113835966B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101340567A (en) * | 2008-08-25 | 2009-01-07 | 武汉烽火网络有限责任公司 | Reliability guarantee method of network video monitoring frontend |
US20140180667A1 (en) * | 2012-12-20 | 2014-06-26 | Stenotran Services, Inc. | System and method for real-time multimedia reporting |
CN110955514A (en) * | 2019-10-09 | 2020-04-03 | 烽火通信科技股份有限公司 | Method, system and computer readable medium for improving utilization rate of Linux business process |
CN113032183A (en) * | 2021-03-24 | 2021-06-25 | 西安闻泰信息技术有限公司 | System management method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113835966B (en) | 2023-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230224697A1 (en) | System, method, apparatus, and computer program product for providing mobile device support services | |
US9647891B2 (en) | Managing network configurations | |
CA2869428C (en) | System, method, apparatus, and computer program product for providing mobile device support services | |
US10489232B1 (en) | Data center diagnostic information | |
US9239988B2 (en) | Network event management | |
US8719634B2 (en) | System health and performance care of computing devices | |
CN111796959B (en) | Self-healing method, device and system for host container | |
CN108920103B (en) | Server management method and device, computer equipment and storage medium | |
US10977113B2 (en) | System and method for fault identification, logging, and remediation | |
CN106506278B (en) | Service availability monitoring method and device | |
US20230359514A1 (en) | Operation-based event suppression | |
CN113835966B (en) | Service process management method, device, storage system and storage medium | |
CN112800003A (en) | Recommendation method for creating snapshot, snapshot creation method and device and electronic equipment | |
WO2021059451A1 (en) | Abnormality handling assisting device, method, and program | |
CN115080337A (en) | Data monitoring method, device, system, server and readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |