Ps command output confusing


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ps command output confusing
# 1  
Old 05-19-2015
HP Ps command output confusing

Hi,

I ran a script named cat item
when I searched for this script using command
Code:
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:00SmilieSmilie
Code:
 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
# 2  
Old 05-19-2015
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.
This User Gave Thanks to RudiC For This Post:
# 3  
Old 05-19-2015
Hi,

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

Thank you
# 4  
Old 05-19-2015
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:-
Code:
$ 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:-
Code:
$ time sleep 30

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

Does this help your understanding?



Robin
# 5  
Old 05-19-2015
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
Code:
$ time sleep 30

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

Thank you
# 6  
Old 05-19-2015
from Compute bound definition of Compute bound in the Free Online Encyclopedia :
Quote:
process bound

(redirected from Compute bound)
Also found in: Wikipedia. process bound

An excessive amount of processing in the CPU that causes an imbalance between I/O and processing. For example, recalculating a spreadsheet, compiling a program or converting a large graphics file can make a desktop computer process bound.

In a multitasking system, process-bound applications slow down other applications and other users depending on how the operating system slices time (see preemptive multitasking).



Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Confusing sed error message

This situation is extracted from a larger context. My intention for now is to escape the forward slashes in the path of a filename. (Ultimately the LINEs will come from a file.) while read LINE ; do sed 's/\//\\\//g' <<< "$LINE" # ok escaped=`sed 's/\//\\\//g' <<< "$LINE"` #... (12 Replies)
Discussion started by: Ralph
12 Replies

2. Shell Programming and Scripting

Confusing of some basic awk

1. increase file space first, double space a file: awk '1;{print ""}' I probably can understand it:print a blank line every time.But when I read triple space a file I am confused: awk '1;{print "\n"}' doesn't it meaning print a blank line every time too? 2. number each line of file, but... (6 Replies)
Discussion started by: hhdzhu
6 Replies

3. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

4. Shell Programming and Scripting

Confusing find command option

Hi, I am a little bit confusing of using find command. Actually, I am planning to delete the files whatever the files are existing in the day before yesterday. So, I am writing the command like this. find . -name "*.txt" -ctime -2 { here I am confusing, if I will use +2 or +1 also I am... (5 Replies)
Discussion started by: nagraju.allam
5 Replies

5. UNIX and Linux Applications

pikdev requirements confusing

I am looking at installing PiKdev which needs libqt3-mt and kdelibs4-dev. The installed package is qt-r1008952-i486-1 which claims to be a gui toolkit. find / -name "*libqt*" yields nothing with mt just a lot of support, compatible, and access widgets. Normally I would consider this a no go but... (0 Replies)
Discussion started by: slak0
0 Replies

6. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

7. Shell Programming and Scripting

Confusing me......!!!!!!

Hiii... There... I am making a Script in which I am taking the value of a variable "var" through key board. But I want, if no values are supplied for "var" for more than 5 seconds then script shuld automatically exit.Script is as follow : #cat abc #!/bin/bash echo "Enter Your Choice : "... (4 Replies)
Discussion started by: prashantshukla
4 Replies

8. Shell Programming and Scripting

Confusing Error

Hi all, Just subscribed to this forum. Not a regular user of Unix.:) I did the following: We have a directory structure /a/b/c5/ Where c5 is the only directory inside b. export ANOOP=/a/b/c*/ echo $ANOOP=/a/b/c5/ I have to create a symbolic link to anoop.txt in the directory... (2 Replies)
Discussion started by: Pankajakshan
2 Replies

9. Solaris

(Need Help) confusing format on solaris 10

Hi All, Very need help about format syntax on solaris 10. I have done install Solaris 10 OS on sun fire v245 but currently i have a problem to use "format" command to display partition info for my hard drive. i cannot enter the format menu, below is captured display : # format Searching... (7 Replies)
Discussion started by: bucci
7 Replies
Login or Register to Ask a Question