I have a daemon process (slapd) which sometimes stops with no apparent reason. No segfault occurs. Nothing special in the logs. So, I'm trying to use acct to track the process' life, especially its exit value. The man says that the kernel does log this value. Surprisingly, my dump-acct does not show this information... I had to change the source by adding this line in the print_pacct_record() function:(void)fprintf(out, %4u|, rec->ac_exitcode >> 8);EDIT: this change has been recently added mainstream.However, I feel this won't be enough to discover what the problem is. Is there better ways to track how the program exits? A stack trace, for example, would be interesting. The last seconds trace would be even better. I thought of strace or ltrace but the program can run for days before it stops itself. I fear tracing will impact performance. I don't know if gdb could help. 
Should I use Linux's acct (BSD process accounting) to track a process behavior?
linux;process;trace