I have used foreman to export an upstart config. There are a lot of long environment variables so the processes started include some with a long command like:

-su -c cd /home/ubuntu/project/2014-03-05-3ff545d; export PORT=5000; export BASE_URL=http ..... ; command_to_run

However the ps output on a bash terminal is truncated and misses some of the exported environment variables and the command_to_run part on the end. According to man ps | grep Wide:

w   Wide output. Use this option twice for unlimited width.

Using ps aux -w -w or ps aux ww or ps auxww still does not give me all of the command.

Edit 1

htop and cat /proc/<PID>/cmdline doesn't give the full output either, with the command truncated again to 4096 characters.


1 Answer 1


Can you get all of the command easily? No. You can only if you want to recompile the kernel.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.