The meaning of “1-” in the output of ps

ps

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?

Best Answer

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.

Related Question