0

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

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

https://stackoverflow.com/questions/199130/how-do-i-increase-the-proc-pid-cmdline-4096-byte-limit

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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