The prstat utility can give a view of the FairCom DB process activity including user and system time and time waiting for locks.
#!/bin/csh
prstat -Lmc -p $1 5 | nawk '$1=="PID" { "date" | getline d ; close("date"); print d} { print $0 }' > ctsrvr_prstat.log
The example below is a script to call pstack. The ctsrvr process ID is the command-line argument:
#!/bin/csh
date >> ctsrvr_pstack.log
pstack $1 >> ctsrvr_pstack.log