gpt4 book ai didi

linux - 监控配置 |总 CPU |语法错误 |

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:48:29 25 4
gpt4 key购买 nike

Monit 的 official documentation状态如下:

# Test CPU usage including user, system and wait. Note that 
# multi-core systems can generate 100% per core
# so total CPU usage can be more than 100%
if cpu usage > 200% for 4 cycles then alert

但是上面给出的语法错误是:

/etc/monit/conf.d/test:61: Error: syntax error 'cpu'

有相同的指示吗?

最佳答案

看来你的 monit 版本低于 5.14,因为这个功能是在这个版本中添加的:

Version 5.14.0

New: Simpler system-wide cpu usage test (total of user%, system%, wait%). Example:

if cpu usage > 99% then alert

此外,我提请您注意以下事实:从 5.16 版开始,多核系统上的总 CPU 使用率计算为 0 到 100 之间的数字,因此您的 200% 值没有理由

You can now check a process' CPU usage in a more natural way as a percentage between 0-100 on a multi-core system. For instance, to check if a single-threaded application like node.js has gotten stuck on 100% CPU,

关于linux - 监控配置 |总 CPU |语法错误 |,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38638836/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com