Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is the output of the command ps -ef | grep java on one of our machines.

jboss     1965  1935  1  2013 ?        04:41:05 java XXXXXXXXXXXXXXXXX  
jboss     2170  2141  0  2013 ?        00:42:57 java XXXXXXXXXXXXXXXXX
jboss     2708  2679  7  2013 ?        1-04:38:51 java XXXXXXXXXXXXXXXXX
tomcat    6845     1  1  2013 ?        03:28:03 XXXXXXXXXXXXXXXXX
jboss    24651 24622  0  2013 ?        03:03:27 XXXXXXXXXXXXXXXXX
tomcat   32533     1  0  2013 ?        00:12:08 XXXXXXXXXXXXXXXXX

(XXXs added to hide the guilty!)

What is the meaning of the 1- on the third line?

share|improve this question

1 Answer 1

up vote 10 down vote accepted

That means one day + 4:38 hours of cumulative CPU time that has been used by this process.

Example

It's helpful to look at the column headers to understand the values.

$ ps -ef | head -5
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0  2013 ?        00:00:01 /sbin/init
root         2     0  0  2013 ?        00:00:00 [kthreadd]
root         3     2  0  2013 ?        00:00:00 [migration/0]
root         4     2  0  2013 ?        00:00:10 [ksoftirqd/0]

This bit from the ps man page explains the time format for that column.

By default, ps selects all processes with the same effective user ID 
(euid=EUID) as the current user and associated with the same terminal as 
the invoker.  It displays the process ID (pid=PID), the terminal 
associated with the process (tname=TTY), the cumulated CPU time in 
[DD-]hh:mm:ss format (time=TIME), and the executable name (ucmd=CMD).  
Output is unsorted by default.

The bit you're asking about is this:

[DD-]hh:mm:ss format (time=TIME)

The DD- is the 1- so they're days.

share|improve this answer
    
In case of ETIME it's uptime, the f displays CPU time. So it's 1 day, 4 hours and 38 min of CPU time usage. –  basvdlei Jan 2 at 15:34
    
@basvdlei - yes I just realized my typo, fixed. –  slm Jan 2 at 15:34
    
thanks! Why is it 1- and not 1+? –  Rich Jan 2 at 15:37
    
@Rich - The dash is just a separator character, not a minus. The dash is often the preferred character for splitting up parts of time & dates. –  slm Jan 2 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.