A script is misbehaving. I need to know who calls that script, and who calls the calling script, and so on, only by modifying the misbehaving script.
This is similar
adding pstree -p -u `whoami` >>output in your script will probably get you the information you need.