19

Below is my server htop display. The nginx process uses CPU time more then 18 hours, and is shown in red color, but CPU and memory all look OK. Is the value within the normal range?

enter image description here

Dario Seidl
  • 4,140
  • 1
  • 39
  • 55
artwl
  • 3,502
  • 6
  • 38
  • 53
  • If a process has more than 1 thread, the 'TIME+' value is sum of processor time used by the threads of the process. – Mohsen Abasi Nov 21 '17 at 09:29

2 Answers2

32

I was curious about this too, so I dug into the source code and found this:

if (hours >= 100) {
   snprintf(buffer, 10, "%7lluh ", hours);
   RichString_append(str, CRT_colors[LARGE_NUMBER], buffer);
} else {
   if (hours) {
      snprintf(buffer, 10, "%2lluh", hours);
      RichString_append(str, CRT_colors[LARGE_NUMBER], buffer);
      snprintf(buffer, 10, "%02d:%02d ", minutes, seconds);
   } else {
      snprintf(buffer, 10, "%2d:%02d.%02d ", minutes, seconds, hundredths);
   }
   RichString_append(str, CRT_colors[DEFAULT_COLOR], buffer);
}

So, it looks like whenever the CPU time exceeds one hour, the hour portion is just highlighted in red (or whatever CRT_colors[LARGE_NUMBER] happens to be.)

Notice that the time format changes as the time goes:

4:33.42 is minutes/seconds/millisconds

18h26:41 is hours/minutes/seconds

101h would be hours > 100

James Scriven
  • 7,784
  • 1
  • 32
  • 36
0

Most likely just a notification method to help you identify processes that exhibit high cpu utilization within the load averages. Check the man page to be sure.

James
  • 7
  • 1