/usr/bin/lastwords
This prints the last few system calls for processes matching the given name, when they exit. This makes use of a ring buffer so that the impact on the system is minimised.