Coder Social home page Coder Social logo

ormonitor's Introduction

OrMonitor

Linux 程序监控工具


用于监控服务或后端进程,退出后可自行重启。

使用前提:

  1. 已安装start-stop-daemon工具
  2. 需指定监控进程的pid文件(若监控对象不生成,则由start-stop-daemon自动生成,请参考ormonitor.conf中的配置样例)
    (程序中默认使用了start-stop-daemon的 -pidfile-m 参数,请注意监控对象是否自行生成pid文件及该文件路径)

执行原理:

  1. 判断pid文件是否存在,不存在则认为监控对象未启动.重启.
  2. 若存在则读取pid文件中保存的pid号,并判断该pid进程是否存在.不存在则删除pid文件并重启.
  3. 监控周期使用定时器(setitimer)实现.

待完成:

  1. 以守护进程形式启动.

2014.10.14

ormonitor's People

Contributors

lixingke3650 avatar

Stargazers

popy32 avatar Zhang avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.