Pm2.log filling up disk

I started seeing a bunch of low disk usage emails and the culprit seems to be this pm2.log which is 5+ GB. Too large to open of course. I started reading the wiki page but I’d like to see whats going on in the background that’s filling up this log.

What’s a good way to do this?

FreePBX 14.0.13.28
Process Management module is at 13.0.7.1

Thanks.

You could always use the following to ‘trim it’:

echo -n > pm2.log

That will erase it without removing the file. From there, a quick “tail -F pm2.log” should give you plenty of insight.

Thanks for that. I see it’s adding several kb a second worth of this

[2020-04-27 15:43:38] PM2 log: App [restapps] with id [30] and pid [8841], exited with code [2] via signal [SIGINT]
[2020-04-27 15:43:38] PM2 log: Starting execution sequence in -fork mode- for app name:restapps id:30
[2020-04-27 15:43:38] PM2 log: App name:restapps id:30 online

I’m thinking this is because the EPM license expired recently and now I cant upgrade it to upgrade the restapps module. I guess it’s time to go spend some money.

Out of curiosity I tried deleting the restapps module and the log continues to grow. I guess $11 isn’t all that much money to fix the issue.

The daemon may still be running. You can check and delete with:

[[email protected] /]# fwconsole pm2 --list
+------------------+-------+--------+----------+---------------------+-----+---------+
| Process Name     | PID   | Status | Restarts | Uptime              | CPU | Mem     |
+------------------+-------+--------+----------+---------------------+-----+---------+
| core-fastagi     | 17078 | online | 0        | 13 days, 9 hours    | 0%  | 5.15MB  |
| ucp              | 28561 | online | 0        | 13 days, 9 hours    | 0%  | 38.19MB |
| zulu             | 17459 | online | 0        | 13 days, 9 hours    | 0%  | 84.91MB |
| xmpp             | 3512  | online | 0        | 5 days, 3 hours     | 0%  | 8.35MB  |
| qcallback        | 3073  | online | 0        | 4 days, 9 hours     | 0%  | 6.66MB  |
| qcallback-events | 3161  | online | 0        | 4 days, 9 hours     | 0%  | 34.88MB |
| restapps         | 28318 | online | 0        | 3 hours, 42 minutes | 0%  | 46.93MB |
+------------------+-------+--------+----------+---------------------+-----+---------+
[[email protected] /]# fwconsole  pm2 --delete restapps
Process Stopped and Deleted

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.