Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for monitoring and controlling subprocess based on Linux system

An operating system and sub-process technology, applied in hardware monitoring, program control devices, program loading/starting, etc., can solve the problems of consuming system resources, unable to realize real-time startup and unexpected exit, etc.

Inactive Publication Date: 2010-01-20
北京数帅科技有限公司
View PDF0 Cites 31 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although this method can solve the problem of unexpected exit of service sub-processes, using the monitoring process to continuously poll and check each process will not only consume a lot of system resources, but also cannot start the service sub-processes that exit unexpectedly in real time

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for monitoring and controlling subprocess based on Linux system
  • Method for monitoring and controlling subprocess based on Linux system
  • Method for monitoring and controlling subprocess based on Linux system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] The flow process of the subprocess monitoring method based on the Linux operating system provided by the present invention, such as figure 2 shown, including steps:

[0039] Step 201, start the system (start).

[0040] Step 202, the system performs initialization settings, including operations such as initializing the console, setting terminal attributes, setting system environment variables, shielding and taking over signals, and the like.

[0041] Step 203, analyzing the startup configuration file inittab, loading the tasks that need to be run when the init process starts, and generating a task list. The task structure is as follows:

[0042] struct init_action{

[0043] struct init_action*next; single linked list next pointer

[0044] int action; current task type

[0045] pid_t pid; current task pid

[0046] char command[INIT_BUFFS_SIZE]; current task command execution full path

[0047] char terminal[CONSOLE_BUFF_SIZE]; the output console of the current task...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for monitoring and controlling a subprocess based on a Linux system, comprising the following steps of: after starting up an operation system, loading a task list, and executing tasks in the task list; building a pid document which comprises a distributed pid for the subprocess which needs to be ministered and controlled; obtaining the pid of the subprocess when an exit signal SIGCHLD of the subprocess is judged to be received; obtaining a pid document name corresponding to the pid of the subprocess when the obtained pid of the subprocess is judged to be accordance with the pid in the built pid document; obtaining a control script name in a restarted configuration document corresponding to the pid document; and executing the control script corresponding to the control script name, and generating and executing a task for restarting the subprocess. The method for monitoring and controlling the subprocess based on the Linux system can monitor and control the quit of the subprocess, realize restart of the quit subprocess, and save system resource.

Description

technical field [0001] The invention relates to the field of process monitoring, in particular to a sub-process monitoring method based on a Linux operating system. Background technique [0002] A service subprocess is a program with a specific function rather than an integral part of the Linux kernel. Service subprocesses are usually started when the system boots and continue to run while the Linux operating system is running. The Init process is the first process to run after the system is booted, and is the parent process of all service child processes. Common service subprocesses include printing subprocesses, file processing subprocesses, database management subprocesses, email subprocesses, and network subprocesses. Unknown problems or errors encountered during system operation will cause these service sub-processes to exit unexpectedly. At this time, these exited service sub-processes need to be manually started, otherwise the exited process cannot resume operation...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/445G06F11/30
Inventor 裴文浩
Owner 北京数帅科技有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products