CN113835966B - Service process management method, device, storage system and storage medium - Google Patents

Service process management method, device, storage system and storage medium Download PDF

Info

Publication number
CN113835966B
CN113835966B CN202111136550.2A CN202111136550A CN113835966B CN 113835966 B CN113835966 B CN 113835966B CN 202111136550 A CN202111136550 A CN 202111136550A CN 113835966 B CN113835966 B CN 113835966B
Authority
CN
China
Prior art keywords
service process
restarting
service
type
starting
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
CN202111136550.2A
Other languages
Chinese (zh)
Other versions
CN113835966A (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111136550.2A priority Critical patent/CN113835966B/en
Publication of CN113835966A publication Critical patent/CN113835966A/en
Application granted granted Critical
Publication of CN113835966B publication Critical patent/CN113835966B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3034Monitoring 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1438Restarting or rejuvenating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3409Recording 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording 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/3466Performance evaluation by tracing or monitoring
    • G06F11/3476Data logging
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Retry When Errors Occur (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention provides a service process management method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring the types of service processes, wherein the types comprise standard service processes and private service processes; 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 exceeds a corresponding restarting threshold value; and 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. The service process management method in the scheme manages both the standard service process and the private service process, ensures the normal starting and working of the service process, and processes according to the situation when the service process has abnormal faults.

Description

Service process management method, device, storage system and storage medium
Technical Field
The present invention relates to the field of storage technologies, and in particular, to a service process management method, a device, a storage system, and a storage medium.
Background
With the wide application of information technology, storage technology is also continuously developed. In a cloud computing data center, requirements on a storage system are higher and higher, functions of the storage system are more and more, and peripheral service processes required by the storage system are also increased. For example, in a storage system, it is necessary to run both standard service processes of an operating system (such as a Linux system) and private service processes developed based on other functions of the storage system. Because the standard service process of the operating system in the storage system is independently managed by the operating system, the standard service process and the private service process are not uniformly managed, the process management is insufficient, and the normal of the system is affected, so how to manage the standard service process and the private service process in the storage system becomes an important problem to be solved.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a service process management method, apparatus, computer device, and storage medium, so as to solve the problem in the prior art that standard service processes and private service processes in a storage system cannot be effectively managed.
According to a first aspect, an embodiment of the present invention provides a service process management method, including:
acquiring the types of service processes, wherein the types comprise standard service processes and private service processes;
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 exceeds a corresponding restarting threshold value;
and 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.
According to the service process management method in the scheme, the standard service process and the private service process are managed, normal starting and working of the service process are guaranteed, when an abnormal fault occurs in the service process, restarting or abnormal processing is carried out according to the situation, since the restarting times of each service process in a unit time period are limited, the restarting times are set according to different service processes, if the restarting times are still in a normal range, restarting operation can still be carried out, and normal operation of a system is guaranteed.
With reference to the first aspect and optional implementation manners of the first aspect, in an optional implementation manner of the first aspect, the obtaining the restart times of the service process according to the type of the service process includes
For a standard service process, obtaining the restarting times of the service process through the error information of an operating system;
and for the private service process, acquiring the restarting times of the process through the running record information of the service process.
In the method, the restarting times are acquired by adopting different modes aiming at different types of service processes, and because the operating system records the restarting of the abnormal process of the standard service process, the restarting times of each standard service process can be acquired from the error information of the operating system. For private service processes, the operation system does not have to record the restarting caused by the private service processes, and the restarting times of each private service process are extracted by analyzing the operation record information of the service process, so that the current restarting times of the service process can be obtained and used as the basis for whether to restart or not.
With reference to the first aspect or optional implementation manner of the first aspect, in an optional implementation manner of the first aspect, the obtaining the restart times of the service process according to the type of the service process further includes:
acquiring the restarting times of the current service process as the first restarting times;
acquiring the restarting times of the service process related to the service process as second restarting times;
and superposing the first restarting times and the second restarting times as the final restarting times of the service process.
In the method, the abnormal conditions of the related service processes are possibly associated, so that when the restarting times are calculated, the restarting times of the related service processes are further combined and calculated, the abnormal conditions of the related problems can be better summarized, the running condition of the system is better represented, and the accuracy and the rationality are better as the basis of subsequent processing.
With reference to the first aspect or optional implementation manner of the first aspect, in an optional implementation manner of the first aspect, after restarting the service process according to a type of the service process, updating a number of restarting times of the service process is further included.
After the system is restarted, the restarting times of the service process in the period can be updated according to the restarting time, so that the real-time performance of the data is ensured.
With reference to the first aspect or optional implementation manner thereof, in an optional implementation manner of the first aspect, if the number of restarting times of the service process exceeds a corresponding restarting threshold, it is determined that a service abnormality exists in the system. At this time, it is explained that the system has been restarted for a relatively large number of times due to the abnormality of the service process, and maintenance, replacement or other after-sales service is required.
With reference to the first aspect or optional implementation manner of the first aspect, in an optional implementation manner of the first aspect, the 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, includes:
for a standard service process, starting through a service starting command of an operating system;
and starting the private service process through the corresponding developed execution script.
In this manner, for a standard service process, the operating system is provided with a start command, and is started by a corresponding command in the operating system, and for a private process service, the operating system is not started by a corresponding execution script for the set start command.
With reference to the first aspect or optional implementation manner thereof, in an optional implementation manner 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 a service configuration file;
and acquiring the running state of the service process according to the process file of the service process.
In the mode, 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, which is characterized by including:
the type acquisition unit is used for acquiring the type of the service process, wherein the type comprises 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 acquisition 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 exceeds the corresponding restarting threshold value;
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 value.
With reference to the second aspect and optional embodiments thereof, in an optional embodiment of the second aspect, the restart number obtaining unit includes:
the first acquisition subunit is used for acquiring the restarting times of the standard service process through the error information of the operating system;
and the second acquisition subunit is used for acquiring the restarting times of the private service process according to the running record information of the service process.
With reference to the second aspect or optional implementation manner thereof, in an optional implementation manner of the second aspect, the restart number obtaining unit further includes:
the third obtaining subunit is used for obtaining the restarting times of the current service process as the first restarting times;
a fourth sub-acquisition unit configured to acquire, as a second restart number, a restart number of a service process related to the service process;
and the calculating subunit is used for superposing the first restarting times and the second restarting times as the final restarting times of the service process.
With reference to the second aspect or optional implementation manner thereof, in an optional implementation manner of the second aspect, the method further includes an updating unit, configured to update a restart number of the service process.
With reference to the second aspect or optional implementation manner of the second aspect, in an optional implementation manner of the second aspect, the method further includes an exception handling unit, configured to determine that a service exception exists in the system if the number of restarting times of the service process exceeds a corresponding restart threshold.
With reference to the second aspect or optional embodiments thereof, in an optional embodiment of the second aspect, the starting unit or the restarting unit includes:
the first promoter unit is used for starting a standard service process through a service starting command of an operating system;
and the second promoter unit is used for starting the private service process through the corresponding developed execution script.
With reference to the second aspect or optional embodiments thereof, in an optional embodiment of the second aspect, the monitoring unit comprises:
the monitoring and starting subunit 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, thereby executing the service process management method according to the first aspect or any optional implementation manner thereof.
According to a fourth aspect, there is also provided in an embodiment of the present invention a computer readable storage medium, wherein 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 its alternative embodiments.
According to a fifth aspect, an embodiment of the present invention provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the service process management method of the first aspect or any one of the embodiments 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 should not be construed as limiting the invention in any way, in which:
FIG. 1 is a flow diagram that illustrates the steps of a method of service process management in one embodiment;
FIG. 2 is a flow chart illustrating steps of a method of service process management in another embodiment;
FIG. 3 is a flow chart illustrating steps of a method of service process management in another embodiment;
FIG. 4 is a flowchart showing steps of a method of service process management in another embodiment;
FIG. 5 illustrates a block diagram of a service process management device in one embodiment;
FIG. 6 is a block diagram showing the construction of a service progress management device in another embodiment;
FIG. 7 illustrates a block diagram of a storage system in one embodiment.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
As the functions of the storage system are gradually sound, peripheral services developed for the storage system are also increasing. In the storage system, a process predefined in the operating system is called a standard service process, for example, an SSH (Secure Shell protocol) service process of Linux system standard; for a service process developed for peripheral functions in a storage system, it is called a private service process, for example, a service process corresponding to some programs developed based on usage.
The embodiment of the invention provides a service process management method, which manages both standard service processes and private service processes and effectively manages a plurality of service processes in a storage system, wherein the method is shown in fig. 1 and comprises the following steps:
s1, acquiring the types of service processes, wherein the types comprise standard service processes and private service processes.
Because the service processes of different types are different in starting mode and restarting judging mode, the type of the current service process is determined first. The types in the embodiment comprise 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 usage, followed by a peripheral function or requirement of the storage system.
S2, starting the service process according to the type of the service process.
Since the two different types of service process starting modes are different, the service process is started according to the type of the current service process. And starting a service process management thread in the initialization process of the storage system, and determining a starting mode according to the attribute configured by each service process in the configuration file of the service process to finish the starting work of the service process.
S3, monitoring the running state of the service process.
After the starting of each service process is completed, 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 service process ID, thereby monitoring the service process 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 mode, 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.
S4, judging whether the service process is abnormal or not. If no abnormality exists, the operation state of the service process is continuously monitored, and if abnormality exists, 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 abnormal occurs, abnormal processing is carried out.
S5, when the service process is abnormal, the restarting times of the service process are obtained according to the type of the service process.
When the service process is abnormal, the abnormal situation is processed. If this service process is restarted a small number of times, it is allowed to restart, and if a number of restarts have occurred, this indicates that the system is experiencing problems and requires further maintenance or after-sales. The number of restarting is the number of restarting within a statistical time, for example, within 1 day or 1 hour or 8 hours, the statistical time is set according to the requirement, and only the number of restarting within the statistical time is recorded in the system.
S6, judging whether the restarting times of the service process exceeds the corresponding restarting threshold.
The restart threshold is set individually for each process according to the type of service process and the importance level, for example, the restart threshold may be set 3 times per day for a general standard service process, and lower for some important service processes, such as setting the threshold 1 or 2 times per day; furthermore, for some very important service processes, such as private service processes of some important application functions, the threshold may be set to 1 time a day or once a week, where the restart threshold is set according to the importance level of each service process.
If the restart times of the service process do not exceed the corresponding restart threshold value, executing step S7; if the restarting times of the service process exceeds the corresponding restarting threshold, judging that the system has abnormal service, executing warranty and maintenance according to the need, or notifying a client and other operations. At this time, it is explained that the system has been restarted for a relatively large number of times due to the abnormality of the service process, and maintenance, replacement or other after-sales service is required.
And S7, 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. When the number of restarting times does not reach the upper limit, the abnormal service process can be recovered by restarting.
According to the service process management method in the scheme, the standard service process and the private service process are managed, normal starting and working of the service process are guaranteed, when an abnormal fault occurs in the service process, restarting or abnormal processing is carried out according to the situation, since the restarting times of each service process in a unit time period are limited, the restarting times are set according to different service processes, if the restarting times are still in a normal range, restarting operation can still be carried out, and normal operation of a system is guaranteed.
As a specific embodiment, in the step S5, the restart times of the service process are obtained according to the type of the service process, and the method includes the following steps:
and for a standard service process, acquiring the restarting times of the service process through the error information of the operating system. Because the standard service process is recorded by the operating system for restarting the process abnormality, the restarting 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 restarting times of the process through the running record information of the service process. In the method, the restarting times are acquired in different modes 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, the restarting times of each private service process are extracted by analyzing the operation record information of the service processes, and the current restarting times of the service processes can be obtained in the mode and can be used as the basis for whether to restart or not.
Considering that management exists between some service processes, and thus the abnormal situations in these service processes are also related, it should be comprehensively considered that in a further embodiment, the step S5 further includes the following steps, as shown in fig. 2:
s51, obtaining the restarting times of the current service process as the first restarting times. The calculation mode of the current storage process here is calculated in the above-described manner according to the type of the service process.
S52, obtaining the restarting times of the service process related to the service process as second restarting times.
In addition to considering the number of restart words of the current service process itself, the number of restarts of other processes to which it relates is further considered. The relevant information can be preset in advance or extracted according to conditions, that is to say, for the service processes with the association relationship, the association identification information can be set for the service processes in advance, so that when one of the service processes is abnormal, the restarting times are calculated, and the restarting times of the other relevant service processes in the statistical period are considered.
And S53, superposing the first restarting times and the second restarting times as final restarting times of the service process.
In the method, the abnormal conditions of the related service processes are possibly associated, so that when the restarting times are calculated, the restarting times of the related service processes are further combined and calculated, the abnormal conditions of the related problems can be better summarized, the running condition of the system is better represented, and the accuracy and the rationality are better as the basis of subsequent processing.
In order to ensure the accuracy of the restart times, the restart times of the service process are updated after restarting the service process according to the type of the service process. After the system is restarted, the restarting times of the service process in the period can be updated according to the restarting time, so that the real-time performance of the data is ensured.
As a specific implementation manner, the service process is started according to the type of the service process, or the service process is restarted according to the type of the service process, where the starting manner includes:
for a standard service process, starting through a service starting command of an operating system;
and starting the private service process through the corresponding developed execution script.
In this manner, for a standard service process, the operating system is provided with a start command, and is started by a corresponding command in the operating system, and for a private process service, the operating system is not started by a corresponding execution script for 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 the steps of the method are shown in fig. 3, including:
s01, acquiring the types of service processes, wherein the types comprise standard service processes and private service processes;
s02, starting the service process according to the type of the service process, including:
for a standard service process, starting through a service starting command of an operating system;
and starting the private service process through the corresponding developed execution script.
S03, monitoring the running state of the service process, including:
starting a service monitoring thread, and monitoring the service process according to a 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 restarting times of the service process according to the type of the service process, wherein the restarting times comprise the following steps:
for a standard service process, obtaining the restarting times of the service process through the error information of an operating system;
and for the private service process, acquiring the restarting times of the process through the running record information of the service process.
Further, the method further comprises the following steps:
acquiring the restarting times of the current service process as the first restarting times;
acquiring the restarting times of the service process related to the service process as second restarting times;
superposing the first restarting times and the second restarting times as the final restarting times of the service process
S06, judging whether the restarting times of the service process exceeds the corresponding restarting threshold value, executing S07 is not exceeded, and executing S09 is executed if the restarting times of the service process exceeds the corresponding restarting threshold value.
S07, 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.
And S08, updating the restarting times of the service process.
S09, if the restarting times of the service process exceeds the corresponding restarting threshold, judging that the system has service abnormality.
In order to better understand the service process management method provided in the embodiment of the present application, another complete embodiment of the service process management method is provided in the embodiment, and the steps of the service process management method are shown in fig. 4, and include:
s001, initializing;
s002, reading the configuration files of each service process;
s003, starting a service process according to the attribute of the service process configuration file;
s004, starting a service monitoring thread, and monitoring a process according to the 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; s008 is executed after the number of times of restarting is exceeded, S003 is executed after the number of times of restarting is not exceeded, and restarting is performed;
s008, notifying a client that the service of the storage system is abnormal if the restarting times are exceeded;
s009, prompting customer service personnel to contact the customer service personnel to repair or replace spare parts.
It should be understood that, although the steps in the flowcharts of fig. 1-4 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in FIGS. 1-4 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
The embodiment of the invention also provides a service process management device, as shown in fig. 5, including:
a type acquisition unit 01, configured to acquire a type of a service process, where the type includes 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;
a monitoring unit 03, configured to monitor an operation state of the service process;
a judging unit 04, configured to judge whether the service process is abnormal;
a restart times acquisition unit 05, configured to acquire restart times of the service process according to a type of the service process when the service process is abnormal;
a restart judging unit 06, configured to judge whether the restart times of the service process exceeds a corresponding restart threshold;
and the restarting unit 07 is configured to restart the service process according to the type of the service process if the number of restarting times of the service process does not exceed the corresponding restart threshold.
Wherein the restart times acquisition unit 06 includes:
the first acquisition subunit is used for acquiring the restarting times of the standard service process through the error information of the operating system;
and the second acquisition subunit is used for acquiring the restarting times of the private service process according to the running record information of the service process.
As a further embodiment, the restart number obtaining unit 06 further includes:
the third obtaining subunit is used for obtaining the restarting times of the current service process as the first restarting times;
a fourth sub-acquisition unit configured to acquire, as a second restart number, a restart number of a service process related to the service process;
and the calculating subunit is used for superposing the first restarting times and the second restarting times as the final restarting times of the service process.
As a further embodiment, the service process management apparatus in the present embodiment, as shown in fig. 6, further includes:
an updating unit 08, configured to update the restart times of the service process.
And the exception handling unit 09 is configured to determine that a service exception exists in the system if the restart times of the service process exceed the corresponding restart threshold.
As a specific implementation manner, the starting unit 02 or the restarting unit 07 includes:
the first promoter unit is used for starting a standard service process through a service starting command of an operating system;
and the second promoter unit is used for starting the private service process through the corresponding developed execution script.
As a specific embodiment, the monitoring unit 03 includes:
the monitoring and starting subunit 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.
The specific limitation of the service process management device and the beneficial effects can be referred to the limitation of the data storage method hereinabove, and will not be described herein. The respective modules in the above-described service process management apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Fig. 7 is a schematic diagram of a hardware structure of a storage system according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes one or more processors 710 and a memory 720, and in fig. 7, one processor 710 is taken as an example. The apparatus may further include: an input device 730 and an output device 740.
Processor 710, memory 720, input device 730, and output device 740 may be connected by a bus or other means, for example in fig. 7.
The processor 710 may be a central processing unit (Central Processing Unit, CPU). The processor 710 may also be a chip such as other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 720 is used as a non-transitory computer readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the service management method in the embodiments of the present application. The processor 710 executes various functional applications of the server and data processing, i.e., implements the data storage methods described above, by running non-transitory software programs, instructions, and modules stored in the memory 720.
Memory 720 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data or the like used as needed. In addition, 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 may optionally include memory located remotely from processor 710, which may be connected to the data processing apparatus 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 that, when executed by the one or more processors 710, perform the service process management methods illustrated in fig. 1-4.
The product can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details which are not described in detail in the present embodiment can be found in the embodiments shown in fig. 1 to 4.
The embodiment of the invention also provides a non-transitory computer storage medium, which stores computer executable instructions that can execute the service management method in any of the above method embodiments. Wherein the storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a Flash Memory (Flash Memory), a Hard Disk (HDD), or a Solid State Drive (SSD); the storage medium may also comprise a combination of memories of the kind described above.
It will be appreciated by those skilled in the art that implementing all or part of the above-described embodiment method may be implemented by a computer program to instruct related hardware, where the program may be stored in a computer readable storage medium, and the program may include the above-described embodiment method when executed. 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 embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations are within the scope of the invention as defined by the appended claims.

Claims (10)

1. A method for managing a service process, comprising:
acquiring the types of service processes, wherein the types comprise standard service processes and private service processes;
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 exceeds a corresponding restarting threshold value;
and 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.
2. The method according to claim 1, wherein the obtaining the number of restarts of the service process according to the type of the service process includes
For a standard service process, obtaining the restarting times of the service process through the error information of an operating system;
and for the private service process, acquiring the restarting times of the process through the running record information of the service process.
3. The method of claim 2, wherein the obtaining the number of restarting times of the service process according to the type of the service process further comprises:
acquiring the restarting times of the current service process as the first restarting times;
acquiring the restarting times of the service process related to the service process as second restarting times;
and superposing the first restarting times and the second restarting times as the final restarting times of the service process.
4. A method according to claim 1, 2 or 3, characterized in that after restarting the service process according to its type, it further comprises updating the number of restarts of the service process.
5. The method as recited in claim 4, further comprising:
and if the restarting times of the service process exceeds the corresponding restarting threshold value, judging that the system has service abnormality.
6. The method according to claim 1 or 2 or 3 or 5, wherein said starting the service process according to the type of the service process or said restarting the service process according to the type of the service process comprises:
for a standard service process, starting through a service starting command of an operating system;
and starting the private service process through the corresponding developed execution script.
7. The method of claim 1 or 2 or 3 or 5, wherein monitoring the operational state of the service process comprises:
starting a service monitoring thread, and monitoring the service process according to a 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 type of the service process, wherein the type comprises 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 acquisition 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 exceeds the corresponding restarting threshold value;
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 value.
9. A storage system comprising a memory and a processor, said memory and said processor being communicatively coupled to each other, said memory having stored therein computer instructions, said processor executing said computer instructions to perform the service process management method of any of claims 1-7.
10. A computer-readable storage medium storing computer instructions for causing the computer to perform the service process management method of any one of claims 1 to 7.
CN202111136550.2A 2021-09-27 2021-09-27 Service process management method, device, storage system and storage medium Active CN113835966B (en)

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 CN113835966A (en) 2021-12-24
CN113835966B true 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340567A (en) * 2008-08-25 2009-01-07 武汉烽火网络有限责任公司 Reliability guarantee method of network video monitoring frontend
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2799892C (en) * 2012-12-20 2016-11-22 Stenotran Services Inc. System and method for real-time multimedia reporting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101340567A (en) * 2008-08-25 2009-01-07 武汉烽火网络有限责任公司 Reliability guarantee method of network video monitoring frontend
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
CN113835966A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
US9647891B2 (en) Managing network configurations
US9529602B1 (en) Systems and methods for internet recovery and service
US10489232B1 (en) Data center diagnostic information
CN107451040B (en) Method and device for positioning fault reason and computer readable storage medium
US9239988B2 (en) Network event management
US8719634B2 (en) System health and performance care of computing devices
CN109308252A (en) A kind of fault location processing method and processing device
US9798606B2 (en) Systems and methods for smart diagnosis using hosted resources with intelligent altering of boot order
EP3522449B1 (en) Service state transition method and device
CN111796959B (en) Self-healing method, device and system for host container
US10929183B2 (en) System interventions based on expected impacts of system events on scheduled work units
CN106506278B (en) Service availability monitoring method and device
CN112380089A (en) Data center monitoring and early warning method and system
US7434204B1 (en) Method and apparatus for managing software processes
CN108920103B (en) Server management method and device, computer equipment and storage medium
CN114884840A (en) Application health state checking method and electronic equipment
CN113835966B (en) Service process management method, device, storage system and storage medium
CN108062251B (en) Server resource recovery method and computer equipment
US20230359514A1 (en) Operation-based event suppression
CN110968456B (en) Method and device for processing fault disk in distributed storage system
FR3003365A1 (en) METHOD AND DEVICE FOR MANAGING SOFTWARE UPDATES OF A SET OF EQUIPMENT OF A SYSTEM SUCH AS A SYSTEM OF AN AIRCRAFT
JP5456921B1 (en) Fault recovery device, fault recovery method, and fault recovery program
CN110716826A (en) Cloud disk upgrading and scheduling method, cloud host, scheduling device and system
CN115080337A (en) Data monitoring method, device, system, server and readable storage medium
WO2021059451A1 (en) Abnormality handling assisting device, method, and program

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