Process-watcher 介绍
Process-watcher 能够启动和控制 NodeJS 进程的工具。
代码示例:
var watcher = require('process-watcher'); /* * Dummy metric monitoring object. */ var watcher_metric = { /** * Increments metric */ increment : function (name, v) { // Add implementation as necessary }, /** * Set the metric or multiple metrics at the same time. * */ set : function (names, v) { // Add implementation as necessary } }; var dgpath = '/tmp/watcher_test_dgram', statusPath = '/tmp/watcher_status_path_test', watcher_config = { max_inactive : 0.001, monitor : 0.001, monPath: dgpath, timeout : 30, timeout_start : 60 }; //Instantiate watcher var watcher_instance = new watcher.Watcher({ metric : watcher_metric, config : watcher_config });
Process-watcher 官网
https://github.com/yahoo/process-watcher
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。