title: Capture historical process history UNIX?
body: <p>I'm wondering if there a way of capturing a list of the processes executed on a non-interactive shell?  </p>
  
  <p>Basically I have a script which calls some variables from other sources and I want to see what the values of said variables are.  However, the script executes and finishes very quickly so I can't capture the values using ps.  </p>
  
  <p>Is there a way to log processes and what arguments were used?</p>
  
  <p>TIA
  Huskie</p>
  
  <p>EDIT:</p>
  
  <p>I'm using Solaris in this instance.   I even thought about about having a quick looping script to capture the values being passed - but this doesn't seem very accurate and I'm sure executions aren't always being captured.
  I tried this:</p>
  
  <pre><code>   #!/bin/ksh
  
     while [ true ]
     do
  
     ps -ef | grep  $SCRIPT_NAME |egrep -v 'shl|lis|grep' &gt;&gt; grep_out.txt
  
     done
  </code></pre>
  
  <p>I'd use sleep but I can't specify any precision as all my sleep executables want an integer value rather than any fractional value.</p>