0.8.1 • Published 5 years ago

egg-plugin-monitor v0.8.1

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

egg-plugin-monitor

egg 应用监控,可监控到 worker 和 agent 进程的 cpu 和 memery 使用情况,以及运行时间 通过 pm2 启动进程,亦可使用

Install

$ yarn add egg-plugin-monitor

Usage

// {app_root}/config/plugin.js
exports.monitor = {
  enable: true,
  package: 'egg-plugin-monitor',
};

Example

image

  1,安装并引入插件
  2,添加脚本到应用的 package.json
  ...
    "scripts": {
      ...,
      "monitor": "egg-monitor"
    }
  ...
  3, 启动应用后,在需要的时候使用 npm run monitor 即可获得当前应用的进程信息