WO2018040999A1 - 处理进程的方法及其装置 - Google Patents

处理进程的方法及其装置 Download PDF

Info

Publication number
WO2018040999A1
WO2018040999A1 PCT/CN2017/098782 CN2017098782W WO2018040999A1 WO 2018040999 A1 WO2018040999 A1 WO 2018040999A1 CN 2017098782 W CN2017098782 W CN 2017098782W WO 2018040999 A1 WO2018040999 A1 WO 2018040999A1
Authority
WO
WIPO (PCT)
Prior art keywords
container
watchdog
instance
timer
pid
Prior art date
Application number
PCT/CN2017/098782
Other languages
English (en)
French (fr)
Inventor
杜宇方
江洋洋
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17845301.5A priority Critical patent/EP3499373B1/en
Publication of WO2018040999A1 publication Critical patent/WO2018040999A1/zh
Priority to US16/287,218 priority patent/US10983825B2/en

Links

Images

Classifications

    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0712Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a virtual computing platform, e.g. logically partitioned systems
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0715Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a system implementing multitasking
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/0757Error or fault detection not based on redundancy by exceeding limits by exceeding a time limit, i.e. time-out, e.g. watchdogs
    • 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/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0662Virtualisation aspects
    • G06F3/0664Virtualisation aspects at device level, e.g. emulation of a storage device or system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/481Exception handling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/483Multiproc

Definitions

  • the present application relates to the field of information processing and, more particularly, to a method of processing a process in a container and apparatus therefor.
  • a container is a kernel virtualization technology that provides lightweight virtualization to isolate processes and resources. Docker is currently the hottest container technology.
  • the watchdog driver is used to ensure the normal operation of the system.
  • the system periodically feeds the watchdog driver.
  • the dog may not feed the dog for a long time.
  • the watchdog driver can restart the system.
  • the current operating system has only one watchdog driver.
  • the watchdog driver can only delete all processes of the entire system, so it can only guarantee the reliability of the entire system level.
  • container technology is becoming more and more popular.
  • the watchdog driver can implement deletion processing for all processes in one container.
  • the embodiment of the present application provides a method for processing a process in a container, which can perform deletion processing on all processes in the container.
  • a method for processing a process in a container is provided, the method being used for a physical machine, wherein the physical machine is deployed with a plurality of containers, the physical machine includes a watchdog watchdog driver, including: the watchdog driver passes The device file dev receives a first operation instruction of the first container, the first operation instruction includes a first process identifier PID, and the first PID indicates that the first operation instruction is a first process in the first container Deleting; according to the first PID, determining a first namespace corresponding to the first container; deleting all processes in the first container according to the first namespace.
  • the operation of the first container includes at least one of the following: a read operation, a write operation, an open operation, a close operation, and an ioctl operation.
  • the watchdog driver can delete all processes in the specific container according to the namespace, thereby enabling process processing on the container granularity.
  • the method before the deleting all the processes in the first container according to the first namespace, the method further includes: a first namespace, creating a first watchdog watchdog instance associated with the first container, wherein the first watchdog instance is used All processes in the first container are deleted, and the first watchdog instance includes a first timer.
  • the watchdog driver may include multiple watchdog instances, each of which is used to process the respective container process.
  • the watchdog driver includes a first watchdog instance, and the first watchdog instance includes a first timer, where Deleting all the processes in the first container, including: in the preset duration of the first timer, not receiving the second operation instruction sent by the first container, deleting the All the processes in the first container.
  • the second operation instruction issued by the first container is not received within the preset time period of the first timer, all the operations in the first container are deleted, and the second operation instruction may refer to the first container. Any operation command issued, that is, if the first watchdog instance is within the preset duration of the first timer, if no operation instruction is issued from the first container, the processor is instructed to delete the first container. All processes.
  • the method before the deleting all processes in the first container according to the first namespace, the method further includes: when the third operation instruction of the first container is received within a preset time period of the first timer, the first timer is cleared and then re-timed.
  • the third operation instruction is any operation instruction issued by the first container, that is, the trigger condition of the first timer re-clocking is: the first watchdog instance receives the operation instruction of the first container.
  • the method further includes: when the first timer expires, or receiving the first container In the case of an exit command issued, the first watchdog instance is deleted.
  • the method further includes: using the dev device Receiving a fourth operation instruction issued after the first container is restarted, the fourth operation instruction includes a second process identifier PID, and the second PID indicates that the fourth operation instruction is a second process in the first container Deleting a second namespace corresponding to the first container after the restart according to the second PID; and creating a second watchdog instance associated with the restarted first container according to the second namespace
  • the second watchdog instance includes a second timer, and the second watchdog instance is configured to delete all processes in the restarted first container when determining that the second timer expires.
  • the fourth operational command is any operational command issued by the first container after the restart.
  • the watchdog driver further includes a third watchdog instance, where the third watchdog instance includes a third timer, where a third timer is associated with the third one of the plurality of containers, the third watchdog instance is configured to determine, according to the third process identifier PID sent by the third container, a third corresponding to the third PID a namespace, and deleting all processes in the third container according to the third namespace.
  • the watchdog-driven watchdog instance can process all the processes in a specific container by processing the corresponding container without affecting the processes in other containers, and implements the process processing of the container granularity.
  • each container in at least one container sends an operation instruction to the watchdog driver through the same dev device, it is avoided that multiple dev devices and multiple watchdog drivers are required to implement container-level process processing.
  • an apparatus for processing a process includes: a receiving unit, a processing unit, and the device is configured to perform The method of any of the above first aspect or any of the possible implementations of the first aspect.
  • an apparatus comprising: a processor, and the memory, the processor, the memory and the receiver are connected by a bus system, the memory is for storing instructions, and the processor is configured to execute The memory stores instructions that cause the apparatus to perform the method of any of the first aspect or the first aspect of the first aspect.
  • a computer readable medium for storing a computer program comprising instructions for performing the method of the first aspect or any of the possible implementations of the first aspect.
  • FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present application.
  • FIG. 2 is a schematic flowchart of a method for processing a process according to an embodiment of the present application.
  • FIG. 3 is a schematic structural block diagram of a method for processing a process according to an embodiment of the present application.
  • FIG. 4 is a schematic structural block diagram of a method for processing a process according to another embodiment of the present application.
  • FIG. 5 is a schematic structural block diagram of a method for processing a process according to an embodiment of the present application.
  • FIG. 6 is a schematic structural block diagram of an apparatus for processing a process according to an embodiment of the present application.
  • FIG. 7 is a schematic structural block diagram of an apparatus for processing a process according to an embodiment of the present application.
  • FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present application.
  • the Linux system has a watchdog driver.
  • the watchdog driver is used to monitor the running of the system. It is located in the kernel space.
  • the user program in the user space communicates with the watchdog driver through the device file dev. Specifically, once the user program opens the /dev/watchdog device, it will start the watchdog driver to start a timer in the kernel space (the default is 1 minute). After that, the user program needs to ensure that data is written to the dev device within 1 minute.
  • the process of periodically writing data to the dev device by the user device is the process of regularly feeding the dog to the watchdog. Each time the user program feeds the dog, the watchdog-driven timer is cleared and recounted.
  • the timer will restart the system. Therefore, the mechanism of feeding the dog can ensure that the core process of the system is running for most of the time, even if In certain cases, the system process crashes, causing the dog to fail to feed properly.
  • the system can also be restarted under the watchdog driver to make the core process run again. This way, the system can run normally.
  • the watchdog driver can only delete all the processes of the entire system, so only the reliability of the entire system level can be guaranteed.
  • container technology is becoming more and more popular. When running a program running inside a container, it is expected that the watchdog driver can implement deletion processing for all processes in one container.
  • FIG. 2 is a schematic flowchart of a method for processing a process according to an embodiment of the present application.
  • the method of the embodiment of the present application is configured to deploy a plurality of containers on a physical machine, and the physical machine includes a watchdog watchdog driver. As shown in FIG. 2, the method includes:
  • Step 210 The watchdog driver receives the first operation instruction of the first container by using the device file dev, where the first operation instruction includes a first process identifier PID, and the first PID indicates that the first operation instruction is the first process in the first container. Made.
  • Step 220 Determine, according to the first PID, a first namespace named space corresponding to the first container.
  • Step 230 Delete all processes in the first container according to the first namespace.
  • the device file dev is a directory file in the operating system for storing hardware device information, and the kernel can be directly accessed through the directory.
  • the interaction between the user and the kernel needs to be done through the dev.
  • the operation of the kernel on the kernel needs to be performed by the dev, and each container in the at least one container operates through the dev device to the kernel space. For example, when the first container needs to perform an open operation to the watchdog driver of the kernel, the first container needs to issue an open operation instruction to the watchdog driver through /dev/watchdog.
  • the operation of the first container comprises at least one of the following: a read operation, a write operation, an open operation, a close operation, and an ioctl operation.
  • each of the at least one container sends an operation instruction through the same dev, and each container does not need to correspond to a single dev, thereby avoiding waste of resources.
  • the process identifier is a process identification number in the operating system, and each running process in the operating system corresponds to a unique PID.
  • the first PID can refer to any one of the processes in the first container. Generally speaking, when the container pulls up the process, the PID of the first pulled process is called the first PID, that is, the first container.
  • the first PID is also the PID corresponding to the first process pulled by the first container.
  • the first operation instruction of the first container includes the foregoing first PID, and thus the first PID is determined by the first PID, and the first operation instruction is sent by the first process of the first container, it should be understood that the first process does not Must be the first pulled process in the first container, can refer to any process in the first container.
  • step 220 when the watchdog driver receives the first operation instruction that the first container drives the watchdog by the dev device, the first PID in the first container can be known, and the first container is determined by the first PID.
  • Namespace (:namespace, NS), the process in the container from the pull to delete process, the container corresponds to a fixed namespace NS, the namespace can achieve the isolation of the running process between the containers.
  • the watchdog driver may perform deletion processing only for all processes in the first container characterized by the first namespace, so the first namespace can guarantee only the watchdog driver. Processes for processes in the first container, but have no effect on processes in other containers.
  • the process of acquiring the first namespace by using the first PID may be implemented by using a corresponding program and a command.
  • the watchdog driver acquires the first PID of the first container.
  • the process of obtaining the PID corresponding to the container by the operation of the container to the watchdog, and the process of obtaining the namespace of the PID by using the PID may be implemented by calling the corresponding Linux instruction, and the application is not limited to the specific instructions listed above. Code.
  • the watchdog driver can delete all the processes in a specific container by determining the namespace of the container, without affecting the processes in other containers, and realize the process processing of the container granularity.
  • the method before deleting all the processes in the first container according to the first namespace, the method further includes: creating a first watchdog watchdog instance associated with the first container according to the first namespace The first watchdog instance is used to delete all processes in the first container, and the first watchdog instance includes a first timer.
  • the watchdog driver acquires the first namespace of the first container according to the first PID corresponding to the first container, and creates a first watchdog instance according to the first namespace.
  • the first watchdog instance is configured to delete all processes running in the first container, where the first watchdog instance includes a first timer, when the first container does not operate the watchdog driver within a preset duration of the first timer. , to determine that the process running in the first container needs to be deleted.
  • the watchdog driver may include multiple watchdog instances, each of which is used to process the respective container process.
  • first watchdog instance may further include other attributes of the first container, such as the first namespace, the first PID, and the like, which are not limited herein.
  • the structure information of the first watchdog instance is as follows:
  • the soft_margin parameter represents the restart interval of softdog.ko.
  • the nowayout parameter indicates the watchdog kernel driver configuration option. For example, ‘CONFIG_WATCHDOG_NOWAYOUT’ can be set to ‘Y’, in which case the watchdog cannot be stopped after it is started. If the module's nowayout parameter is set to 0, writing the character ⁇ V' to /dev/watchdog will stop the watchdog from working;
  • setting the soft_noboot parameter to 1 means not restarting the corresponding container, and 0 means restarting the corresponding container;
  • ns_p->timeout soft_margin
  • ns_timer represents the timer corresponding to each instance
  • Ppid_ns represents the pid_namespace corresponding to each instance.
  • deleting all processes in the first container according to the first namespace including:
  • the first timer is a timer associated with the first container, and the timer has a preset duration.
  • the preset duration may be 60s, 75s, etc., which is not limited in this application.
  • the second operation instruction issued by the first container When the second operation instruction issued by the first container is not received within the preset time period of the first timer, all the operations in the first container are deleted, and the second operation instruction may refer to any one issued in the first container.
  • the operation instruction that is, the first watchdog instance is within the preset duration of the first timer, if no operation instruction issued by the first container is received, the processor is instructed to delete all processes in the first container.
  • the process running in the first container needs to be deleted according to the first namespace corresponding to the first container.
  • the watchdog driver may invoke the following command to delete the process according to the first namespace of the first container: force_sig(SIGKILL, pid_ns->child_reaper), where pid_ns in the command is Represents the first namespace.
  • the first watchdog instance in the watchdog driver is also deleted, and the attribute information of the first timer, the first PID, the first namespace, and the like in the first watchdog instance will be Clean up.
  • the method before deleting all the processes in the first container according to the first namespace, the method further includes: receiving the first container within a preset duration of the first timer In the third operation instruction, the first timer is cleared and then re-timed.
  • the third operation instruction is any operation instruction issued by the first container, that is, the trigger condition of the first timer re-clocking is: the first watchdog instance receives the operation instruction of the first container.
  • the method further includes: deleting the first watchdog instance if the first timer expires or when receiving the exit instruction sent by the first container.
  • the first container does not perform any operation on the watchdog driver within 60s, and then the first timer expires, then the judgment is made.
  • the processes in the first container need to be deleted, and all processes in the first container are further deleted.
  • an operation command may be sent to the watchdog driver to instruct the watchdog driver to delete all processes in the first container.
  • the method further includes: receiving, by using dev, a fourth operation instruction that is sent after the first container is restarted, and the fourth operation instruction
  • the second process identifier PID is included, the second PID indicates that the fourth operation instruction is sent by the second process in the first container, and the second namespace corresponding to the first container after the restart is determined according to the second PID; a second watchdog instance associated with the restarted first container, the second watchdog instance includes a second timer, and the second watchdog instance is configured to delete the first container after the restart when determining that the second timer expires All the processes.
  • the first container after all the processes of the first container have been deleted, if the first container is restarted, that is, a new process is pulled up in the first container, then when the watchdog driver receives the restart, the first container sends the fourth After the operation instruction, the second namespace of the first container after the restart is obtained according to the fourth operation instruction, and the second watchdog instance is created according to the second namespace, and the second watchdog instance includes the second PID and the second timer.
  • the fourth operational command is any operational command issued by the first container after the restart.
  • the dev device sends a second operation instruction to the watchdog driver, so the watchdog The driver may obtain the second PID in the first container.
  • the second PID is the PID corresponding to the first process after the first container is restarted.
  • the watchdog driver further includes a third watchdog instance
  • the third watchdog instance includes a third timer
  • the third timer is associated with the third container of the plurality of containers
  • the third watchdog instance is configured to determine a third namespace corresponding to the third PID according to the third process identifier PID sent by the third container, and delete all processes in the third container according to the third namespace.
  • each container in at least one container in the system corresponds to a watchdog instance, and the at least one watchdog instance is implemented by the same watchdog driver.
  • the watchdog-driven watchdog instance can process all the processes in a specific container by processing the corresponding container without affecting the processes in other containers, and implements the process processing of the container granularity.
  • each container in at least one container sends an operation instruction to the watchdog driver through the same dev device, it is avoided that multiple dev devices and multiple watchdog drivers are required to implement container-level process processing.
  • FIG. 3 is a schematic structural block diagram of a method for processing a process according to another embodiment of the present application.
  • the watchdog driver includes three instances NS1, NS2, and NS3.
  • the NS1 instance includes the PID of the container 1 and the first timer
  • the NS2 instance includes the PID of the container 2 and the second timer
  • the NS3 instance includes the PID of the container 3 and the third timer.
  • the watchdog driver can acquire the PID of the container 1 according to the operation of the container 1, the container.
  • the PID of 1 is the PID corresponding to the first process of the container 1 pulled up.
  • the watchdog driver can acquire the namespace NS1 of the container 1 according to the PID of the container 1.
  • the first timer in the NS1 instance can be set, for example, can be set to 60s, that is, when the container 1 feeds the watchdog driver within 60s, the first timer will be cleared, and the container 1 will operate normally.
  • the first timer will timeout triggering the watchdog driver to send a delete instruction, that is, all the processes running in the container 1 will be deleted, and then the container 1 can be operated. Restart under the corresponding command of the system.
  • the watchdog driver When the container 1 is restarted, and the above step type, the watchdog driver will create a new instance corresponding to the process after the container 1 is restarted, and implement monitoring on the container 1.
  • each instance corresponds to the PID and watchdog attributes of the container.
  • Different container operations correspond to different watchdog attributes, which is like opening multiple /dev/watchdogs.
  • the watchdog driver is executed according to the container's PID classification, and the container appears to be a private watchdog.
  • the watchdog-driven watchdog instance can be processed within a specific container by processing the corresponding container. All the processes are deleted, and the processes in other containers are not affected, and the process processing of the container granularity is realized.
  • each container in at least one container sends an operation instruction to the watchdog driver through the same dev device, it is avoided that multiple dev devices and multiple watchdog drivers are required to implement container-level process processing.
  • FIG. 4 is a schematic flowchart of a method for processing a process according to an embodiment of the present application.
  • the method includes:
  • step 401 the container sends an operation instruction to the watchdog driver through the dev device, and the operation instruction includes an operation instruction such as reading, writing, opening, and closing, which is not limited in the application.
  • Step 402 the watchdog driver obtains the PID of the container through the operation instruction of the container in step 401, and converts the PID of the container into the namespace of the container, wherein the process of acquiring the PID of the container and the process of obtaining the namespace are the same as the above embodiment. Similar, I will not repeat them here.
  • Step 403 The watchdog driver creates a watchdog instance, where the watchdog instance corresponds to the container, including the PID of the container and some attributes related to the operation instruction, and further includes a timer.
  • the timer can be set to 60s.
  • the container sends an operation instruction to the watchdog within 60 seconds, and the timer will be restarted to implement separate monitoring of the container by the watchdog driver.
  • Step 404 Determine whether one of the following two conditions is met: the exit command that the receiving container actively sends to the watchdog driver, and the watchdog instance timer expires.
  • Step 405 when one of the above two conditions is met, the watchdog driver is triggered to send a delete instruction to the container, and all processes currently running in the container are deleted.
  • step 406 the watchdog driver deletes the instance corresponding to the container, and clears the namespace and the like.
  • the watchdog-driven watchdog instance can process all the processes in a specific container by processing the corresponding container without affecting the processes in other containers, and implements the process processing of the container granularity.
  • each container in at least one container sends an operation instruction to the watchdog driver through the same dev device, it is avoided that multiple dev devices and multiple watchdog drivers are required to implement container-level process processing.
  • FIG. 5 is a schematic structural diagram of a method of processing a process according to an embodiment of the present application.
  • the monitoring driver may include multiple instances.
  • the example lists the instance 1, the instance 2, and the instance 3.
  • Each instance has a separate timer.
  • the instance 1 corresponds to the timer 1 and the instance. 2 corresponds to timer 2
  • instance 3 corresponds to timer 3, and so on.
  • the monitoring driver acquires the PID and the namespace of the container 1 through the operation instruction, and the instance 1 is created, which includes the PID of the container 1 and the timer 1, and the container 1 Other attributes related to the operation instruction.
  • This example 1 is used to monitor the operation of the container 1 alone.
  • the container 1 When the container 1 has an abnormality, the container 1 will be restarted while the instance 1 is deleted.
  • the monitoring driver will re-establish the corresponding instance of the container 1, for example, the instance 4 is associated with the PID of the container 1 after the restart, and the rest of the process is similar to the above, and details are not described herein again.
  • FIG. 6 is a schematic structural block diagram of an apparatus for processing a process according to an embodiment of the present application. As shown in FIG. 6, the apparatus 600 includes:
  • the receiving unit 610 is configured to receive, by using the device file dev, a first operation instruction of the first container, where the first operation instruction includes a first process identifier PID, and the first PID indicates the first operation
  • the instruction is issued by the first process in the first container.
  • the processing unit 620 is configured to determine, according to the first PID, a first namespace corresponding to the first container.
  • the processing unit 620 is further configured to delete all processes in the first container according to the first namespace.
  • the processing unit 620 is specifically configured to: create, according to the first namespace, a first watchdog watchdog instance associated with the first container, where the first watchdog instance is used And deleting all processes in the first container, the first watchdog instance includes a first timer.
  • the processing unit 620 is further configured to: when the preset period of the first timer associated with the first container is received, the first container does not receive the The second operation instruction deletes all processes in the first container.
  • the processing unit 620 is further configured to: when the preset period of the first timer associated with the first container is received, the first container does not receive the The second operation instruction deletes all processes in the first container.
  • the processing unit 620 is further configured to: when the third operation instruction of the first container is received within a preset duration of the first timer, A timer is cleared and then re-timed.
  • processing unit 620 is further configured to: when the first timer expires, or A watchdog instance.
  • the processing unit 620 is further configured to: receive, by using the dev device, a fourth operation instruction that is sent after the first container is restarted, where the fourth operation instruction includes a second process identifier PID, The second PID indicates that the fourth operation instruction is sent by a second process in the first container;
  • the processing unit 620 is further configured to: determine, according to the second PID, a second namespace corresponding to the restarted first container; and create a UI according to the second namespace
  • the apparatus further includes a third watchdog instance, the first watchdog instance and the third watchdog instance belong to one watchdog driver, and the third watchdog instance includes a third timer.
  • the third timer is associated with a third one of the plurality of containers, and the third watchdog instance is configured to determine the third PID according to the third process identifier PID sent by the third container.
  • the watchdog-driven watchdog instance can process all the processes in a specific container by processing the corresponding container without affecting the processes in other containers, and implements the process processing of the container granularity.
  • each container in at least one container sends an operation instruction to the watchdog driver through the same dev device, it is avoided that multiple dev devices and multiple watchdog drivers are required to implement container-level process processing.
  • Figure 7 is an apparatus of another embodiment of the present application.
  • the apparatus 700 includes a processor 701, a memory 702, and a bus system 703.
  • the processor 701 and the memory 702 are connected by a bus system 703, where the memory 702 is used to store instructions, and the processor 701 is configured to execute the instructions stored in the memory 702, and according to the implementation of the instructions in the memory 702, the embodiment shown in FIG.
  • the receiving unit and the processing unit can implement corresponding functions.
  • the processor 701 is configured to: receive, by using the device file dev, a first operation instruction of the first container, where The first operation instruction includes a first process identifier PID, the first PID indicating that the first operation instruction is sent by a first process in the first container, and determining, according to the first PID, the a first namespace corresponding to the first container; deleting all processes in the first container according to the first namespace.
  • the first operation instruction includes a first process identifier PID, the first PID indicating that the first operation instruction is sent by a first process in the first container, and determining, according to the first PID, the a first namespace corresponding to the first container; deleting all processes in the first container according to the first namespace.
  • apparatus 700 can implement the corresponding processes in the foregoing method embodiments. To avoid repetition, details are not described herein again.
  • the processor 701 may be a central processing unit (“CPU"), and the processor 701 may also be other general-purpose processors, digital signal processors (DSPs). , an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, and the like.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 702 can include read only memory and random access memory and provides instructions and data to the processor 701. A portion of the memory 702 can also include a non-volatile random access memory. For example, the memory 702 can also store information of the device type.
  • the bus system 703 may include a power bus, a control bus, a status signal bus, and the like in addition to the data bus. However, for clarity of description, various buses are labeled as bus system 703 in the figure.
  • each step of the foregoing method may be completed by an integrated logic circuit of hardware in the processor 701 or an instruction in a form of software.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented as a hardware processor, or may be performed by a combination of hardware and software modules in the processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
  • the apparatus includes a processor and a bus, wherein the processor is a digital signal processor (DSP), an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA) device.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • FPGA field programmable gate array
  • the class processor includes a storage unit or a storage circuit and the like having a storage function, so that an external memory can be stored, and the instructions for implementing the steps in the above method are stored in the units having the storage function.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate, displayed as a unit
  • the components may or may not be physical units, ie may be located in one place or may be distributed over multiple network elements. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product.
  • the technical solution of the present application which is essential or contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product, which is stored in a storage medium, including
  • the instructions are used to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

一种处理容器中进程的方法,所述方法用于物理机,所述物理机上部署有多个容器,所述物理机包括看门狗watchdog驱动,所述方法包括:所述watchdog驱动通过设备文件dev接收第一容器的第一操作指令,所述第一操作指令包括第一进程标识符PID,所述第一PID表示所述第一操作指令是所述第一容器中的第一进程下发的;根据所述第一PID,确定所述第一容器对应的第一命名空间namespace;根据所述第一namespace,删除所述第一容器内的全部进程。因此,watchdog驱动通过确定容器的命名空间,能够对特定容器内的全部进程进行删除处理,而不影响其它容器内的进程,实现了容器粒度的进程处理。

Description

处理进程的方法及其装置
本申请要求于2016年8月29日提交中国专利局、申请号为201610754545.0、申请名称为“处理进程的方法及其装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及信息处理领域,并且更具体地,涉及一种处理容器中进程的方法及其装置。
背景技术
容器(container)是一种内核虚拟化技术,可以提供轻量级的虚拟化,以便隔离进程和资源,其中,Docker是当前最热门的容器技术。
看门狗(watchdog)驱动用于保证***的正常运行,***会定期向该watchdog驱动进行喂狗,当***在出现故障时可能会长时间不喂狗,此时watchdog驱动能够重启***。
当前操作***只有一个watchdog驱动,该watchdog驱动只能够针对整个***的全部进程进行删除处理,因此只能够保证整个***级别的可靠性。然而,随着电信业务的发展,容器技术越来越普遍,当运行程序的在容器内运行时,期望watchdog驱动能够实现针对一个容器内的全部进程的删除处理。
发明内容
本申请实施例提供一种容器中处理进程的方法,能够对容器内的全部进程进行删除处理。
第一方面,提供一种处理容器中进程的方法,所述方法用于物理机,所述物理机上部署有多个容器,所述物理机包括看门狗watchdog驱动,包括:所述watchdog驱动通过设备文件dev接收第一容器的第一操作指令,所述第一操作指令包括第一进程标识符PID,所述第一PID表示所述第一操作指令是所述第一容器中的第一进程下发的;根据所述第一PID,确定所述第一容器对应的第一命名空间namespace;根据所述第一namespace,删除所述第一容器内的全部进程。
应理解,第一容器的操作包括下列中的至少一种:读操作、写操作、打开操作、关闭操作以及ioctl操作。
因此,看门狗驱动通过确定特定容器的命名空间,能够根据该命名空间对该特定容器内的全部进程进行删除,从而能够实现对容器粒度的进程处理。
结合第一方面,在第一方面的第一种可能的实现方式中,在所述根据所述第一命名空间,删除所述第一容器内的全部进程之前,所述方法还包括:根据所述第一namespace,创建所述第一容器关联的第一看门狗watchdog实例,其中,所述第一watchdog实例用于 删除所述第一容器内的全部进程,所述第一watchdog实例包括第一定时器。
应理解,watchdog驱动中可能包括多个watchdog实例,每个watchdog实例用于处理各自对应的容器进程。
结合第一方面及其上述实现方式,在第一方面的第二种可能的实现方式中,所述watchdog驱动包括第一watchdog实例,所述第一watchdog实例包括第一定时器,所述根据所述第一命名空间,删除所述第一容器内的全部进程,包括:当在所述第一定时器的预设时长内,未接收到所述第一容器发送的第二操作指令,删除所述第一容器内的全部进程。
应理解,当在该第一定时器的预设时长内,没有接收到第一容器发出的第二操作指令,则删除第一容器内的全部进行,第二操作指令可以指代第一容器内发出的任意操作指令,也就是说,在第一watchdog实例在第一定时器的预设时长内,如果没有收到任何第一容器发出的操作指令,那么将指示处理器删除第一容器内的全部进程。
结合第一方面及其上述实现方式,在第一方面的第三种可能的实现方式中,在所述根据所述第一命名空间,删除所述第一容器内的全部进程之前,所述方法还包括:当在所述第一定时器的预设时长内,接收到所述第一容器的第三操作指令时,将所述第一定时器清零后重新计时。
应理解,第三操作指令为第一容器下发的任意操作指令,也就是说,第一定时器重新计时的触发条件为:第一watchdog实例接收到第一容器的操作指令。
结合第一方面及其上述实现方式,在第一方面的第四种可能的实现方式中,所述方法还包括:在所述第一定时器超时的情况下,或在接收所述第一容器发出的退出指令的情况下,删除所述第一watchdog实例。
结合第一方面及其上述实现方式,在第一方面的第五种可能的实现方式中,在所述删除所述第一容器内的全部进程后,所述方法还包括:通过所述dev设备接收第一容器重启后发出的第四操作指令,所述第四操作指令包括第二进程标识符PID,所述第二PID表示所述第四操作指令是所述第一容器中的第二进程下发的;根据所述第二PID,确定所述重启后的第一容器对应的第二namespace;根据所述第二namespace,创建与所述重启后的第一容器关联的第二watchdog实例,所述第二watchdog实例包括第二定时器,所述第二watchdog实例用于在确定所述第二定时器超时时,删除所述重启后的第一容器内的全部进程。
应理解,第四操作指令为重启后的第一容器发出的任意操作指令。
结合第一方面及其上述实现方式,在第一方面的第六种可能的实现方式中,所述watchdog驱动还包括第三watchdog实例,所述第三watchdog实例包括第三定时器,所述第三定时器与所述多个容器中的第三容器关联,所述第三watchdog实例用于根据所述第三容器下发的第三进程标识符PID,确定所述第三PID对应的第三namespace,并根据所述第三namespace删除所述第三容器中的全部进程。
因此,watchdog驱动的watchdog实例通过对相应的容器的处理,能够对特定容器内的全部进程进行删除处理,而不影响其它容器内的进程,实现了容器粒度的进程处理。
此外,由于至少一个容器中每个容器都通过同一个dev设备向watchdog驱动发送操作指令,避免需要多个dev设备和多个watchdog驱动实现容器级别的进程处理。
第二方面,提供一种处理进程的装置,包括:接收单元、处理单元,所述装置用于执 行上述第一方面或第一方面的任一可能的实现方式中的方法。第三方面,提供了一种装置,包括:处理器、和存储器,所述处理器、所述存储器和所述接收器通过总线***相连,所述存储器用于存储指令,所述处理器用于执行该存储器存储的指令,使得所述装置执行上述第一方面或第一方面的任一可能的实现方式中的方法。
第三方面,提供了一种计算机可读介质,用于存储计算机程序,该计算机程序包括用于执行第一方面或第一方面的任意可能的实现方式中的方法的指令。
附图说明
下面将对本申请实施例中所需要使用的附图作简单地介绍。
图1是本申请实施例的应用场景的示意图。
图2是本申请一个实施例的处理进程的方法的示意性流程图。
图3是本申请一个实施例的处理进程的方法的示意性结构框图。
图4是本申请另一个实施例的处理进程的方法的示意性结构框图。
图5是本申请一个实施例的处理进程的方法的示意性结构框图。
图6是本申请一个实施例的处理进程的装置的示意性结构框图。
图7是本申请一个实施例的处理进程的装置的示意性结构框图。
具体实施方式
图1是本申请实施例的应用场景的示意图。
如图1所示,Linux***中具有一个watchdog驱动,该watchdog驱动用于监视***的运行,它位于内核空间,用户空间中的用户程序通过设备文件dev与该watchdog驱动进行通信。具体地,用户程序一旦打开/dev/watchdog设备,将会启动watchdog驱动在内核空间中启动一个定时器(默认为1分钟),此后,用户程序需要保证在1分钟之内向dev设备写入数据,用户设备向dev设备定期写入数据的过程也就是对watchdog进行定期喂狗的过程,用户程序每次喂狗都会导致watchdog驱动的定时器清零并重新计数。
应理解,上述1分钟的数值仅仅是示例性的,本申请不作限定。
当用户程序在1分钟之内并没有向watchdog进行喂狗时,定时器会进行***重启操作,因此,通过该种定时喂狗的机制,可以保证***核心进程大部分时间都处于运行状态,即使特定情况下***进程崩溃,导致无法正常定时喂狗,***也可以在看门狗驱动程序作用下重新启动,使得核心进程重新运行,这样的方式能够确保***业务正常运行。
然而,当前操作***中只有一个watchdog驱动,该watchdog驱动只能够针对整个***的全部进程进行删除处理,因此只能够保证整个***级别的可靠性。然而,随着电信业务的发展,容器技术越来越普遍,当运行程序的在容器内运行时,因此,期望watchdog驱动能够实现针对一个容器内的全部进程的删除处理。
图2是本申请一个实施例的处理进程的方法的示意性流程图。本申请实施例的方法用于物理机述物理机上部署有多个容器,物理机包括看门狗watchdog驱动,如图2所示,该方法包括:
步骤210,watchdog驱动通过设备文件dev接收第一容器的第一操作指令,第一操作指令包括第一进程标识符PID,第一PID表示第一操作指令是第一容器中的第一进程下 发的。
步骤220,根据第一PID,确定第一容器对应的第一命名空间namespace。
步骤230,根据第一namespace,删除第一容器内的全部进程。
具体地,设备文件dev是操作***中的一个目录文件,用于存储硬件设备信息,通过该目录可以直接访问内核。也就是说,用户和内核的交互需要通过该dev进行。具体地,容器对内核的操作,需要通过该dev进行,该至少一个容器中的每个容器都通过该dev设备向内核空间进行操作。例如,当第一容器需要向内核的watchdog驱动执行打开open操作的时候,则该第一容器需要通过/dev/watchdog对watchdog驱动发出open操作指令。
可选地,第一容器的操作包括下列中的至少一种:读操作、写操作、打开操作、关闭操作以及ioctl操作。
应理解,上述至少一个容器中的每个容器都是通过同一个dev发送操作指令,每个容器不需要单独对应一个dev,避免了资源浪费。
具体地,进程标识符(Process Identification;PID)为操作***中的进程识别号,操作***中每个运行的进程都对应一个唯一的PID。第一PID可以指代第一容器中的任意一个进程,一般来讲,当容器拉起进程的时候,第一个拉起的进程的PID称之为第一PID,也就是说,第一容器的第一PID也就是该第一容器拉起的第一个进程对应的PID。
具体地,第一容器的第一操作指令中包括上述第一PID,因此可以通过该第一PID确定,第一操作指令为第一容器的第一进程下发的,应理解,第一进程不一定是第一容器内的第一个拉起的进程,可以指代第一容器中的任意一个进程。
步骤220中,当watchdog驱动接收到第一容器通过dev设备对watchdog驱动的第一操作指令时,能够获知该第一容器中的第一PID,并通过该第一PID,确定第一容器对应的命名空间(:namespace,NS),在容器中的进程从拉起到删除这个过程中,该容器对应一个固定的命名空间NS,该命名空间可以实现容器之间运行进程的隔离。例如,当第一容器对应于第一命名空间时中,watchdog驱动可以只针对第一命名空间表征的第一容器内的所有进程进行删除处理,因此,该第一命名空间能够保证对watchdog驱动只针对第一容器中进程的进行处理,而对其它容器中的进程没有影响。
具体地,通过第一PID获取第一namespace的过程可以通过相应的程序和命令实现,例如,第一容器通过/dev/watchdog设备执行open操作时,watchdog驱动会获取到第一容器的第一PID,通过下面这个命令,可以获得第一namespace:struct pid_namespace*pid_ns=task_active_pid_ns(current)。
应理解,上述通过容器对watchdog驱动的操作以获取该容器对应的PID的过程,以及通过PID获取该PID所在的命名空间的过程可以调用相应的Linux指令实现,本申请不限于上述列举的具体指令代码。
因此,watchdog驱动通过确定容器的命名空间,能够对特定容器内的全部进程进行删除处理,而不影响其它容器内的进程,实现了容器粒度的进程处理。
可选地,作为本申请一个实施例,根据第一命名空间,删除第一容器内的全部进程之前,上述方法还包括:根据第一namespace,创建第一容器关联的第一看门狗watchdog实例,其中,第一watchdog实例用于删除第一容器内的全部进程,第一watchdog实例包括第一定时器。
也就是说,当第一容器通过dev向watchdog驱动发送操作指令时,watchdog驱动会根据第一容器对应的第一PID获取第一容器的第一namespace,并根据该第一namespace创建第一watchdog实例,该第一watchdog实例用于删除第一容器内运行的全部进程,该第一watchdog实例包括第一定时器,当第一容器在第一定时器的预设时长内没有对watchdog驱动进行操作时,则确定第一容器内运行的进程需要删除。
应理解,watchdog驱动中可能包括多个watchdog实例,每个watchdog实例用于处理各自对应的容器进程。
应理解,该第一watchdog实例中还可以包括第一容器的其它属性,例如第一命名空间、第一PID等,本申请不做限定。
例如,该第一watchdog实例的结构信息如下:
Figure PCTCN2017098782-appb-000001
struct ns_list ns_head;
其中,soft_margin参数代表了softdog.ko的重启时间间隔,缺省值是60秒,可以在加载softdog.ko时指定清零时间间隔,例如modprobe softdog soft_margin=100;
其中,nowayout参数表示watchdog内核驱动配置选项,例如,‘CONFIG_WATCHDOG_NOWAYOUT’可以设为‘Y’,在这种情况下watchdog启动后不能被停止。如果模块的nowayout参数设为0,往/dev/watchdog写入字符`V’可以使watchdog停止工作;
其中,soft_noboot参数设置为1时表示不重启对应容器,0表示需要重启对应容器;
其中,timeout用于记录每个实例的soft_margin,ns_p->timeout=soft_margin;ns_timer代表每个实例对应的定时器,Ppid_ns代表每个实例对应的pid_namespace。
可选地,作为本申请一个实施例,根据第一命名空间,删除第一容器内的全部进程,包括:
当在第一定时器的预设时长内,未接收到第一容器发送的第二操作指令,删除第一容器内的全部进程。
具体地,第一定时器为与第一容器关联的定时器,该定时器有一个预设时长,例如该预设时长可以为60s、75s等,本申请不作限制。
当在该第一定时器的预设时长内,没有接收到第一容器发出的第二操作指令,则删除第一容器内的全部进行,第二操作指令可以指代第一容器内发出的任意操作指令,也就是说,在第一watchdog实例在第一定时器的预设时长内,如果没有收到任何第一容器发出的操作指令,那么将指示处理器删除第一容器内的全部进程。
具体地,需要根据第一容器对应的第一命名空间,删除第一容器中运行的进程。
例如,当需要删除第一容器的进程时,watchdog驱动可以调用如下命令,根据第一容器的第一命名空间,删除进程:force_sig(SIGKILL,pid_ns->child_reaper),其中,该命令中的pid_ns即表示第一命名空间。
具体地,当删除第一容器的进程之后,watchdog驱动中的第一watchdog实例也将删除,该第一watchdog实例中对应的第一定时器、第一PID、第一命名空间等属性信息都将清理。
应理解,上述根据命名空间删除容器中进程的方法可以调用相应的***指令实现,本申请不限于上述列举的具体指令代码。
可选地,作为本申请一个实施例,在根据第一命名空间,删除第一容器内的全部进程之前,方法还包括:当在第一定时器的预设时长内,接收到第一容器的第三操作指令时,将第一定时器清零后重新计时。
应理解,第三操作指令为第一容器下发的任意操作指令,也就是说,第一定时器重新计时的触发条件为:第一watchdog实例接收到第一容器的操作指令。
可选地,作为本申请一个实施例,上述方法还包括:在第一定时器超时的情况下,或在接收第一容器发出的退出指令的情况下,删除第一watchdog实例。
也就是说,一种情况下,例如,当第一定时器设置的预设时长为60s,那么在60s时长内,第一容器没有对watchdog驱动进行任何操作,那么第一定时器超时,则判断第一容器内的进程需要删除,并进一步删除第一容器内的全部进程。
另一种情况下,当第一容器主动退出服务,则可以向watchdog驱动发送操作指令,指示watchdog驱动删除第一容器内的全部进程。
可选地,作为本申请一个实施例,在所述删除所述第一容器内的全部进程后,上述方法还包括:通过dev接收第一容器重启后发出的第四操作指令,第四操作指令包括第二进程标识符PID,第二PID表示第四操作指令是第一容器中的第二进程下发的;根据第二PID,确定重启后的第一容器对应的第二namespace;根据第二namespace,创建与重启后的第一容器关联的第二watchdog实例,第二watchdog实例包括第二定时器,第二watchdog实例用于在确定第二定时器超时时,删除重启后的第一容器内的全部进程。
也就是说,第一容器的全部进程已经删除后,该第一容器如果进行重启,即第一容器内有新的进程拉起,那么当watchdog驱动接收到重启后的第一容器发出的第四操作指令后,能够根据第四操作指令获取重启后的第一容器的第二namespace,并根据第二namespace创建第二watchdog实例,该第二watchdog实例包括第二PID和第二定时器。
应理解,第四操作指令为重启后的第一容器发出的任意操作指令。
例如,当第一容器为docker容器时,通过在该docker容器启动参数中输入“restart=always”,那么当docker的deamon后台检测到容器中的进程被删除后,会自动重启该docker容器,通过dev设备向watchdog驱动发送第二操作指令,因此,该watchdog 驱动可以获取第一容器中的第二PID,一般而言,该第二PID为第一容器重启后的第一个进程对应的PID。
应理解,根据第二操作指令获取第二PID的过程与上述实施例的过程类似,在此不再赘述,根据第二PID获取第二namespace,并根据第二namespace创建第二watchdog实例的过程业余上述实施例的过程类型,也不再赘述。
还应理解,当重启后第一容器的进程需要删除时,第二watchdog实例向发送相关的删除指令,第一容器中当前运行的进程将全部删除,随后第二watchdog实例也将删除,该过程与上述实施例的描述过程类似,在此不再赘述。
可选地,作为本申请一个实施例,其特征在于,watchdog驱动还包括第三watchdog实例,第三watchdog实例包括第三定时器,第三定时器与多个容器中的第三容器关联,第三watchdog实例用于根据第三容器下发的第三进程标识符PID,确定第三PID对应的第三namespace,并根据第三namespace删除第三容器中的全部进程。
也就是说,***中至少一个容器中的每个容器对应于一个watchdog实例,该至少一个watchdog实例是由同一个watchdog驱动实现的。
因此,watchdog驱动的watchdog实例通过对相应的容器的处理,能够对特定容器内的全部进程进行删除处理,而不影响其它容器内的进程,实现了容器粒度的进程处理。
此外,由于至少一个容器中每个容器都通过同一个dev设备向watchdog驱动发送操作指令,避免需要多个dev设备和多个watchdog驱动实现容器级别的进程处理。
图3是本申请另一个实施例的处理进程的方法的示意性结构框图。如图3所示,该应用空间内存在三个容器分别为容器1、容器2和容器3,该三个容器通过dev,也就是图中所述的/dev/watchdog,对内核中的watchdog驱动进行喂狗,watchdog驱动包括了三个实例NS1、NS2和NS3。其中,NS1实例包括容器1的PID和第一定时器,NS2实例包括容器2的PID和第二定时器,NS3实例包括容器3的PID和第三定时器。
具体地,以容器1为例,当容器1通过dev设备向watchdog驱动进行操作时,例如可以为读、写、打开等操作,watchdog驱动能够根据该容器1的操作获取该容器1的PID,容器1的PID也就是容器1第一个拉起的进程对应的PID。
进一步地,watchdog驱动能够根据容器1的PID,获取容器1的命名空间NS1。
NS1实例中的第一定时器可以进行设置,例如可以设置为60s,也就是当容器1在60s内对watchdog驱动进行喂狗操作时,该第一定时器将清零,容器1将正常的运作;当容器1在60s内对watchdog没有进行喂狗操作时,该第一定时器将超时触发watchdog驱动发送删除指令,也就是将删除容器1内运行的全部进程,随后,该容器1能够在操作***的相应命令下进行重启。
当容器1内当前运行的进程全部删除后,watchdog驱动中的NS1实例也将会删除。
当容器1重启后,与上述步骤类型,watchdog驱动将会新建一个对容器1重启后的进程相应的实例,对容器1实现监控。
应理解,每个实例对应容器的PID和watchdog属性。不同容器操作就对应不同的watchdog属性,实际就像打开了多个/dev/watchdog了。对于容器的每一项操作,watchdog驱动都会根据容器的PID分类执行,对容器看来就是私有的watchdog。
因此,watchdog驱动的watchdog实例通过对相应的容器的处理,能够对特定容器内 的全部进程进行删除处理,而不影响其它容器内的进程,实现了容器粒度的进程处理。
此外,由于至少一个容器中每个容器都通过同一个dev设备向watchdog驱动发送操作指令,避免需要多个dev设备和多个watchdog驱动实现容器级别的进程处理。
图4是本申请一个实施例的处理进程的方法的示意性流程图。
如图4所示,该方法包括:
步骤401,容器通过dev设备向watchdog驱动发送操作指令,该操作指令包括读、写、打开、关闭等操作指令,本申请不作限定。
步骤402,watchdog驱动通过容器在步骤401的操作指令,获取容器的PID,将该容器的PID转化为该容器的命名空间,其中,获取容器的PID的过程以及获取命名空间的过程与上述实施例类似,在此不再赘述。
步骤403,watchdog驱动创建watchdog实例,该watchdog实例与容器对应,包括容器的PID以及与操作指令相关的一些属性,还包括定时器,例如,该定时器可以设置为60s。
具体地,容器在60s内向watchdog发送操作指令,那么定时器将会重启,以实现该watchdog驱动对容器的单独监控。
步骤404,判断是否满足下列两种条件中的一种:接收容器主动向watchdog驱动发送的退出命令,以及watchdog实例定时器超时。
步骤405,当满足上述两种条件之一,将会触发watchdog驱动向容器发送删除指令,将删除容器内当前运行的全部进程。
步骤406,watchdog驱动将删除与容器对应的实例,并清除命名空间等。
应理解,上述删除指令、退出指令等为Linux***的相应指令,在此不再枚举。
因此,watchdog驱动的watchdog实例通过对相应的容器的处理,能够对特定容器内的全部进程进行删除处理,而不影响其它容器内的进程,实现了容器粒度的进程处理。
此外,由于至少一个容器中每个容器都通过同一个dev设备向watchdog驱动发送操作指令,避免需要多个dev设备和多个watchdog驱动实现容器级别的进程处理。
图5是本申请一个实施例的处理进程的方法的示意性结构图。如图5所示,监控驱动中可以包括多个实例,图中列出了实例1、实例2和实例3,每个实例都有一个单独的定时器,例如,实例1对应定时器1、实例2对应定时器2、实例3对应定时器3等等。
具体地,当容器1向监控驱动进行操作时,监控驱动通过该操作指令获取容器1的PID和命名空间,将创建实例1,该实例1中包括容器1的PID以及定时器1,以及与容器1操作指令相关的其它属性。该实例1用于单独的监控容器1的运行,当容器1发生异常时,将会重启容器1,同时删除实例1。
当容器1重启后,监控驱动将会重建容器1对应的实例,例如实例4,该实例4与容器1重启后的PID相关联,其余过程与上述类似,在此不再赘述。
图6是本申请一个实施例的处理进程的装置的示意性结构框图。如图6所示,该装置600包括:
接收单元610,所述接收单元610用于通过设备文件dev接收第一容器的第一操作指令,所述第一操作指令包括第一进程标识符PID,所述第一PID表示所述第一操作指令是所述第一容器中的第一进程下发的。
处理单元620,所述处理单元620用于根据所述第一PID,确定所述第一容器对应的第一命名空间namespace。
所述处理单元620还用于用于根据所述第一namespace,删除所述第一容器内的全部进程。
可选地,作为本申请一个实施例,处理单元620具体用于:根据所述第一namespace,创建所述第一容器关联的第一看门狗watchdog实例,其中,所述第一watchdog实例用于删除所述第一容器内的全部进程,所述第一watchdog实例包括第一定时器。
可选地,作为本申请一个实施例,所述处理单元620还用于:当在与所述第一容器关联的第一定时器的预设时长内,未接收到所述第一容器发送的第二操作指令,删除所述第一容器内的全部进程。
可选地,作为本申请一个实施例,所述处理单元620还用于:当在与所述第一容器关联的第一定时器的预设时长内,未接收到所述第一容器发送的第二操作指令,删除所述第一容器内的全部进程。
可选地,作为本申请一个实施例,处理单元620还用于:当在所述第一定时器的预设时长内,接收到所述第一容器的第三操作指令时,将所述第一定时器清零后重新计时。
可选地,作为本申请一个实施例,处理单元620还用于:在所述第一定时器超时的情况下,或在接收所述第一容器发出的退出指令的情况下,删除所述第一watchdog实例。
可选地,作为本申请一个实施例,处理单元620还用于:通过所述dev设备接收第一容器重启后发出的第四操作指令,所述第四操作指令包括第二进程标识符PID,所述第二PID表示所述第四操作指令是所述第一容器中的第二进程下发的;
可选地,作为本申请一个实施例,处理单元620还用于:根据所述第二PID,确定所述重启后的第一容器对应的第二namespace;根据所述第二namespace,创建与所述重启后的第一容器关联的第二watchdog实例,所述第二watchdog实例包括第二定时器,所述第二watchdog实例用于在确定所述第二定时器超时时,删除所述重启后的第一容器内的全部进程。
可选地,作为本申请一个实施例,所述装置还包括第三watchdog实例,所述第一watchdog实例与所述第三watchdog实例属于一个watchdog驱动,所述第三watchdog实例包括第三定时器,所述第三定时器与所述多个容器中的第三容器关联,所述第三watchdog实例用于根据所述第三容器下发的第三进程标识符PID,确定所述第三PID对应的第三namespace,并根据所述第三namespace删除所述第三容器中的全部进程。
因此,watchdog驱动的watchdog实例通过对相应的容器的处理,能够对特定容器内的全部进程进行删除处理,而不影响其它容器内的进程,实现了容器粒度的进程处理。
此外,由于至少一个容器中每个容器都通过同一个dev设备向watchdog驱动发送操作指令,避免需要多个dev设备和多个watchdog驱动实现容器级别的进程处理。
图7是本申请另一实施例的装置。如图7所示,该装置700包括处理器701、存储器702、总线***703。其中,处理器701、存储器702通过总线***703相连,该存储器702用于存储指令,该处理器701用于执行该存储器702存储的指令,并根据存储器702中指令的实现图6所示实施例中接收单元与处理单元所能够实现相应的功能。
具体地,所述处理器701用于:通过设备文件dev接收第一容器的第一操作指令,所 述第一操作指令包括第一进程标识符PID,所述第一PID表示所述第一操作指令是所述第一容器中的第一进程下发的;根据所述第一PID,确定所述第一容器对应的第一命名空间namespace;根据所述第一namespace,删除所述第一容器内的全部进程。
应理解,装置700能够实现前述方法实施例中的相应流程,为避免重复,这里不再赘述。
应理解,在本申请实施例中,该处理器701可以是中央处理单元(Central Processing Unit,简称为“CPU”),该处理器701还可以是其他通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
该存储器702可以包括只读存储器和随机存取存储器,并向处理器701提供指令和数据。存储器702的一部分还可以包括非易失性随机存取存储器。例如,存储器702还可以存储设备类型的信息。
该总线***703除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都标为总线***703。
在实现过程中,上述方法的各步骤可以通过处理器701中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器702,处理器701读取存储器702中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。
本申请的另一装置实施例中,该装置包括处理器和总线,其中,处理器为数字信号处理器(DSP)、专用集成电路(ASIC)或者现场可编程门阵列(FPGA)等器件,这类处理器中包括存储阵列或者存储电路等具有存储功能的单元,因此可以不需要外加存储器,而将实现上述方法中步骤的指令存储在这些具有存储功能的单元中。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的***、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的***、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的 部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应所述以权利要求的保护范围为准。

Claims (21)

  1. 一种处理容器中进程的方法,所述方法用于物理机,所述物理机上部署有多个容器,所述物理机包括看门狗watchdog驱动,其特征在于,包括:
    所述watchdog驱动通过设备文件dev接收第一容器的第一操作指令,所述第一操作指令包括第一进程标识符PID,所述第一PID表示所述第一操作指令是所述第一容器中的第一进程下发的;
    根据所述第一PID,确定所述第一容器对应的第一命名空间namespace;
    根据所述第一namespace,删除所述第一容器内的全部进程。
  2. 根据权利要求1所述的方法,其特征在于,在所述根据所述第一命名空间,删除所述第一容器内的全部进程之前,所述方法还包括:
    根据所述第一namespace,创建所述第一容器关联的第一看门狗watchdog实例,其中,所述第一watchdog实例用于删除所述第一容器内的全部进程,所述第一watchdog实例包括第一定时器。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述第一命名空间,删除所述第一容器内的全部进程,包括:
    当在所述第一定时器的预设时长内,未接收到所述第一容器发送的第二操作指令,删除所述第一容器内的全部进程。
  4. 根据权利要求至2或3所述的方法,其特征在于,在所述根据所述第一命名空间,删除所述第一容器内的全部进程之前,所述方法还包括:
    当在所述第一定时器的预设时长内,接收到所述第一容器的第三操作指令时,将所述第一定时器清零后重新计时。
  5. 根据权利要求2至4中任一项所述的方法,其特征在于,所述方法还包括:
    在所述第一定时器超时的情况下,或
    在接收所述第一容器发出的退出指令的情况下,
    删除所述第一watchdog实例。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,在所述删除所述第一容器内的全部进程后,所述方法还包括:
    通过所述dev接收第一容器重启后发出的第四操作指令,所述第四操作指令包括第二进程标识符PID,所述第二PID表示所述第四操作指令是所述第一容器中的第二进程下发的;
    根据所述第二PID,确定所述重启后的第一容器对应的第二namespace;
    根据所述第二namespace,创建与所述重启后的第一容器关联的第二watchdog实例,所述第二watchdog实例包括第二定时器,所述第二watchdog实例用于在确定所述第二定时器超时时,删除所述重启后的第一容器内的全部进程。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述watchdog驱动还包括第三watchdog实例,所述第三watchdog实例包括第三定时器,所述第三定时器与所述多个容器中的第三容器关联,所述第三watchdog实例用于根据所述第三容器下发的第三进 程标识符PID,确定所述第三PID对应的第三namespace,并根据所述第三namespace删除所述第三容器中的全部进程。
  8. 一种处理进程的装置,其特征在于,包括:
    接收单元,所述接收单元用于通过设备文件dev接收第一容器的第一操作指令,所述第一操作指令包括第一进程标识符PID,所述第一PID表示所述第一操作指令是所述第一容器中的第一进程下发的;
    处理单元,所述处理单元用于根据所述第一PID,确定所述第一容器对应的第一命名空间namespace;
    所述处理单元还用于根据所述第一namespace,删除所述第一容器内的全部进程。
  9. 根据权利要求8所述的装置,其特征在于,所述处理单元还用于:
    根据所述第一namespace,创建所述第一容器关联的第一看门狗watchdog实例,其中,所述第一watchdog实例用于删除所述第一容器内的全部进程,所述第一watchdog实例包括第一定时器。
  10. 根据权利要求9所述的装置,其特征在于,所述处理单元具体用于:
    当在与所述第一容器关联的第一定时器的预设时长内,未接收到所述第一容器发送的第二操作指令,删除所述第一容器内的全部进程。
  11. 根据权利要求9或10中任一项所述的装置,其特征在于,所述处理单元还用于:
    当在所述第一定时器的预设时长内,接收到所述第一容器的第三操作指令时,将所述第一定时器清零后重新计时。
  12. 根据权利要求10或11所述的装置,其特征在于,所述处理单元还用于:
    在所述第一定时器超时的情况下,或
    在接收所述第一容器发出的退出指令的情况下,
    删除所述第一watchdog实例。
  13. 根据权利要求9至12中任一项所述的装置,其特征在于,所述接收单元还用于:
    通过所述dev设备接收第一容器重启后发出的第四操作指令,所述第四操作指令包括第二进程标识符PID,所述第二PID表示所述第四操作指令是所述第一容器中的第二进程下发的;
    所述处理单元还用于:
    根据所述第二PID,确定所述重启后的第一容器对应的第二namespace;
    根据所述第二namespace,创建与所述重启后的第一容器关联的第二watchdog实例,所述第二watchdog实例包括第二定时器,所述第二watchdog实例用于在确定所述第二定时器超时时,删除所述重启后的第一容器内的全部进程。
  14. 根据权利要求9至12中任一项所述的装置,其特征在于,所述装置还包括第三watchdog实例,所述第一watchdog实例与所述第三watchdog实例属于一个watchdog驱动,所述第三watchdog实例包括第三定时器,所述第三定时器与所述多个容器中的第三容器关联,所述第三watchdog实例用于根据所述第三容器下发的第三进程标识符PID,确定所述第三PID对应的第三namespace,并根据所述第三namespace删除所述第三容器中的全部进程。
  15. 一种处理进程的装置,其特征在于,包括存储器,用于存储指令;处理器与所述 存储器相连,用于执行所述存储器存储的所述指令,以在执行所述指令时执行如下步骤:
    驱动通过设备文件dev接收第一容器的第一操作指令,所述第一操作指令包括第一进程标识符PID,所述第一PID表示所述第一操作指令是所述第一容器中的第一进程下发的;
    根据所述第一PID,确定所述第一容器对应的第一命名空间namespace;
    根据所述第一namespace,删除所述第一容器内的全部进程。
  16. 根据权利要求15所述的装置,其特征在于,所述处理器还用于:
    根据所述第一namespace,创建所述第一容器关联的第一看门狗watchdog实例,其中,所述第一watchdog实例用于删除所述第一容器内的全部进程,所述第一watchdog实例包括第一定时器。
  17. 根据权利要求16所述的装置,其特征在于,所述处理器具体用于:
    当在所述第一定时器的预设时长内,未接收到所述第一容器发送的第二操作指令,删除所述第一容器内的全部进程。
  18. 根据权利要求16或17所述的装置,其特征在于,所述处理器还用于:
    当在所述第一定时器的预设时长内,接收到所述第一容器的第三操作指令时,将所述第一定时器清零后重新计时。
  19. 根据权利要求16至18中任一项所述的装置,其特征在于,所述处理器还用于:
    在所述第一定时器超时的情况下,或
    在接收所述第一容器发出的退出指令的情况下,
    删除所述第一watchdog实例。
  20. 根据权利要求17至19中任一项所述的装置,其特征在于,所述处理器还用于:
    通过所述dev接收第一容器重启后发出的第四操作指令,所述第四操作指令包括第二进程标识符PID,所述第二PID表示所述第四操作指令是所述第一容器中的第二进程下发的;
    根据所述第二PID,确定所述重启后的第一容器对应的第二namespace;
    根据所述第二namespace,创建与所述重启后的第一容器关联的第二watchdog实例,所述第二watchdog实例包括第二定时器,所述第二watchdog实例用于在确定所述第二定时器超时时,删除所述重启后的第一容器内的全部进程。
  21. 根据权利要求17至19中任一项所述的装置,其特征在于,所述装置还包括第三watchdog实例,所述第三watchdog实例包括第三定时器,所述第三定时器与所述多个容器中的第三容器关联,所述第三watchdog实例用于根据所述第三容器下发的第三进程标识符PID,确定所述第三PID对应的第三namespace,并根据所述第三namespace删除所述第三容器中的全部进程。
PCT/CN2017/098782 2016-08-29 2017-08-24 处理进程的方法及其装置 WO2018040999A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP17845301.5A EP3499373B1 (en) 2016-08-29 2017-08-24 Method and apparatus for processing process
US16/287,218 US10983825B2 (en) 2016-08-29 2019-02-27 Processing for multiple containers are deployed on the physical machine

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610754545.0 2016-08-29
CN201610754545.0A CN107783854B (zh) 2016-08-29 2016-08-29 处理进程的方法及其装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/287,218 Continuation US10983825B2 (en) 2016-08-29 2019-02-27 Processing for multiple containers are deployed on the physical machine

Publications (1)

Publication Number Publication Date
WO2018040999A1 true WO2018040999A1 (zh) 2018-03-08

Family

ID=61300069

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/098782 WO2018040999A1 (zh) 2016-08-29 2017-08-24 处理进程的方法及其装置

Country Status (4)

Country Link
US (1) US10983825B2 (zh)
EP (1) EP3499373B1 (zh)
CN (1) CN107783854B (zh)
WO (1) WO2018040999A1 (zh)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108762967B (zh) * 2018-05-30 2021-08-24 宁波市标准化研究院 用于监控Linux***中Web服务的软件看门狗实现方法
US11481278B2 (en) * 2020-05-19 2022-10-25 EMC IP Holding Company LLC System and method for recovering an operating system after a runtime hang using a dual-flash device
US11797389B2 (en) * 2020-05-19 2023-10-24 EMC IP Holding Company LLC System and method for recovering an operating system after an upgrade hang using a dual-flash device
US11550655B2 (en) 2020-05-19 2023-01-10 EMC IP Holding Company LLC System and method for monitoring and upgrading a dual-flash device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791034A (zh) * 2004-12-13 2006-06-21 华为技术有限公司 一种检测方法
CN102857363A (zh) * 2012-05-04 2013-01-02 运软网络科技(上海)有限公司 一种虚拟网络的自主管理***和方法
US20140173618A1 (en) * 2012-10-14 2014-06-19 Xplenty Ltd. System and method for management of big data sets
CN105389243A (zh) * 2015-10-26 2016-03-09 华为技术有限公司 一种容器监控方法和装置
CN105677501A (zh) * 2016-01-07 2016-06-15 烽火通信科技股份有限公司 Linux***中基于看门狗的精细化进程监控方法及***

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6047343A (en) * 1996-06-05 2000-04-04 Compaq Computer Corporation Method and apparatus for detecting insertion and removal of a memory module using standard connectors
US6192417B1 (en) * 1999-03-30 2001-02-20 International Business Machines Corporation Multicast cluster servicer for communicating amongst a plurality of nodes without a dedicated local area network
US7000100B2 (en) * 2001-05-31 2006-02-14 Hewlett-Packard Development Company, L.P. Application-level software watchdog timer
US7971104B2 (en) * 2006-10-24 2011-06-28 Shlomi Dolev Apparatus and methods for stabilization of processors, operating systems and other hardware and/or software configurations
KR20090072742A (ko) * 2007-12-28 2009-07-02 엘지노텔 주식회사 임베디드 자바 가상 머신을 재구동하기 위한 방법
CN102902599B (zh) * 2012-09-17 2016-08-24 华为技术有限公司 虚拟机内部故障处理方法、装置及***
US9552363B2 (en) * 2013-04-30 2017-01-24 Microsoft Technology Licensing, Llc File management with placeholders
US9208015B2 (en) * 2013-06-18 2015-12-08 Vmware, Inc. Hypervisor remedial action for a virtual machine in response to an error message from the virtual machine
US9535794B2 (en) * 2013-07-26 2017-01-03 Globalfoundries Inc. Monitoring hierarchical container-based software systems
CN103559124B (zh) * 2013-10-24 2017-04-12 华为技术有限公司 故障快速检测方法及装置
CN104915263B (zh) * 2015-06-30 2019-04-19 北京奇虎科技有限公司 基于容器技术的进程故障处理方法及装置
CN105550576B (zh) * 2015-12-11 2018-09-11 华为技术服务有限公司 容器间通信的方法与装置
US10318318B2 (en) * 2016-02-26 2019-06-11 Red Hat, Inc. Extending user interface of a web console

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1791034A (zh) * 2004-12-13 2006-06-21 华为技术有限公司 一种检测方法
CN102857363A (zh) * 2012-05-04 2013-01-02 运软网络科技(上海)有限公司 一种虚拟网络的自主管理***和方法
US20140173618A1 (en) * 2012-10-14 2014-06-19 Xplenty Ltd. System and method for management of big data sets
CN105389243A (zh) * 2015-10-26 2016-03-09 华为技术有限公司 一种容器监控方法和装置
CN105677501A (zh) * 2016-01-07 2016-06-15 烽火通信科技股份有限公司 Linux***中基于看门狗的精细化进程监控方法及***

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3499373A4 *

Also Published As

Publication number Publication date
CN107783854A (zh) 2018-03-09
US20190196864A1 (en) 2019-06-27
EP3499373A1 (en) 2019-06-19
EP3499373A4 (en) 2019-11-06
US10983825B2 (en) 2021-04-20
CN107783854B (zh) 2021-08-20
EP3499373B1 (en) 2022-07-27

Similar Documents

Publication Publication Date Title
WO2018040999A1 (zh) 处理进程的方法及其装置
US10838905B2 (en) Managing a peripheral component interface express device hotplug
US8412984B2 (en) Debugging in a cluster processing network
US9817975B2 (en) Method for logging firmware attack event and system therefor
WO2016161800A1 (zh) ***运行的方法及智能终端
WO2017211226A1 (zh) 展示媒体文件的方法、终端和存储介质
CN109891392A (zh) 一种***服务超时的处理方法及装置
WO2018095414A1 (zh) 虚拟机故障的检测和恢复方法及装置
EP3407187B1 (en) Optical line terminal, and method for upgrading master device and slave device
WO2018019242A1 (zh) 网站服务器的自恢复方法和自恢复***
CN106776064B (zh) 多***中管理日志的方法及装置
CN108108198B (zh) 用于计算机***的方法及***
KR101974989B1 (ko) 위험 파일에 대응하는 행위 정보를 결정하는 방법 및 장치
JP6599725B2 (ja) 情報処理装置およびログ管理方法、並びにコンピュータ・プログラム
US8949588B1 (en) Mobile telephone as bootstrap device
JP2005222366A (ja) 自動復帰方法/プログラム/プログラム記録媒体、処理装置
WO2019242133A1 (zh) 电子设备中的软件升级方法、装置及电子设备
CN112445549A (zh) 运维方法、运维装置、电子设备和介质
CN111078452A (zh) 一种bmc固件镜像恢复方法与装置
US10346224B2 (en) Management framework for applications using passcode-based encryption
US20220137984A1 (en) Efficient Hibernation Apparatus and Method for Digital Devices
CN115951949A (zh) 一种bios的配置参数的恢复方法、装置及计算设备
CN110515553B (zh) 一种卷删除方法及设备
CN111045787B (zh) 一种快速继续实验方法及***
CN112698870A (zh) 开关机管理方法、计算设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17845301

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017845301

Country of ref document: EP

Effective date: 20190313