Ps command output confusing

Hi,

I ran a script named cat item
when I searched for this script using command

PS

I get two process . I don't understand this. Also this script has run for 15 minutes but the time is showing as 0:00:confused::confused:

 ps -ef | grep cat_item
  catmgr  4508  4486  0 05:10:29 ?         0:00 -ksh -c /DI_Data_AT1/code_sp_at/informatica/cat/sh/cat_item_cache_stg.ksh
  catmgr  4486  4485  0 05:10:29 ?         0:00 -ksh -c /DI_Data_AT1/code_sp_at/informatica/cat/sh/cat_item_cache_stg.ksh

I am using HP-UX and shell is Ksh

please help

Thank you

Not knowing what cat_item does, I can see that the upper process is the child of the lower, linked/indicated by its parent PID (4486). Look into the script to see if and where and what for it forks. And they both don't seem to be too compute bound, so their CPU time (not elapsed time) is 0:00.

1 Like

Hi,

can you please shed some light on , what is compute bound?

Thank you

The value 0:00 that you are seeing is the total CPU time used by the process, not the elapse time.

If you do some tests you can see the difference:-

$ cat looptest.ksh 
i=1
while [ $i -le 1000 ]
do
   j=1
   while [ $j -le 1000 ]
   do
      ((t=$t+1))
      ((u=$j+$j))
      ((j=$j+1))
   done
   ((i=$i+1))
done

$ time looptest.ksh

real    1m37.03s
user    0m36.25s
sys     0m10.51s

The above is CPU intensive and finishes with statistics about the execution. Conversely, you have the opposite with:-

$ time sleep 30

real    0m30.01s
user    0m0.01s
sys     0m0.01s

Does this help your understanding?

Robin

Hi,

so what I understood is that the cpu time is very small for my process to show, thats why i am getting 0:00. Also i guess this process is doing some IO or other operation(s) majority of the time.

I dont understand what is real,user and sys time

$ time sleep 30

real    0m30.01s
user    0m0.01s
sys     0m0.01s

Thank you

from Compute bound definition of Compute bound in the Free Online Encyclopedia :