prstat output


 
Thread Tools Search this Thread
Operating Systems Solaris prstat output
# 1  
Old 07-27-2005
prstat output

Can someone please explain me the "TIME" field of the output of "prstat -p<pid>" command ? The man page says it is "The cumulative execution time for the process". Does it mean how many hrs:min:sec the process is running ? If so then I'm not getting the desired output.
Can someone pls help me in this regard ?

Thanks
# 2  
Old 07-27-2005
Quote:
The man page says it is "The cumulative execution time for the process". Does it mean how many hrs:min:sec the process is running ?
Yes, it does mean 'running'. Running in the sense that the process is in the cpu and some processing is going on. Not 'running' in the sense the process is on the system. Think of it this way - if you logon to a server and don't touch the keyboard or run a command, your process is idle (not running in cpu) but it's still there. This is not the TIME that is showing in prstat. You could have a process that has been on the system for days but the TIME shown in prstat won't show that you have days of time. When you type a command and hit return, if there is a need for cpu time, then prstat will show what amount of TIME was in the cpu (for computations, etc). Prstat will show the user and system TIME in that output for each process.
# 3  
Old 05-13-2009
prstat_output, deciphered

If I understand your response correctly, the values shown under TIME are in CPU time. But the other part of the poster's question was whether those values represented hours:minutes:seconds or what. That is my question, as well, since there is a dearth of information about this.
# 4  
Old 05-13-2009
It is indeed hours:minutes:seconds as the source code shows:
Cross Reference: /onnv/onnv-gate/usr/src/cmd/prstat/prutil.c
# 5  
Old 05-13-2009
The output is hrs:min:sec. It does NOT indicate how long the process has been running, just the amount of CPU time it has used, that is- actual processing time. Apache can run for years but if there's no traffic then the CPU time will be low because it will not need to process much.
STIME output of `ps -ef` will tell you when it started.
# 6  
Old 05-14-2009
Have you noticed that STIME of `ps -ef ` only shows hrs:mins for the same day, then moves on to dates ? E.g

root 518 1 0 Mar 30 ? 0:01 /usr/sbin/ssserver
ora10g_1 11112 1 0 12:18:58 ? 0:03 oracledataw03l (LOCAL=NO)

SBK
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to output the prstat into table and send through email?

Hi how to send below prstat script output into table format and send through email? prstat|awk '{ if ($9 >= 5) print $0 }' (17 Replies)
Discussion started by: tharmendran
17 Replies

2. Shell Programming and Scripting

Format Top and prstat command output

need help with formatting output of command top and prstat. My requirment is to remove few columns and display remaining . But when i used awk to do that the output seems to be have gone vague, mixing the column values. After using awk to print particular column the output seems to have lost... (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies

3. Shell Programming and Scripting

How to print prstat -Z output into a file?

Hi Expert, I want to print CPU and Memory utilization into a text file. I am using "prstat -Z" to see the output on screen. When I run below command prstat -Z | grep httpd | awk '{print$3} '>> output.txt but it is not printing to file. Also I want to be below header on output PID USERNAME ... (6 Replies)
Discussion started by: lalit kumar
6 Replies

4. Shell Programming and Scripting

Output of prstat for 60 secs

Hi, I want to fire the prstat command which should run fro 60 secs and get the report into a text file using a script. I just know the command: prstat -c >> log.txt which will run until we stop it. But i want the script to run only for 60 sec,print the output to text file and stop... (3 Replies)
Discussion started by: nessj
3 Replies

5. Shell Programming and Scripting

prstat output

hi all, have a ksh script where i am doing a prstat -m -u osuser 1 1 >> $FILE_NAME but for some reason it only writes 15 lines wheres when i run the same command manually from command prompt it prints out 60 lines. why is it not writing the full 60 lines to the file ?? ta. (1 Reply)
Discussion started by: cesarNZ
1 Replies

6. Solaris

prstat

hi all, was trying to figure out how busy my app was by looking at the performance of the app server. did a 'prstat -s rss' command to find the app servers using most memory. Found a command 'prstat -m' which is meant to show more details on each pid but the output of this command... (1 Reply)
Discussion started by: cesarNZ
1 Replies

7. Shell Programming and Scripting

prstat output in GB

Hi, Is there any way by which the unit of size and rss will be only GB while I am running the prstat command? (2 Replies)
Discussion started by: King Nothing
2 Replies

8. Solaris

prstat O/P

Good Evening everyone, I am confused about prstat O/P as it shows memory values which are different from actual value.Below is the O/P of prstat command and swap commands. NPROC USERNAME SIZE RSS MEMORY TIME CPU 48 root 2113M 1590M 1.2% 45:09.39 32% 31 daemon ... (7 Replies)
Discussion started by: vvpotugunta
7 Replies

9. Shell Programming and Scripting

Redirect the output of prstat

Hi, How to redirect the output of prstat command to a file. Ex: I want to do like this while : do prstat >> prs.log sleep 5 done is it possible ???? if No, then how can i proceed?? PLEASE HELP ME OUT FROM THIS :confused: Thanks in advance ----------- (2 Replies)
Discussion started by: vastare
2 Replies

10. UNIX for Dummies Questions & Answers

Help with prstat

Hello, The last line of prstat shows load average. I am unable to figure out what actually it is. I have read the man pages and also googled, all for no use. Can somebody help me, as to what should be the avg. load of the system for best performance and how is this load of prstat calculated. (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies
Login or Register to Ask a Question