Instead of using -r2 run the onstat in a loop with a sleep and write each output to a different file. Then you can diff the files to find the long runners:
iter=0;
while [ $iter -lt 10 ]; do
onstat -g act >act.$iter.out
sleep 2
iter=$(( iter + 1 ))
done
You could also enable SQLTRACE and poll the data from there periodically to determine long running queries. Also there are 3rd part applications that will track that for you: iWatch and SQL PowerTools
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com------------------------------