ps command - time field


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ps command - time field
# 1  
Old 05-12-2008
ps command - time field

Hi all,

Can someone extending on what the time field is explaining in a ps command.

Man page only has this:
time The cumulative execution time for the process.

Is this a combined CPU time? if that is the case then it should be impossible to have a 00:00 time on any process.

Any ideas?

Cheers,
Neil
# 2  
Old 05-12-2008
No. the seconds in 00:00 is a rounded value. Many processes use small amounts of CPU time, less than 1 ms. And yes it is parent + all children.

We are on a fast HPUX PA_RISC box. Most processes show 00:00 because they use a tiny amount of CPU time.
Code:
jmcnama  3002  2993  0 08:29:57 ?         0:00 sshd: jmcnama@pts/0
 jmcnama 11290  3005  1 10:13:53 pts/0     0:00 grep jmc
    root  2993  2175  0 08:29:51 ?         0:00 sshd: jmcnama [priv]
 jmcnama  3005  3002  0 08:29:57 pts/0     0:00 -ksh
 jmcnama  8732     1  0  Apr 29  ?         0:07 uzpletd a b
 jmcnama 11289  3005  2 10:13:53 pts/0     0:00 ps -ef

uzpletd is a daemon running in test mode for 14 days. All the other processes show 00:00.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command/script to match a field and print the next field of each line in a file.

Hello, I have a text file in the below format: Source Destination State Lag Status CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies

2. Shell Programming and Scripting

Time field showing Zero in ps command output

F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME COMD 401 S catmgr 5748 5742 0 154 20 e0000006d48cd080 133 e0000003fb6e7200 11:22:32 ? 0:00 /opt/ssh/libexec/sftp-server 3401 R catmgr 5742 5631 0 152 20 e0000005f974fa00 750 ... (4 Replies)
Discussion started by: TomG
4 Replies

3. UNIX for Dummies Questions & Answers

Combine table field for time

Hi, I have table like usrid Month Date year Time w23da Feb 10 2014 12:42:34 ae3aw Feb 20 2014 12:47:02 zse3q Feb 09 2014 10:02:28 all the five fields are inserted into different columns I want to combine all four (Month,Date,year and Time) and make it... (4 Replies)
Discussion started by: stew
4 Replies

4. Shell Programming and Scripting

awk help reformatting badly formatted time field

I need help reformatting an input file with spaces in the time field (4th field). I want the field to look like “hh:mm” with appropriate embedded zeros, but instead it has “h :m “ if the hour and/or minute are single character. I'm pretty new to scripting and this is beyond me. Any help would... (4 Replies)
Discussion started by: lisep
4 Replies

5. Shell Programming and Scripting

add one hour to each time field

Hello All, Is there any *easy* and efficient way to add "one hour" to few fields in a file? . I have done this using a python script and it has hit with performance issues. I have around 200mi of records, which I need to modify and send across in one hour. sample input: '2012-10-17... (2 Replies)
Discussion started by: panyam
2 Replies

6. Shell Programming and Scripting

Access log field - using awk to pull date/time

hey guys. the following line is a line taken from apache's access_log 10.10.10.10 - jdoe "GET /images/down.gif HTTP/1.1" 304 I'm concerned about the field that has the date and time in it. if assuming the delimiter in the file is a space, then the fourth field will always have the date... (5 Replies)
Discussion started by: SkySmart
5 Replies

7. Shell Programming and Scripting

Sorting on two fields time field and number field

Hi, I have a file that has data in it that says 00:01:48.233 1212 00:01:56.233 345 00:09:01.221 5678 00:12:23.321 93444 The file has more line than this but i just wanted to put in a snippet to ask how I would get the highest number with time stamp into another file. So from the above... (2 Replies)
Discussion started by: pat4519
2 Replies

8. UNIX for Dummies Questions & Answers

Differences between time command and usr/bin/time

I wondered if someone could point out the differences between the time commmand and usr/bin/time and the accuracy one might have over another. Also, is there a website or two a person could maybe link for me to describe the differences? Thank you for your time. (2 Replies)
Discussion started by: icedrake
2 Replies

9. Shell Programming and Scripting

generating reports based on time field of network data

hi i have data extracted in the following format ranging around 300000 to 800000 records in a text file , the format is of network data . No. Time Source Destination Protocol 1 1998-06-05 17:20:23.569905 HP_61:aa:c9 HP_61:aa:c9 ... (1 Reply)
Discussion started by: renukaprasadb
1 Replies

10. Shell Programming and Scripting

how to numeric sort on field time

i want to sort time field given by who command as a whole i have tried like this who|sort -n +4 -5 (1 Reply)
Discussion started by: rahulspatil_111
1 Replies
Login or Register to Ask a Question