使用 pm2-web 监控 pm2 服务运行状态

pm2-web 是一款 pm2 服务状态监控程序,基于 web 。

安装

$ npm install -g pm2-web

运行(默认是在8080端口)

$ pm2-web

配置

pm2-web 将会加载默认的配置文件(如果存在)
pm2-web will load one of the following files if they exist (in order of preference)

A file specified by the --config /path/to/config.json argument
From the current users' home directory: ~/.config/pm2-web/config.json
A global configuration file: /etc/pm2-web/config.json
  • 1
  • 2
  • 3
  • 4

自定义配置文件
通过 --config yourFile 指定加载的配置文件
新建 pm2-web-config.json 文件:

{
    "www": {
        "host": "localhost",
        "address": "0.0.0.0",
        "port": 10016
    }                         
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

运行

运行 pm2-web:
$pm2-web --config pm2-web-config.json

访问 localhost:10016

可以在 web 界面查看 pm2 服务运行状态,点击按钮进行 stop restart reload 等操作。

这里写图片描述

可以查看各个服务的内存、CPU使用情况,日志等。
这里写图片描述

posted @   lclc  阅读(9744)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
点击右上角即可分享
微信分享提示