6

I've got a problem with my system where phantomjs remains running after finishing its job. To debug this issue, two days ago I rebooted the system:

Screen shot showing two days of uptime

Today when I ran top, I saw this:

screen shot of "top" showing phantomjs processes with 130+ in the "time" column

If I understand right these two phantomjs process have been there for about 5 days. So they somehow survived the reboot?

techraf
  • 3,316
shenkwen
  • 449

2 Answers2

11

From man top, section "3a. Description of fields":

   29. TIME  --  CPU Time
       Total  CPU  time the task has used since it started.  When Cumulative 
       mode is On, each process is listed with the cpu time that it and its 
       dead children have used.  You toggle Cumulative mode with `S',  which  
       is  both  a  command-line option and an interactive command. 
       See the `S' interactive command for additional information regarding 
       this mode.

   30. TIME+  --  CPU Time, hundredths
       The same as TIME, but reflecting more granularity through hundredths 
       of a second.

CPU time means how long a single CPU core was busy processing this task or (if Cumulative mode is on) any of its children here.

That means the CPU time is not related to wall time at all, it can of course be shorter than how long the process is running in wall time (if it does not use a full CPU core all the time), but it can also be longer than the real process runtime (if you have a multi-core CPU and the process uses more than one of them).

Byte Commander
  • 110,243
10

The TIME+ column is not wallclock time in hours and minutes, but CPU time consumed in minutes and seconds (and hundredths of a second). Your screen shot shows two phantomjs processes which have used a bit over two hours' CPU time each.

user4556274
  • 5,097