nodejs 앱이 사용하는 컴퓨터 자원 모니터링steemCreated with Sketch.

in #node6 years ago

오늘은 nodejs에서 앱들이 사용하는 컴퓨터 자원을 모니터링하는 모듈을 살펴보고자 한다.

  • 설치
    npm install -g pm2

  • 시작
    pm2 start app.js --name "앱이름"

    위 그림과 같이 이름부분에 원하는 앱이름을 설정할 수 있다.

  • 리스트 확인
    pm2 list

  • 앱 중단
    pm2 stop "앱이름"

  • 앱 재시작
    pm2 restart "앱이름"

  • 앱 pm2 에서 삭제
    pm2 delete "앱이름"

위와 같이 콘솔에서 확인 할 수 있지만 웹으로도 앱의 상태를 확인 할 수 있다.

Sort:  

vote test

Congratulations @lku! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

By upvoting this notification, you can help all Steemit users. Learn how here!

pm2 logs -a [--lines 1000] [id]

  • [id]의 로그 확인

pm2 monit -a

  • CPU, 메모리 확인

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64093.86
ETH 3123.80
USDT 1.00
SBD 3.94