-1

I want to build a control panel for all the pm2 in Admin Dashboard and let admin have control to start/stop/restart/delete the running processes. How can i get the list of running pm2 queue in laravel.

1 Answers1

0

You can use exec function

$processList=null;
exec('pm2 list',$processList)

But you must run PHP with the same user as pm2. If you want to use different user check Running command-line application from PHP as specific user

Muhammad Dyas Yaskur
  • 6,914
  • 10
  • 48
  • 73