- edited description
Debian Jessie Update leading red CPU usage in health monitor
The good news is that updating a Debian server running mailpiler 1.1.1 to the new Debain Jessie stable seems to work with no detrimental issues.
The only (cosmetic) issue that I did notice is that the health monitor does show red CPU usage while in reality, CPU usage appears to be low. Both /var/piler and /var/piler/stat have permissions 755 and sysstat is installed.
Is there an obvious way to fix this?
Comments (11)
-
reporter -
repo owner check CPU_USAGE_COMMAND in config.php. It should produce the 'idle' value (should be around ~90 or so).
-
reporter Dear Janos,
Thank you very much for your prompt reply. As far as I understand, the CPU_USAGE_COMMAND uses the mpstat tool of the sysstat package. It takes the 11th value of the output sequence to report on CPU usage. I entered the command both at a server which is still Debian 7 and at the upgraded mailpiler server running Debian 8. At Debian 8, mpstat does include an additional value which is "gnice". Modifying the config.php to take the 12th value makes the health monitor work again. Hence, this is probably just an issue with the new mpstat version.
Regards,
Michael
-
repo owner Can you copy paste the output of 'LC_ALL=C mpstat' command?
-
reporter Please find the raw output (just mpstat) below:
Linux 3.16.0-4-amd64 (mailpilers10) 29.04.2015 x86_64 (2 CPU)
11:41:42 CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle 11:41:42 all 0,35 0,01 0,16 0,62 0,00 0,00 0,00 0,00 0,00 98,86
-
Why not just use the following command, no need to use mpstat and its more reliable. the awk could be done in the code, its still easier to use my string ;-P
grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}'
-
samples from centos, debian, ubuntu
[root@host-a ~]# grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}' 0.513982% [root@mx-a ~]# grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}' 0.948248% root@vps23647:~# grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}' 0.683156%
-
repo owner Yes, it can be another solution. Anyway the problem may be related to that you have 98,86 instead of 98.86
-
reporter The locale resulting in the comma is probably just because I did merely type mpstat without any specific locale settings. Changing the "11" to a "12" completely solves the issue at my server.
-
@michaelschefczyk could you please run my command.
@jsuto thinking I might push a patch to remove the mpstat dependencies.
-
repo owner - changed status to resolved
- Log in to comment