View Full Version : cpuinfo: iowait, irq, softirq, steal
Quick patch to make zabbix_agentd known about extended cpu stats
please comment :)
PS: Linux only
bbrendon
26-08-2007, 21:43
Seems like a reasonable patch to include in upstream.
Those stats are very important for performance analysis. Zabbix agents out of the box don't collect enough info to troubleshoot performance.
Yes, these values are really important. I have updated the patch for 1.4.2.
Edit: patch updated 19.9.2007
Yes, these values are really important. I have updated the patch for 1.4.2.
Not only are these numbers important, but the current state can be considered buggy (at least for Linux). For example on a system with IDE disks the iowait state can take tens of percent.
This is a fantastic patch, we run large clusters of servers (ISP) for different uses (web,mail, mysql etc etc). IOWAIT is one of the BIGGEST factors we need to know when things slow down. To date (out of the box) only munin would graph this.
Alexei: Please PLEASE add this into the next version.
It is already in our TODO list :)
Is this in 1.4.3/4 or is a new patch required? Cheers :D
Is this in 1.4.3/4 or is a new patch required? Cheers :D
The patch is not integrated yet and can be applied without modification.
bbrendon
28-04-2008, 23:19
Any update? Has this been included? Whats the holdup??
maxpower
30-04-2008, 13:21
Same question here. Obviously the agent still doesn't report cpu idle times in 1.4.5 (at least for Solaris).
maxpower
06-05-2008, 16:45
Again a "bug" in configure.
While /proc/loadavg and others might exist on one Solaris machine it could not exist on another but the behaviour is fixed in Zabbix cpu.c (ifdef HAVE_PROC_LOADAVG ...). Please determine the existence of this file dynamically and not at compile time !
It will not report any cpu data because of this.
maxpower
07-05-2008, 09:43
Again a "bug" in configure.
While /proc/loadavg and others might exist on one ...
You don't even have to look at this file ! Just call getloadavg as you did in earlier versions. The exsistence of /proc/loadavg is no precondition for this function to work !
Please remove all #ifdef HAVE_PROC_LOADAVG calls from cpu.c.
patch updated for current trunk
maxpower
16-05-2008, 13:23
Sorry, i tried your patch for zabbix_agent cpustat.[ch] and still i get "not supported" for idle,user,etc.
I didn't apply your Linux patch because i monitor Solaris.
bbrendon
16-05-2008, 18:58
Alexei & Crew-
Can you add this to your code?
adam.vollrath
11-06-2008, 17:11
patch updated for current trunk
This patch worked against 1.5.3 for me. I also recommend integrating it into the trunk for 1.5.4.
I've also opened a Zabbix support center ticket regarding this, ZBX-383 I think.
Hi,
Can you tell us if this code was integrated in 1.6 version
Thanks
porting this patch to 1.4.6 and found this which i think is a bug in the patch:
+ CALC_CPU_LOAD(irq, 1);
+ CALC_CPU_LOAD(irq, 5);
+ CALC_CPU_LOAD(irq, 15);
+
+ CALC_CPU_LOAD(softirq, 1);
+ CALC_CPU_LOAD(softirq, 5);
+ CALC_CPU_LOAD(softirq, 15);
+
+ CALC_CPU_LOAD(irq, 1);
+ CALC_CPU_LOAD(irq, 5);
+ CALC_CPU_LOAD(irq, 15);
i think the last 3 lines in the patch there should be s/irq/steal/
here's a port to 1.4.6
- no guarantees
- compiles
- i tested on one box and got sane values for user/sys/nice/idle/iowait
- not sure about how i handled sys/pstat.h since i don't have that on RHEL:
-- added CP_INTR for irq (not sure if this should be irq or softirq or both)
-- set other values to zero (not sure if that is the right idea either)
-- don't know if there are pstat.h linux versions out there that support iowait or other values because i could only find BSD versions of pstat.h on google
( all that shouldn't affect anyone that has /proc/stat instead of /usr/include/sys/pstat.h, which i think is the vast majority of linux use cases )
Not having this is in Zabbix 1.6 is a show stopper for us preventing us from upgrading.
Any update on 1.6.x status?
verwilst
19-02-2009, 22:11
Also looking for this feature...
ataylo13
20-02-2009, 21:54
This would be a nice addition to 1.6.x
It is very likely this will be supported by 1.6.3! :)
ataylo13
24-02-2009, 15:41
Very nice Alexei!
One has to keep in mind that those patches don't work with older Linux kernel IIRC. Maybe it should be added with a check for the kernel version, as it is also the case in other parts of Zabbix.
bbrendon
25-03-2009, 00:52
https://support.zabbix.com/browse/ZBX-26
Am I seeing things? I think someone hacked the zabbix ticket system. This can't be!
It was implemented. Please wait for official 1.6.3! :)
bbrendon
25-03-2009, 18:06
It was implemented. Please wait for official 1.6.3! :)Wait? Are you insane? Now I have a good reason to update agents. I still have 1.4 agents out there because (to me anyway) there hasn't been a reason to upgrade. I wonder how many system.run items I'll eliminate with these new features. I'll be honest, I have a gripe that WAY too many custom items are necessary to collect performance metrics. I use very little of what the agent does because it's too generic.
I'll be honest, I have a gripe that WAY too many custom items are necessary to collect performance metrics. I use very little of what the agent does because it's too generic.
It would be interesting to know what metrics could be also integrated into the agent. By the way, I am sure you are already aware of this, you may take advantage of the 'Include' statement in zabbix_agentd.conf to manage user parameter in a more structured way. It works under 1.6.x though. :)
Ok, I surrender. Where are these Linux items (iowait, irq, softirq, steal) located?
I just compiled and installed 1.6.3 and they are not in the Linux template...
Are they userparameters that have to be added into agentd.conf?
****
Update - nevermind. You have to manually add them into the Linux template. Those metrics are a nice addition... I am surprised they do not appear as part of the template under a fresh compile of the 1.6.3 code.
So am I right that I would add:
system.cpu.util[,iowait,avg1]
or avg5 or avg15 ?
Correct. I just added them in to the Linux template.
The "wait" parameter does not work on any of my Linux clients. Is this a backwards-compatible parameter ?