How to get the command line used to start a given process?

ps -p <PID> -o args

unix.stackexchange.com/a/163146

Another solution:

cat /proc/<PID>/cmdline | tr '\000' ' '

serverfault.com/a/479461

See also: How do I kill all running PHP CLI processes?