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?
CPU color bars Low processes in htop are indicated by an excellent value of greater than 0. Green – shows processes running as regular users in the system. Red – shows kernel threads. Aqua Blue – shows virtualized processes.
Press h inside htop for quick help. CPU Blue : Low-priority threads Green : Normal priority threads Red : Kernel threads Turquoise : Virtualization threads. Memory Green : Used memory Blue : Buffers Yellow/Orange : Cache.
TIME+: How much processor time the process has used. COMMAND: The name of the command that started the process.
The first three columns represent the average system load of the last 1, 5, and 15 minute periods. The fourth column shows the number of currently running processes and the total number of processes. The last column displays the last process ID used. Let's start with the last number.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With