Taking a process stack(pstack) on a process (in linux) when the process is about to exit

320 Views Asked by At

I have a requirement to take a process stack(pstack) on a process(cpp process) running in linux environment . The process can exit in various scenarios(normally or abnormally).So we are not sure when the process can exist , so is it still possible to write a script to get the pstack when the process gets an exit call ?

I am trying to do the above because we have a process getting terminated abnormally which is not generating any core file(yes the ulimt values are proper) ,and neither i could find any kill signals in var/log/messages.

Hence i decided to write a script for getting the pstack when the process is about to exit. It would be great if anyone could help me on this.

0

There are 0 best solutions below