[ZBX-11174] CPU graph total is not 100% since Zabbix Agent upgrade to version 3 Created: 2016 Sep 08  Updated: 2024 Apr 10  Resolved: 2017 Oct 25

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 3.0.4
Fix Version/s: None

Type: Problem report Priority: Major
Reporter: Damien Gombault Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: agent, graphs
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

CentOS 7 (server and agent)


Attachments: PNG File RdR7Oez.png     PNG File URHK0DS.png     Text File agentLog.txt    
Issue Links:
Duplicate
duplicates ZBX-10710 system.cpu.util show incorrect utiliz... Closed
Team: Team A
Sprint: Sprint 19

 Description   

Hi.

I have noticed since Agent upgrade from version 2 to 3 CPU graph total is not 100%.
Screenshot of this problem attached.
Zabbix Agent was upgraded to version 3 on 02-03-2015, you can see the difference on the graph.

Another user confirmed this problem on a forum post :
https://www.zabbix.com/forum/showthread.php?p=179581#post179581
(another screenshot attached).

The idle CPU time value repoted by agent may be wrong ?
The value reported by agent seems lower than the value reported by 'top' command.



 Comments   
Comment by Aleksandrs Saveljevs [ 2016 Sep 08 ]

Does the host in question have anything to do with virtualization? If so, could you please check whether this issue is the same as ZBX-10710?

Comment by Damien Gombault [ 2016 Sep 08 ]

The host in question are CentOS 7 KVM hypervisors.
I have read ZBX-10710, I think system.cpu.util[,guest] and system.cpu.util[,guest_nice] are missing in my templates.
I will add this items to my templates and graphs and I think the CPU graph total will be 100%.

Should these 2 items be added to the default Linux templates ?

Comment by Damien Gombault [ 2016 Sep 08 ]

I have added guest and guest_nice to my graphs.
Now total is 100% but something is wrong with idle time.

I think guest value is included in user value and guest_nice value is included in nice value.

My hypervisor 1 has : ~10% user time, ~2% system/iowait/other time, ~90% idle (from top)
Zabbix agent report : ~10% user time, ~9% guest time (little less than user), ~2% system/iowait/other, ~80% idle time.

My hypervisor 2 has : ~20% user time, ~1% system/iowait/other time, ~80% idle (from top)
Zabbix agent report : ~20% user time, ~19% guest time (little less than user), ~1% system/iowaitother time, ~60% idle time

Is the idle value badly computed ?

Comment by Damien Gombault [ 2016 Sep 08 ]

I have run mpstat and zabbix_get at the same time for 60 seconds for the same host.

mpstat 1 60 :

17:27:37     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
17:27:38     all    0,00    0,00    0,25    0,51    0,00    0,13    0,00   26,62    0,00   72,50
17:27:39     all    0,00    0,00    0,13    0,00    0,00    0,13    0,00   26,55    0,00   73,20
17:27:40     all    0,00    0,00    0,38    0,51    0,00    0,00    0,00   27,09    0,00   72,03
17:27:41     all    0,13    0,00    0,13    0,00    0,00    0,00    0,00   26,87    0,00   72,88
17:27:42     all    0,00    0,00    0,13    0,51    0,00    0,13    0,00   26,65    0,00   72,72
17:27:43     all    0,00    0,00    0,13    0,25    0,00    0,00    0,00   26,56    0,00   73,06
17:27:44     all    0,13    0,00    0,13    0,25    0,00    0,13    0,00   26,68    0,00   72,69
17:27:45     all    0,00    0,00    0,25    1,27    0,00    0,00    0,00   25,51    0,00   72,97
17:27:46     all    0,00    0,00    0,51    0,89    0,00    0,13    0,00   28,30    0,00   70,18
17:27:47     all    0,13    0,00    0,25    0,25    0,00    0,00    0,00   25,73    0,00   73,64
17:27:48     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   26,89    0,00   72,73
17:27:49     all    0,00    0,00    0,13    0,51    0,00    0,00    0,00   26,33    0,00   73,04
17:27:50     all    0,00    0,00    0,38    0,00    0,00    0,00    0,00   28,43    0,00   71,19
17:27:51     all    0,00    0,00    0,25    0,38    0,00    0,13    0,00   26,39    0,00   72,98
17:27:52     all    0,13    0,00    0,38    0,25    0,00    0,00    0,00   27,09    0,00   72,15
17:27:53     all    0,00    0,00    0,25    0,38    0,00    0,13    0,00   25,82    0,00   73,43
17:27:54     all    0,13    0,00    0,13    0,00    0,00    0,13    0,00   25,86    0,00   73,76
17:27:55     all    0,00    0,00    0,38    1,78    0,00    0,00    0,00   27,41    0,00   70,56
17:27:56     all    0,13    0,00    0,25    0,38    0,00    0,13    0,00   25,82    0,00   73,29
17:27:57     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   27,12    0,00   72,62
17:27:58     all    0,00    0,00    0,13    0,25    0,00    0,00    0,00   26,36    0,00   73,26
17:27:59     all    0,00    0,00    0,38    0,00    0,00    0,13    0,00   27,36    0,00   72,13
17:28:00     all    0,00    0,00    0,51    0,25    0,00    0,00    0,00   27,41    0,00   71,83
17:28:01     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   26,94    0,00   72,94
17:28:02     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,58    0,00   72,91
17:28:03     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   26,71    0,00   72,91
17:28:04     all    0,13    0,00    0,25    0,51    0,00    0,00    0,00   26,80    0,00   72,31
17:28:05     all    0,00    0,00    0,13    1,02    0,00    0,00    0,00   26,68    0,00   72,30
17:28:06     all    0,13    0,00    0,25    0,00    0,00    0,13    0,00   26,24    0,00   73,26
17:28:07     all    0,00    0,00    0,38    0,51    0,00    0,00    0,00   26,90    0,00   72,21
17:28:08     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,52    0,00   72,97
17:28:09     all    0,00    0,00    0,13    0,25    0,00    0,13    0,00   26,49    0,00   73,00
17:28:10     all    0,00    0,00    0,38    0,13    0,00    0,00    0,00   25,98    0,00   73,51
17:28:11     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   27,00    0,00   72,50
17:28:12     all    0,00    0,00    0,25    0,51    0,00    0,13    0,00   25,57    0,00   73,54
17:28:13     all    0,13    0,00    0,13    1,01    0,00    0,13    0,00   27,83    0,00   70,78
17:28:14     all    0,00    0,00    0,38    0,63    0,00    0,00    0,00   28,10    0,00   71,01
17:28:15     all    0,13    0,00    0,50    1,89    0,00    0,00    0,00   27,67    0,00   69,81
17:28:16     all    0,00    0,00    0,38    1,27    0,00    0,00    0,00   26,84    0,00   71,65
17:28:17     all    0,25    0,00    0,38    0,00    0,00    0,13    0,00   27,24    0,00   72,01
17:28:18     all    0,00    0,00    0,38    0,51    0,00    0,00    0,00   27,25    0,00   71,99
17:28:19     all    0,00    0,00    0,13    0,64    0,00    0,00    0,00   28,59    0,00   70,65
17:28:20     all    0,13    0,00    0,38    0,25    0,00    0,00    0,00   26,27    0,00   72,97
17:28:21     all    0,00    0,00    0,38    0,64    0,00    0,00    0,00   26,94    0,00   72,17
17:28:22     all    0,13    0,00    0,25    0,38    0,00    0,13    0,00   28,08    0,00   71,03
17:28:23     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   25,83    0,00   74,05
17:28:24     all    0,00    0,00    0,25    0,25    0,00    0,13    0,00   26,43    0,00   72,94
17:28:25     all    0,00    0,00    0,25    1,65    0,00    0,00    0,00   26,68    0,00   71,41
17:28:26     all    0,13    0,00    0,25    0,63    0,00    0,13    0,00   26,65    0,00   72,21
17:28:27     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   26,50    0,00   73,50
17:28:28     all    0,00    0,00    0,13    0,51    0,00    0,13    0,00   26,81    0,00   72,43
17:28:29     all    0,13    0,00    0,25    0,00    0,00    0,00    0,00   26,46    0,00   73,16
17:28:30     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   27,35    0,00   72,14
17:28:31     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   25,92    0,00   73,70
17:28:32     all    0,00    0,00    0,26    0,38    0,00    0,00    0,00   27,33    0,00   72,16
17:28:33     all    0,13    0,00    0,13    0,25    0,00    0,00    0,00   25,95    0,00   73,54
17:28:34     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   27,00    0,00   72,62
17:28:35     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,01    0,00   73,48
17:28:36     all    0,00    0,00    0,25    0,88    0,00    0,13    0,00   27,15    0,00   71,59
17:28:37     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,26    0,00   73,23
Moyenne :  all    0,01    0,00    0,26    0,41    0,00    0,05    0,00   26,77    0,00   72,49

mpstat says : the CPU in this hypervisor is used for ~27% guest and ~72% idle. The rest is near 0-1%.
The CPU usage is quite stable.
In mpstat, user time does not include guest time.

zabbix_get -s hostent1 -k "system.cpu.util[,idle]" :

57.046298
57.044633
57.043684
57.022771
57.020873
57.152367
57.173055
57.378060
57.483991
57.417440
57.421517
57.455146
57.444893
57.423894
57.419355
57.435564
57.409321
57.438616
57.406204
57.410031
57.395957
57.406451
57.381393
57.388087
57.360195
57.348751
57.370657
57.337310
57.355906
57.330423
57.355220
57.334489
57.342354
57.329245
57.334489
57.310896
57.307769
57.260616
57.271562
57.248718
57.218966
57.179479
57.180430
57.182813
57.172585
57.156651
57.175679
57.177105
57.155939
57.149517
57.125495
57.140478
57.115977
57.187125
57.194748
57.184990
57.195707
57.204986
57.190702
57.181175

Zabbix agent gives 57% idle.

I run the same test with guest value.
With Zabbix, I get ~21%. mpstat gives ~27%.

Why is there this difference ?
The total with mpstat is always 100%.
The total with Zabbix Agent is never 100% (~80% for my host during the mpstat test).
The total value decreases when the user value increases.

Comment by Aleksandrs Saveljevs [ 2016 Sep 12 ]

Could you please post a table similar to mpstat, but with all values for Zabbix agent?

Comment by Damien Gombault [ 2016 Sep 12 ]

Hi.

Here are the mpstat values (run from the host):

16:41:25     CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle
16:41:26     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   14,25    0,00   85,50
16:41:27     all    0,13    0,00    0,50    0,00    0,00    0,00    0,00   13,10    0,00   86,27
16:41:28     all    0,00    0,00    0,13    0,76    0,00    0,00    0,00   13,92    0,00   85,19
16:41:29     all    0,00    0,00    0,13    0,25    0,00    0,00    0,00   13,43    0,00   86,19
16:41:30     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   15,03    0,00   84,85
16:41:31     all    0,00    0,00    0,38    0,13    0,00    0,00    0,00   13,13    0,00   86,36
16:41:32     all    0,00    0,00    0,13    0,63    0,00    0,00    0,00   13,80    0,00   85,44
16:41:33     all    0,25    0,00    0,25    0,00    0,00    0,00    0,00   13,54    0,00   85,95
16:41:34     all    0,00    0,00    0,25    0,51    0,00    0,13    0,00   14,92    0,00   84,32
16:41:35     all    0,13    0,00    0,25    1,14    0,00    0,00    0,00   13,04    0,00   85,44
16:41:36     all    0,00    0,00    0,13    0,76    0,00    0,00    0,00   13,65    0,00   85,46
16:41:37     all    0,00    0,00    0,25    0,38    0,00    0,00    0,00   15,30    0,00   84,20
16:41:38     all    0,00    0,00    0,51    0,38    0,00    0,25    0,00   30,92    0,00   67,94
16:41:39     all    0,13    0,00    1,65    0,38    0,00    0,25    0,00   25,89    0,00   71,70
16:41:40     all    0,00    0,00    1,52    0,00    0,00    0,38    0,00   24,27    0,00   73,82
16:41:41     all    0,00    0,00    1,40    0,00    0,00    0,25    0,00   24,68    0,00   73,66
16:41:42     all    0,00    0,00    1,65    0,51    0,00    0,13    0,00   24,05    0,00   73,66
16:41:43     all    0,13    0,00    1,40    0,25    0,00    0,25    0,00   23,95    0,00   74,01
16:41:44     all    0,00    0,00    1,65    0,76    0,00    0,25    0,00   25,16    0,00   72,30
16:41:45     all    0,13    0,00    0,51    1,27    0,00    0,13    0,00   26,78    0,00   71,19
16:41:46     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   26,20    0,00   73,54
16:41:47     all    0,00    0,00    0,13    0,13    0,00    0,00    0,00   27,32    0,00   72,43
16:41:48     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   25,86    0,00   73,76
16:41:49     all    0,13    0,00    0,13    0,63    0,00    0,00    0,00   26,71    0,00   72,41
16:41:50     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   26,20    0,00   73,54
16:41:51     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   27,25    0,00   72,62
16:41:52     all    0,13    0,00    0,25    0,25    0,00    0,00    0,00   27,56    0,00   71,81
16:41:53     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   26,90    0,00   72,97
16:41:54     all    0,00    0,00    0,25    0,13    0,00    0,00    0,00   26,36    0,00   73,26
16:41:55     all    0,00    0,00    0,00    0,63    0,00    0,13    0,00   26,96    0,00   72,41
16:41:56     all    0,00    0,00    0,25    0,76    0,00    0,00    0,00   27,92    0,00   71,07
16:41:57     all    0,13    0,00    0,13    0,00    0,00    0,00    0,00   26,11    0,00   73,64
16:41:58     all    0,00    0,00    0,25    0,38    0,00    0,00    0,00   27,38    0,00   71,99
16:41:59     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   26,02    0,00   73,86
16:42:00     all    0,00    0,00    0,25    0,25    0,00    0,13    0,00   28,73    0,00   70,63
16:42:01     all    0,13    0,00    0,25    0,00    0,00    0,00    0,00   26,24    0,00   73,38
16:42:02     all    0,00    0,00    0,25    0,25    0,00    0,13    0,00   26,62    0,00   72,88
16:42:03     all    0,00    0,00    0,25    0,38    0,00    0,00    0,00   26,49    0,00   72,88
16:42:04     all    0,00    0,00    0,25    0,00    0,00    0,25    0,00   26,71    0,00   72,78
16:42:05     all    0,13    0,00    0,25    1,40    0,00    0,00    0,00   26,27    0,00   71,95
16:42:06     all    0,00    0,00    0,25    0,51    0,00    0,13    0,00   26,68    0,00   72,44
16:42:07     all    0,00    0,00    0,25    0,13    0,00    0,00    0,00   26,11    0,00   73,51
16:42:08     all    0,00    0,00    0,13    0,00    0,00    0,00    0,00   27,12    0,00   72,75
16:42:09     all    0,13    0,00    0,13    0,51    0,00    0,13    0,00   26,01    0,00   73,11
16:42:10     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   27,88    0,00   71,99
16:42:11     all    0,00    0,00    0,38    0,25    0,00    0,13    0,00   25,92    0,00   73,32
16:42:12     all    0,00    0,00    0,25    0,38    0,00    0,00    0,00   26,87    0,00   72,50
16:42:13     all    0,00    0,00    0,13    0,51    0,00    0,00    0,00   26,05    0,00   73,32
16:42:14     all    0,13    0,00    0,38    0,25    0,00    0,13    0,00   26,30    0,00   72,82
16:42:15     all    0,00    0,00    0,25    0,76    0,00    0,00    0,00   26,43    0,00   72,68
16:42:16     all    0,00    0,00    0,38    0,76    0,00    0,00    0,00   27,22    0,00   71,65
16:42:17     all    0,00    0,00    0,38    0,00    0,00    0,13    0,00   26,33    0,00   73,16
16:42:18     all    0,13    0,00    0,25    0,25    0,00    0,00    0,00   26,55    0,00   72,82
16:42:19     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   26,43    0,00   73,44
16:42:20     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,36    0,00   73,13
16:42:21     all    0,00    0,00    0,38    0,89    0,00    0,13    0,00   26,78    0,00   71,83
16:42:22     all    0,00    0,00    0,38    0,38    0,00    0,00    0,00   26,20    0,00   73,04
16:42:23     all    0,13    0,00    0,25    0,00    0,00    0,13    0,00   26,58    0,00   72,91
16:42:24     all    0,00    0,00    0,38    0,13    0,00    0,00    0,00   26,36    0,00   73,26
16:42:25     all    0,13    0,00    0,38    0,63    0,00    0,00    0,00   26,33    0,00   72,53
16:42:26     all    0,00    0,00    0,38    1,01    0,00    0,13    0,00   26,74    0,00   71,74
16:42:27     all    0,13    0,00    0,51    0,25    0,00    0,00    0,00   26,08    0,00   73,04
16:42:28     all    0,00    0,00    0,51    0,38    0,00    0,13    0,00   26,30    0,00   72,69
16:42:29     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   30,04    0,00   69,46
16:42:30     all    0,00    0,00    0,51    0,00    0,00    0,00    0,00   29,49    0,00   70,00
16:42:31     all    0,00    0,00    0,38    0,38    0,00    0,13    0,00   26,11    0,00   73,00
16:42:32     all    0,13    0,00    0,38    0,38    0,00    0,00    0,00   26,24    0,00   72,88
16:42:33     all    0,00    0,00    0,51    0,00    0,00    0,00    0,00   26,24    0,00   73,26
16:42:34     all    0,13    0,00    0,51    0,25    0,00    0,13    0,00   27,09    0,00   71,90
16:42:35     all    0,00    0,00    0,51    0,76    0,00    0,00    0,00   28,30    0,00   70,43
16:42:36     all    0,00    0,00    0,63    1,65    0,00    0,00    0,00   26,46    0,00   71,39
16:42:37     all    0,13    0,00    0,51    0,13    0,00    0,13    0,00   26,96    0,00   72,15
16:42:38     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,49    0,00   73,00
16:42:39     all    0,00    0,00    0,51    0,00    0,00    0,00    0,00   26,74    0,00   72,75
16:42:40     all    0,00    0,00    0,51    0,76    0,00    0,13    0,00   26,96    0,00   71,65
16:42:41     all    0,13    0,00    0,38    0,00    0,00    0,00    0,00   26,49    0,00   73,00
16:42:42     all    0,00    0,00    0,51    0,51    0,00    0,00    0,00   25,73    0,00   73,38
16:42:43     all    0,00    0,00    0,51    0,38    0,00    0,00    0,00   26,71    0,00   72,41
16:42:44     all    0,13    0,00    0,38    0,25    0,00    0,13    0,00   25,95    0,00   73,16
16:42:45     all    0,00    0,00    0,51    0,38    0,00    0,00    0,00   27,28    0,00   71,83
16:42:46     all    0,00    0,00    0,63    1,65    0,00    0,00    0,00   26,71    0,00   71,01
16:42:47     all    0,00    0,00    0,51    0,00    0,00    0,13    0,00   28,10    0,00   71,27
16:42:48     all    0,13    0,00    0,38    0,00    0,00    0,00    0,00   26,20    0,00   73,29
16:42:49     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,78    0,00   72,72
16:42:50     all    0,00    0,00    0,51    0,00    0,00    0,13    0,00   26,08    0,00   73,29
16:42:51     all    0,13    0,00    0,38    0,25    0,00    0,00    0,00   26,80    0,00   72,44
16:42:52     all    0,00    0,00    0,38    0,00    0,00    0,00    0,00   25,76    0,00   73,98
16:42:53     all    0,00    0,00    0,38    0,25    0,00    0,13    0,00   26,93    0,00   72,31
16:42:54     all    0,00    0,00    0,38    0,00    0,00    0,00    0,00   25,63    0,00   73,98
16:42:55     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,71    0,00   72,78
16:42:56     all    0,00    0,00    0,38    0,63    0,00    0,13    0,00   26,11    0,00   72,75
16:42:57     all    0,13    0,00    0,38    0,89    0,00    0,00    0,00   27,54    0,00   71,07
16:42:58     all    0,00    0,00    0,38    0,25    0,00    0,13    0,00   26,46    0,00   72,91
16:42:59     all    0,13    0,00    0,25    0,51    0,00    0,00    0,00   26,11    0,00   73,00
16:43:00     all    0,00    0,00    0,38    0,00    0,00    0,00    0,00   27,47    0,00   72,15
16:43:01     all    0,00    0,00    0,25    0,38    0,00    0,13    0,00   26,17    0,00   73,07
16:43:02     all    0,00    0,00    0,38    0,51    0,00    0,00    0,00   26,58    0,00   72,53
16:43:03     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   26,14    0,00   73,60
16:43:04     all    0,13    0,00    0,38    0,38    0,00    0,00    0,00   26,49    0,00   72,62
16:43:05     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,11    0,00   73,38
16:43:06     all    0,00    0,00    0,38    2,15    0,00    0,13    0,00   26,96    0,00   70,51
16:43:07     all    0,13    0,00    0,25    0,13    0,00    0,00    0,00   25,98    0,00   73,51
16:43:08     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   26,90    0,00   72,84
16:43:09     all    0,00    0,00    0,13    0,25    0,00    0,00    0,00   25,98    0,00   73,64
16:43:10     all    0,00    0,00    0,38    0,25    0,00    0,13    0,00   26,84    0,00   72,41
16:43:11     all    0,00    0,00    0,25    0,25    0,00    0,00    0,00   26,11    0,00   73,38
16:43:12     all    0,13    0,00    0,13    0,13    0,00    0,13    0,00   26,36    0,00   73,13
16:43:13     all    0,00    0,00    0,25    0,38    0,00    0,00    0,00   26,84    0,00   72,53
16:43:14     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   26,52    0,00   73,35
16:43:15     all    0,13    0,00    0,25    0,00    0,00    0,13    0,00   26,20    0,00   73,29
16:43:16     all    0,00    0,00    0,38    1,14    0,00    0,00    0,00   26,52    0,00   71,95
16:43:17     all    0,00    0,00    0,25    0,76    0,00    0,00    0,00   27,41    0,00   71,57
16:43:18     all    0,00    0,00    0,38    0,25    0,00    0,00    0,00   26,46    0,00   72,91
16:43:19     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   25,82    0,00   73,80
16:43:20     all    0,00    0,00    0,25    0,00    0,00    0,00    0,00   27,12    0,00   72,62
16:43:21     all    0,13    0,00    0,25    0,25    0,00    0,00    0,00   26,10    0,00   73,27
16:43:22     all    0,00    0,00    0,38    0,88    0,00    0,13    0,00   28,34    0,00   70,28
16:43:23     all    0,00    0,00    0,13    0,25    0,00    0,00    0,00   26,78    0,00   72,84
16:43:24     all    0,00    0,00    0,25    0,00    0,00    0,13    0,00   26,14    0,00   73,48
16:43:25     all    0,00    0,00    0,25    0,38    0,00    0,00    0,00   26,84    0,00   72,66

Here are Zabbix Agent values for the same host (from Zabbix server with zabbix_get) (mpstat order) :

for i in `seq 120`
do
    zabbix_get -s hostent1 -k "system.cpu.util[,user]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,nice]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,system]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,iowait]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,interrupt]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,softirq]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,steal]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,guest]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,guest_nice]" | tr -d '\n' ; echo -n ' '
    zabbix_get -s hostent1 -k "system.cpu.util[,idle]"     
    sleep 1
done

14.787547 0.000000 0.270493 0.347521 0.000000 0.048366 0.000000 14.775007 0.000000 69.771066
14.789540 0.000000 0.272255 0.342110 0.000000 0.050152 0.000000 14.777002 0.000000 69.768941
14.802278 0.000000 0.274017 0.349193 0.000000 0.050141 0.000000 14.796841 0.000000 69.711513
14.804069 0.000000 0.277599 0.352819 0.000000 0.048356 0.000000 14.789741 0.000000 69.727416
14.812228 0.000000 0.275793 0.349218 0.000000 0.048353 0.000000 14.799692 0.000000 69.714716
14.810437 0.000000 0.275793 0.349218 0.000000 0.046562 0.000000 14.799692 0.000000 69.718297
14.820386 0.000000 0.277569 0.352781 0.000000 0.046560 0.000000 14.806060 0.000000 69.696644
14.821182 0.000000 0.275793 0.342055 0.000000 0.046562 0.000000 14.808646 0.000000 69.705761
14.842799 0.000000 0.277519 0.338394 0.000000 0.048342 0.000000 14.828475 0.000000 69.664470
14.838028 0.000000 0.279355 0.354565 0.000000 0.046559 0.000000 14.823702 0.000000 69.657791
14.843134 0.000000 0.281140 0.354559 0.000000 0.046558 0.000000 14.828809 0.000000 69.645799
14.840085 0.000000 0.279360 0.349200 0.000000 0.046560 0.000000 14.827549 0.000000 69.657247
14.948223 0.000000 0.280793 0.348756 0.000000 0.046501 0.000000 14.935704 0.000000 69.440023
15.168058 0.000000 0.297938 0.356812 0.000000 0.051738 0.000000 15.152002 0.000000 68.973453
15.298142 0.000000 0.313552 0.350965 0.000000 0.053446 0.000000 15.283889 0.000000 68.700005
15.430869 0.000000 0.332669 0.345122 0.000000 0.058706 0.000000 15.414858 0.000000 68.417776
15.564437 0.000000 0.351719 0.348166 0.000000 0.060396 0.000000 15.550226 0.000000 68.125056
15.595532 0.000000 0.369377 0.339188 0.000000 0.063931 0.000000 15.579549 0.000000 68.052423
15.694518 0.000000 0.381409 0.321093 0.000000 0.065638 0.000000 15.680326 0.000000 67.857016
15.833570 0.000000 0.394998 0.338317 0.000000 0.069080 0.000000 15.817628 0.000000 67.546408
15.995757 0.000000 0.394237 0.335897 0.000000 0.068947 0.000000 15.979846 0.000000 67.225316
16.147194 0.000000 0.395341 0.337098 0.000000 0.068832 0.000000 16.131310 0.000000 66.920226
16.306971 0.000000 0.394637 0.336499 0.000000 0.070471 0.000000 16.292877 0.000000 66.598545
16.456186 0.000000 0.393992 0.332430 0.000000 0.070356 0.000000 16.440356 0.000000 66.306680
16.606676 0.000000 0.393307 0.340632 0.000000 0.070233 0.000000 16.590873 0.000000 65.998279
16.756349 0.000000 0.392617 0.340035 0.000000 0.071863 0.000000 16.740575 0.000000 65.698561
16.936048 0.000000 0.391828 0.339351 0.000000 0.069969 0.000000 16.920305 0.000000 65.342499
17.080838 0.000000 0.392924 0.337041 0.000000 0.069853 0.000000 17.065121 0.000000 65.054223
17.239877 0.000000 0.388279 0.316891 0.000000 0.069646 0.000000 17.326276 0.000000 64.558703
17.406963 0.000000 0.386241 0.328827 0.000000 0.071333 0.000000 17.391304 0.000000 64.415331
17.547029 0.000000 0.385611 0.331764 0.000000 0.071216 0.000000 17.533133 0.000000 64.131247
17.698977 0.000000 0.386683 0.329461 0.000000 0.071094 0.000000 17.683371 0.000000 63.830414
17.850404 0.000000 0.384289 0.328896 0.000000 0.069241 0.000000 17.834825 0.000000 63.532344
17.996440 0.000000 0.385366 0.328339 0.000000 0.070852 0.000000 17.982615 0.000000 63.236387
18.150608 0.000000 0.384715 0.331234 0.000000 0.070732 0.000000 18.136807 0.000000 62.925904
18.293313 0.000000 0.385848 0.322114 0.000000 0.070624 0.000000 18.277810 0.000000 62.650291
18.435581 0.000000 0.386977 0.321621 0.000000 0.070516 0.000000 18.421822 0.000000 62.363483
18.580652 0.000000 0.384629 0.326247 0.000000 0.072118 0.000000 18.565198 0.000000 62.071156
18.719997 0.000000 0.384035 0.308600 0.000000 0.073721 0.000000 18.706282 0.000000 61.807365
18.861368 0.000000 0.383424 0.326937 0.000000 0.073604 0.000000 18.847675 0.000000 61.506992
19.009620 0.000000 0.382755 0.322950 0.000000 0.073475 0.000000 18.995950 0.000000 61.215249
19.151441 0.000000 0.380436 0.324138 0.000000 0.073358 0.000000 19.137793 0.000000 60.932835
19.302488 0.000000 0.379749 0.323553 0.000000 0.073225 0.000000 19.288865 0.000000 60.632120
19.341277 0.000000 0.374468 0.318298 0.000000 0.071489 0.000000 19.327660 0.000000 60.566809
19.108008 0.000000 0.312351 0.314057 0.000000 0.058032 0.000000 19.094354 0.000000 61.113197
18.993573 0.000000 0.292288 0.321346 0.000000 0.052988 0.000000 18.979899 0.000000 61.359907
18.829111 0.000000 0.292893 0.323724 0.000000 0.053098 0.000000 18.815409 0.000000 61.685765
18.679754 0.000000 0.298574 0.324313 0.000000 0.053194 0.000000 18.667742 0.000000 61.976423
18.533927 0.000000 0.299128 0.309443 0.000000 0.053293 0.000000 18.521893 0.000000 62.282315
18.506225 0.000000 0.297517 0.306115 0.000000 0.051592 0.000000 18.494187 0.000000 62.344363
18.498899 0.000000 0.299257 0.314736 0.000000 0.053316 0.000000 18.488580 0.000000 62.345212
18.434235 0.000000 0.296077 0.315012 0.000000 0.051641 0.000000 18.422185 0.000000 62.480850
18.443293 0.000000 0.297778 0.318433 0.000000 0.051638 0.000000 18.432966 0.000000 62.455893
18.589545 0.000000 0.297282 0.314465 0.000000 0.051552 0.000000 18.579235 0.000000 62.167921
18.724266 0.000000 0.298518 0.289940 0.000000 0.053184 0.000000 18.712256 0.000000 61.921836
18.867860 0.000000 0.298022 0.277469 0.000000 0.051383 0.000000 18.857583 0.000000 61.647683
19.011062 0.000000 0.302631 0.282114 0.000000 0.052921 0.000000 19.135170 0.000000 61.080952
19.288319 0.000000 0.306759 0.259041 0.000000 0.052831 0.000000 19.276390 0.000000 60.816660
19.425538 0.000000 0.307991 0.280765 0.000000 0.051048 0.000000 19.413626 0.000000 60.521032
19.565476 0.000000 0.309161 0.283681 0.000000 0.052659 0.000000 19.553585 0.000000 60.235438
19.694040 0.000000 0.308673 0.273057 0.000000 0.052576 0.000000 19.682168 0.000000 59.989485
19.838153 0.000000 0.311505 0.277646 0.000000 0.054175 0.000000 19.826302 0.000000 59.692219
20.035129 0.000000 0.314131 0.276976 0.000000 0.054044 0.000000 20.023306 0.000000 59.296415
20.166934 0.000000 0.318692 0.279909 0.000000 0.055645 0.000000 20.153444 0.000000 59.025377
20.298638 0.000000 0.318166 0.271030 0.000000 0.055553 0.000000 20.288538 0.000000 58.768076
20.433270 0.000000 0.322684 0.275626 0.000000 0.055461 0.000000 20.421506 0.000000 58.491454
20.561783 0.000000 0.325525 0.271830 0.000000 0.055373 0.000000 20.550037 0.000000 58.235452
20.703518 0.000000 0.326633 0.256281 0.000000 0.055276 0.000000 20.691792 0.000000 57.966499
20.859316 0.000000 0.331021 0.274179 0.000000 0.055170 0.000000 20.847613 0.000000 57.632701
21.005641 0.000000 0.333767 0.273689 0.000000 0.055072 0.000000 20.992290 0.000000 57.339541
21.045784 0.000000 0.336919 0.276874 0.000000 0.056709 0.000000 21.032441 0.000000 57.251272
20.996679 0.000000 0.323770 0.268696 0.000000 0.051737 0.000000 20.983327 0.000000 57.375791
21.026556 0.000000 0.311937 0.276907 0.000000 0.048375 0.000000 21.013211 0.000000 57.323013
21.053509 0.000000 0.296810 0.276800 0.000000 0.045022 0.000000 21.040169 0.000000 57.287689
21.064915 0.000000 0.285067 0.273397 0.000000 0.043343 0.000000 21.053246 0.000000 57.280032
21.087891 0.000000 0.269973 0.278306 0.000000 0.039996 0.000000 21.076226 0.000000 57.247609
21.099633 0.000000 0.258247 0.274908 0.000000 0.036654 0.000000 21.086305 0.000000 57.244252
21.112684 0.000000 0.248189 0.258183 0.000000 0.034980 0.000000 21.102690 0.000000 57.243275
21.118292 0.000000 0.251507 0.281488 0.000000 0.034978 0.000000 21.106632 0.000000 57.207102
21.133351 0.000000 0.254779 0.279758 0.000000 0.036635 0.000000 21.120029 0.000000 57.175448
21.128098 0.000000 0.258127 0.279776 0.000000 0.034972 0.000000 21.116440 0.000000 57.182587
21.128098 0.000000 0.259792 0.283107 0.000000 0.034972 0.000000 21.116440 0.000000 57.177591
21.131076 0.000000 0.263118 0.274776 0.000000 0.034971 0.000000 21.117754 0.000000 57.178304
21.132742 0.000000 0.264784 0.278106 0.000000 0.034971 0.000000 21.121084 0.000000 57.168313
21.108039 0.000000 0.269847 0.278176 0.000000 0.034980 0.000000 21.096379 0.000000 57.212580
21.105151 0.000000 0.269874 0.278204 0.000000 0.034984 0.000000 21.086826 0.000000 57.224962
21.090952 0.000000 0.276570 0.276570 0.000000 0.036654 0.000000 21.079289 0.000000 57.239966
21.078154 0.000000 0.278287 0.273288 0.000000 0.036661 0.000000 21.066489 0.000000 57.267122
21.077190 0.000000 0.281629 0.269964 0.000000 0.036662 0.000000 21.063858 0.000000 57.270697
21.084377 0.000000 0.283258 0.279925 0.000000 0.038323 0.000000 21.072714 0.000000 57.241402
21.082711 0.000000 0.286590 0.279925 0.000000 0.038323 0.000000 21.071048 0.000000 57.241402
21.084729 0.000000 0.286595 0.286595 0.000000 0.036658 0.000000 21.071399 0.000000 57.234025
21.070524 0.000000 0.288295 0.283296 0.000000 0.038328 0.000000 21.057192 0.000000 57.262365
21.069209 0.000000 0.289966 0.284967 0.000000 0.036662 0.000000 21.057543 0.000000 57.261653
21.064911 0.000000 0.289976 0.291642 0.000000 0.036664 0.000000 21.051579 0.000000 57.265228
21.065262 0.000000 0.293314 0.286648 0.000000 0.034998 0.000000 21.053596 0.000000 57.266182
21.066578 0.000000 0.291642 0.291642 0.000000 0.033331 0.000000 21.053246 0.000000 57.263561
21.072190 0.000000 0.291628 0.276630 0.000000 0.033329 0.000000 21.058859 0.000000 57.267364
21.065964 0.000000 0.293324 0.299990 0.000000 0.033332 0.000000 21.054298 0.000000 57.253092
21.070875 0.000000 0.294966 0.298299 0.000000 0.033329 0.000000 21.057543 0.000000 57.244988
21.063333 0.000000 0.296667 0.298333 0.000000 0.031667 0.000000 21.050000 0.000000 57.260000
21.057106 0.000000 0.296696 0.298363 0.000000 0.033337 0.000000 21.043771 0.000000 57.270727
21.050877 0.000000 0.293392 0.298393 0.000000 0.033340 0.000000 21.039208 0.000000 57.284790
21.058773 0.000000 0.295030 0.295030 0.000000 0.033337 0.000000 21.047105 0.000000 57.270727
21.054474 0.000000 0.296706 0.290039 0.000000 0.033338 0.000000 21.042806 0.000000 57.282638
21.062106 0.000000 0.293363 0.293363 0.000000 0.031670 0.000000 21.047105 0.000000 57.272394
21.055176 0.000000 0.293382 0.290048 0.000000 0.033339 0.000000 21.040173 0.000000 57.287881
21.056141 0.000000 0.293372 0.281704 0.000000 0.033338 0.000000 21.042806 0.000000 57.292639
21.062457 0.000000 0.293368 0.295034 0.000000 0.031670 0.000000 21.047456 0.000000 57.270015
21.057194 0.000000 0.293387 0.295054 0.000000 0.031672 0.000000 21.043858 0.000000 57.278834
21.059475 0.000000 0.293372 0.295039 0.000000 0.033338 0.000000 21.044473 0.000000 57.274303
21.056843 0.000000 0.293382 0.295049 0.000000 0.033339 0.000000 21.041840 0.000000 57.279547
21.054825 0.000000 0.291710 0.283376 0.000000 0.031671 0.000000 21.039823 0.000000 57.298595
21.069471 0.000000 0.293280 0.294946 0.000000 0.033327 0.000000 21.056140 0.000000 57.252837
21.079991 0.000000 0.291574 0.289908 0.000000 0.031657 0.000000 21.064996 0.000000 57.241873
21.083233 0.000000 0.286552 0.291550 0.000000 0.033320 0.000000 21.069905 0.000000 57.235439
21.081919 0.000000 0.284891 0.274895 0.000000 0.033321 0.000000 21.068590 0.000000 57.256385
21.077623 0.000000 0.284900 0.293231 0.000000 0.033322 0.000000 21.062628 0.000000 57.248296
21.080343 0.000000 0.281582 0.293245 0.000000 0.033323 0.000000 21.067013 0.000000 57.244493
21.076749 0.000000 0.279935 0.293265 0.000000 0.033326 0.000000 21.063419 0.000000 57.253308

mpstat gives instantaneous (average for 1 second) values.
system.cpu.util is an average for 1 minute, but it should report quite same values as mpstat.
mpstat reports 0% user time, 26% guest time and 73% idle time (total 100%), I think this is right.
Agent reports 21% user time, 21% guest time and 53% idle time (total 100%), I think this is wrong.

If you add all the available values (idle, nice, user, system, iowait, interrupt, softirq, steal, guest, guest_nice), you should get 100% (like mpstat).
With this method, you can get a complete stacked graph and you can differentiate guest time (cpu used for virtual machines) and user time (cpu used for other processes, not virtual machines).
Currently you can't because guest is included in user (and I think guest_nice is included in nice), and idle value is wrong (maybe others too).

Comment by Aleksandrs Saveljevs [ 2016 Sep 13 ]

Looking at mpstat source code and, in particular, its write_cpu_stats() function (https://github.com/sysstat/sysstat/blob/master/mpstat.c#L203), it can be seen that it outputs CPU user time as "user - guest" and CPU nice time as "nice - guest_nice". Zabbix uses raw user and nice times, respectively.

In mpstat code, there is also the following comment ( https://github.com/sysstat/sysstat/blob/master/rd_stats.c#L100 ):

 * NB: Don't add cpu_guest/cpu_guest_nice because cpu_user/cpu_nice
 * already include them.
 */
*uptime = st_cpu->cpu_user + st_cpu->cpu_nice    +
	st_cpu->cpu_sys    + st_cpu->cpu_idle    +
	st_cpu->cpu_iowait + st_cpu->cpu_hardirq +
	st_cpu->cpu_steal  + st_cpu->cpu_softirq;

So we should investigate whether Zabbix should do the same, too.

Comment by Aleksandrs Saveljevs [ 2016 Sep 13 ]

Setting to "Confirmed", because it seems like we may have to change something.

Comment by Valdis Kauķis (Inactive) [ 2017 Oct 25 ]

This is exactly the same phenomenon as in ZBX-10710 and has the same cause: since 3.0, Zabbix has introduced two more monitored CPU states.

Comment by Valdis Kauķis (Inactive) [ 2017 Oct 25 ]

The original complaint was about "guest" time mismatch with Zabbix version 2 and other monitoring tools. That will be handled in ZBX-10710. I will create a separate sub-issue about the timing incongruity.

Generated at Wed Jul 09 14:10:45 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.