lavahoogl.blogg.se

Monit cpu usage
Monit cpu usage













Where X is the amount of cores you want to stress.īut this is not your main issue. In my tests with a i7 Processor, stressing the CPU 1 to 95% just stresses the total System to 12.5%.ĭepending on the number of cores, you might want to use accordingly: monit -c X

monit cpu usage

Note that if your system has many cores, the fact that you stress just one of them (cpu 1) will not stress the whole system. So, monit is monitoring the process fine, but isn't seeing the right cpu usage. I killed stress manually, which is when monit says the process is not running (at the end, above). Monit sees the right process (pids match), but sees 0% usage (stress is using 1 cpu at 100% per top). 'stress' start skipped - method not defined 'stress' cpu usage check skipped (initializing) 'stress' process is running with pid 8504 Stress: info: dispatching hogs: 1 cpu, 0 io, 0 vm, 0 hdd monitrc because it was causing a error in monit ( 'stress' failed to start (exit status -1) - Program /usr/bin/stress timed out and then a zombie process). I had to remove the start statement from. The check is FIRST-MATCH based, please refine the pattern WARNING: multiple processes matched the pattern. Maybe that's relevant? List of processes matching pattern "stress.*": I also tried monit procmatch "stress.*", which shows two matches for some reason. I'd expect monit to kill stress in about 10 seconds, but stress completes successfully.

monit cpu usage monit cpu usage

monitrc -d 5Īnd I launch stress: stress -cpu 1 -timeout 60 I start monit (I checked syntax with monit -t. If cpu usage > 95% for 2 cycles then stop I'm using stress to generate load to try a simple example. I want to use monit to kill a process that uses more than X% CPU for more than N seconds.















Monit cpu usage