Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ps aux | grep php --- check for GET arguments

Tags:

shell

php

process

I have a self-made "Process Manager" for my site, that simply parses the shell command
ps aux | grep php

This is useful to see if a php process is taking too much CPU or MEM. However, sometimes I see some php processes delaying some time to complete. The problem is that this doesn't tell me much:

/usr/bin/php /home/mysite/public_html/process.php

Because, a process may depend a lot of what GET arguments it receives.

So, my question is, is it possible to know what GET arguments did a PHP process receive?

Thank you.

like image 853
Nuno Avatar asked Oct 27 '25 15:10

Nuno


1 Answers

You can use proctitle to change the name of the php process to include the GET query string, assuming that you are on a Linux or BSD system.

like image 86
Jon Lin Avatar answered Oct 30 '25 06:10

Jon Lin