script for tracking pthread_mutex locks and waits