Version 1 (modified by jazz, 6 years ago) (diff) |
---|
2018-06-08
pm2
pm2 list all pm2 status pm2 logs npm install pm2-logrotate pm2 set pm2-logrotate:retain 20 pm2 set pm2-logrotate:compress true pm2 get pm2 startup pm2 unstartup
truncate
- 有時候某些系統的 log 檔沒設定好 logroate 造成單檔 > 10GB 以上,此時可以靠 truncate 指令來縮小檔案大小
truncate -s 0 ${LOG_FILE_NAME}