linux process monitor restart

Learn about linux process monitor restart, we have the largest and most updated linux process monitor restart information on alibabacloud.com

Shell: Monitor the running state of the process and automatically restart the process

#!/bin/Shmaxrstcount=5; Proctogo=/mnt/hgfs/code/test/Show#count isThe counter of test started Timescount=0Sys_reboot () {echo"system is going to reboot"; Reboot;} Main_loop () { while : Do######################################### prostillrunning=$ (Ps-aux |grep"${proctogo}"|grep-v"grep") if[-Z"$ProStillRunning" ]; Then #start test chmod+x ${proctogo} ${proctogo} fi #the running times counter let Count=count+1Echo"test running Times is $count"#wait fortest stoping ... sleep3###############

Monitor MySQL, NDB process restart

Tags: mysqlmysql3306 Port down#!/bin/bash##### #mysql monitor# #while:d osleep 80/usr/bin/nc localhost 3306-w 2 >/dev/nullh= 0if [-ne 0];then/etc/init.d/mysql start fidone#!/bin/bash##### #mysql monitor# #while:d osleep 80/usr/bin/nc Localhos T 3306-w 2 >/dev/nullh=0if [-ne 0];then mysqld--defaults-file=/data/mysqlc/my_cluster/conf/my.cnf--us er=mysql Sleep mysql-u root-pdota.123-e "Select Memc_servers_set

Monitor HTTP process for high memory restart HTTPD

#!/bin/sh#crontabusage:*/2****/home/http_restart.sh> >/backup/restart_apache.logmin_ram=3200free_ram= ' free-m|grepmem|awk ' {print $4} ' echo$ (date+ "%y-%m-%d") ' uptime ' if[ ' echo ' $FREE _ramThis article is from the "my operation and maintenance of the road" blog, declined reprint!Monitor HTTP process for high memory restart HTTPD

[Original] use shell scripts to monitor the process and automatically restart after the crash fails.

========================================================== ==========This article is the original khler, and the original author information and the original link of this article must be kept completely and completely reprinted. Author: heyuanhuiE-mail:Khler@163.comQQ: 23381103MSN:Pragmac@hotmail.com========================================================== ========== How can I ensure that the service is always running? How can I ensure automatic restart

Monitor the process state of the. Py script with a Python script and implement an interrupt restart.

Monitor the execution state of the. Py script with a Python script and implement an interrupt restart. #!/usr/bin/python#-*-coding:utf-8-*-importsubprocess,time,systime=10 #程序状态检测间隔 (units: minutes) cmd= "get_bjipku.py" #需要执行程序的绝对路径, support jar such as: D:\\calc.exe or D:\\test.jarclassauto_run (): def__init__ (self,sleep_time,cmd): self.sleep_time=sleep_time self.cmd=cmdself.ext = (cmd[-3:]). Lower (

Simple Solution for linux server process monitoring and automatic restart, linux Server Process Monitoring

Simple Solution for linux server process monitoring and automatic restart, linux Server Process Monitoring Reprinted please indicate the source: curtain roll west wind column (http://blog.csdn.net/ljxfblog) Starting from this week, the newbie game was in the file deletion an

Linux system real-time monitor Apache running status and automatically restart HTTPD service

In order to achieve a highly available based on the Apache web site environment, in Apache for a variety of reasons automatically stop running, want to immediately restore site access, this requires a tool to monitor the operation of Apache real-time and can automatically restart the HTTPD service, on the Internet to find relevant information, Rewrite the following simple monitoring and

Initial understanding of the Linux startup process and restart process

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/47/AD/wKiom1P97NWifLzoAAP3e9V2-0g974.jpg "style=" float: none; "title=" ~j8lyh$rb6mb2kp$c@tjbwb.jpg "alt=" Wkiom1p97nwiflzoaap3e9v2-0g974.jpg "/>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/47/AD/wKiom1P97NiCZs_IAAG_JKNBnJM530.jpg "style=" float: none; "Title=" HFFK08) 4]o ' 1pl{l43s) anr.jpg "alt=" Wkiom1p97niczs_iaag_jknbnjm530.jpg "/>650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/47/AF/wKioL1P97fSDs1D_AAElcuI

Simple implementation of Linux Process Monitoring and Automatic Restart

Objective: Linux server programs will be dumped for various reasons, which will affect user usage. Here we provide a simple process monitoring and restart function. Implementation principle: the script is called by the scheduled task crontab. The script uses PS to check whether the process exists. If not,

Linux shutdown and restart Process Analysis

Linux shutdown and restart process analysis-general Linux technology-Linux programming and kernel information. The following is a detailed description. The shutdown and restart process

Linux shutdown and restart Process Analysis

The shutdown and restart process in Linux is not important for general desktop applications and network servers, but it has some research significance in the User-Defined embedded system kernel, by understanding the process of Linux shutdown and

Linux Shutdown Restart Process Analysis

Linux shutdown and restart process is not important for general desktop applications and Web servers, but in the user's own definition of embedded system kernel has some research significance, by understanding the Linux shutdown restart

Using shell scripts to monitor Linux systems and process resources

, the Linux operating system default shell is generally the Bourne Again shell, which is Bourne shell extension, called Bash,bash command syntax is a superset of Bourne shell command syntax, and in The Bourne shell adds and enhances a number of features on the base. Here, we use Bash as an example to summarize some of the things that the Shell uses to monitor system and

Monitor Linux system and process resources using Shell scripts

Monitor Linux system and process resources using Shell scripts This article mainly introduces how to monitor Linux system and process resources by using Shell scripts. This article describes how to check whether a

Simple solution for Linux server process monitoring and automatic restart

/monitor.shdirectly when I set the command, I found that this configuration will not execute the shell script, before adding SH can be executed.Then we started writing monitor.sh this shell script.#! /bin/sh proc_name= "worldframe_d" #进程名 proc_num () #查询进程数量 { num= ' ps-ef | grep $proc _name | grep-v grep | Wc-l ' return $num}proc_num number=$? #获取进程数量if [$number-eq 0] #如果进程数量为0then #重新启动服务器, or ex

Monitor Linux system and process resources using Shell scripts

This article mainly introduces how to monitor Linux system and process resources by using Shell scripts. This article describes how to check whether a process exists, check the CPU usage of the Process, check the memory usage of the proc

Expert: how to monitor and protect process security in Linux

Expert: how to monitor and protect process security in Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. By using user-level top, ps, and other system tools as well as Linux

Linux Process kill and crash-proof monitor implementation

protection is not logically desirable, although it is generally used in general scenarios. The problem is that P1 or P2 can be killed at any time. If one of them will not be killed, the problem will be solved. In Linux, The INIT process cannot be killed, so init can be used as the monitor. In fact, there is also a classic big loop in it, but people have the priv

Python is used to monitor linux performance and process consumption performance.

Python is used to monitor linux performance and process consumption performance. This article provides an example of how to monitor linux performance and process consumption performance using python. The specific implementation co

How Linux installs the use of the Pidstat command to monitor process data

Linux system monitoring commands There are many, Pidstat command is one of them, using the Pidstat command can be used to monitor the Linux system process data, but first to install the Pidstat to use, The following small series for you to introduce the Linux installation us

Total Pages: 15 1 2 3 4 5 .... 15 Go to: Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.