Changes between Initial Version and Version 1 of jazz/18-06-08


Ignore:
Timestamp:
Jul 17, 2018, 10:52:02 AM (6 years ago)
Author:
jazz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • jazz/18-06-08

    v1 v1  
     1= 2018-06-08 =
     2
     3== pm2 ==
     4
     5{{{
     6
     7pm2 list all
     8pm2 status
     9
     10pm2 logs
     11
     12npm install pm2-logrotate
     13pm2 set pm2-logrotate:retain 20
     14pm2 set pm2-logrotate:compress true
     15pm2 get
     16
     17pm2 startup
     18pm2 unstartup
     19}}}
     20
     21
     22== truncate ==
     23
     24* 有時候某些系統的 log 檔沒設定好 logroate 造成單檔 > 10GB 以上,此時可以靠 truncate 指令來縮小檔案大小
     25{{{
     26truncate -s 0 ${LOG_FILE_NAME}
     27}}}