Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-heap-monitor

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-heap-monitor

## 概述

  • 1.0.1-0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

egg-heap-monitor

概述

eggjs 的内存监控集合,包括 heapdump、memwatch、easy-monitor

eggjs 中引用该插件后可实现以下功能:

  • 使用kill -USR2 <pid>在服务运行目录输出内存堆快照
  • 开启easy-monitor访问服务,通过浏览器查看 node 服务运行状态(默认http://<服务地址>:12333)
  • 发生内存泄露时自动在 logs 目录下输出当前内存堆快照

配置

在 config 目录的 plugin.js 中引用

exports.heapMonitor = {
  enable: true,
  package: 'egg-heap-monitor'
}

通过定义 egg 的 config 来设置监控,配置方法和 easy-monitor 一样

config.heapMonitor = {
  project_name: 'ias-console'
}

可针对 egg 的 agent 和 app 分别设置不同的监控

config.heapMonitor = {
  app: {
    project_name: 'ias-console-app'
  },
  agent: {
    project_name: 'ias-console-agent'
  }
}

特别说明

开发用的 node 环境是 v8.4.0 版本(和当前服务容器保持一致),还原包时除了引用插件外还需要本机具有 gcc 和 cmake

Keywords

FAQs

Package last updated on 27 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc