下面是我的服务器htop显示,nginx进程使用CPU时间超过18小时,并显示红色,但CPU和内存都看起来不错,这个值是否在正常范围内?
我也很好奇,所以我挖掘了源代码,发现这个:
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); }
所以,看起来像CPU时间超过一个小时,小时部分只是突出显示为红色(或任何CRT_colors[LARGE_NUMBER]
恰好)。
请注意,时间格式会随着时间的推移而改变:
4:33.42
是分/秒/毫秒
18h26:41
分18h26:41
秒是小时/分钟/秒
101h
将是小时> 100
最有可能的只是一种通知方法,可帮助您识别在负载平均值内具有高cpu利用率的进程。 检查手册页确定。