How should i know that the process is still processing data

I have some process . How should i know that the process is still processing data or got hanged even though it is showing that it is running in background

I know of a command called truss. how should i use this command and determine

1) process is still processing data
2) process got hanged

in all the cases my process is running in background?

plz help me in this

you cannot see if a process is doing something usefull unless the application log ists actions. but u can see if a process is consuming cpu time instead of sleeping. use ps to see if the process is using cpu time
ps -U root -eo pcpu,time,s,pid,comm
^ status see man ps
^total cpu time since process creation
^ actual cpu usage in %

another indicater is to see if a process is generating io. but this is not posible in linux without patching the kernel - see iotop

i have 2 apps Cleaner1 and Cleaner2 in IBM AIX 5.3

their pid
cleaner1:1482944 3362976
cleaner2:2158680 2519258

how to find whether this process are doing something like waiting for something or sleeping using pid as input

ps -p 1482944 -eo pcpu,time,s,pid,comm

when i give the below command , it showing error

ps -p 1482944 -eo pcpu,time,s,pid,comm

error:

ps: invalid list with -o.
Usage: ps [-ANPaedfklmMZ] [-n namelist] [-F Format] [-o specifier[=header],...]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist]
Usage: ps [aceglnsuvwxUX] [t tty] [ProcessNumber]

maybe usage is a little bit different in aix. consult man pages or aix forum

i have one command in AIX 5.3

ps gv 1482944

it gives the below detail,can anyone tell me what it tells about the process is stopped or waiting or got hanged

PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
1482944 - A 8:20 1 40816 40816 32768 70 0 0.1 1.0 java -X