Linux Program run monitoring

Source: Internet
Author: User

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

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.