Thursday, October 18, 2012

Dumping Environment process info before an exit at startup time (JVM)

I have this process that craps out at startup time and I'm not sure what the problem is and what the exact environment settings are at runtime startup. So I need to trap the information from the /proc/[pid]/environ file on linux. In session one I start the monitoring process that will dump the environment to a file. In session two I start the actual process..... once the process startsup the session 1 oneliner will trap the information for me.
  628  while (true) do PID=`/sbin/pidof studio-tools`;if [ -n "$PID" ]; then cat /proc/$PID/environ | tr \\0 \\n > out; /usr/sbin/lsof -p $PID >> out ; break; fi; done;

No comments:

Post a Comment