One. Using supervise
is a function of daemon-tools, the daemon of the system. It can be restarted automatically when the process is hung out.
Two-Installation
wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
Tar zxvf *.tar.gz && CD daemon/package
Here the code modifies the code, sed-i ' S/extern int errno;/#include <errno.h>/1 './src/error.h,
Install, type supervise, installation complete
After writing a script, create a folder, write the run script inside the folder, exit to the previous level, and supervise this folder. Run will start running.
Three additional
Write a script that automatically kills a process
1#!/bin/Bash2 PSAXF |grep$1|grep-V |awk '{print $}'| whileRead Line3 Do4 5 Kill-9${line}6 Echo${line}7 Done
Called./test xx {xx} is a program of $
Four use Createrepo to create your own repo. So you can always collect your favorite source of software.
Yum-y Install Createrepo && makir-p/root/yumupload
createrepo/root/yumtest/
vi/etc/yum.repos.d/
Create a new repo,
baseurl=file:///root/yumtest/
Yum Clean All
Yum Makecache
Get.
Linux Program run monitoring