monitoring script

i have a unix batch written in c, dealing with really time-consuming
database operations
i want to write a ksh script to monitor its performance.
which items i should monitor?
do you have any suggestions?
1)cputime
2)swap area
3)pmem
4)
5)

what else?

You need to know something -

Most databases like Oracle create cooperating processes - one is the Pro*C executable, another is a child process totally devoted to communicating with the Oracle kernel and the other server processes located on your box.

If this is Oracle learn about tkprof instead. It's Oracle that is doing all of the work, almost always not the C process.