[ZBX-5186] Some parameters for system.stat key don't work on AIX platform. Created: 2012 Jun 14  Updated: 2017 Jun 09  Resolved: 2012 Jul 24

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

Type: Incident report Priority: Major
Reporter: Alexey Pustovalov Assignee: Unassigned
Resolution: Won't fix Votes: 1
Labels: aix, items
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Aix 5.3 5300-12-05-1140 LPAR
Aix 6.1 TL 6 6100-06-06-1140
Aix 6.1 TL7 6100-07-04-1216 LPAR


Attachments: File ZBX-5168-collect.sh     File system.stat     Microsoft Word system_stat_item_key.xls    
Issue Links:
Duplicate
duplicates ZBX-3049 Agents on AIX 5.3 TL10 and earlier do... Closed

 Description   

Please see attached file for more information which params don't work.



 Comments   
Comment by dimir [ 2012 Jun 19 ]

system.stat - script to test all possible parameters

Usage: system.stat [zabbix_get options]

"-k <key>" options are generated automatically. You may want to adjust the full path to bash in the script header.

Comment by dimir [ 2012 Jun 20 ]

Results from AIX machines running exactly the same 2 versions of precompiled Zabbix agent binaries:

AIX 5.3:
zabbix_agents-2.0.0.aix5300-06.powerpc$ oslevel -s
5300-08-01-0819
zabbix_agents-2.0.0.aix5300-06.powerpc$ ~/dimir/system.stat -s 127.0.0.1 -p 31337
system.stat[ent] : ZBX_NOTSUPPORTED
system.stat[kthr,r] : 0.000000
system.stat[kthr,b] : 0.000000
system.stat[memory,avm] : 180053
system.stat[memory,fre] : 219358
system.stat[page,fi] : 0.000000
system.stat[page,fo] : 0.000000
system.stat[page,pi] : 0.000000
system.stat[page,po] : 0.000000
system.stat[page,fr] : 0.000000
system.stat[page,sr] : 0.000000
system.stat[faults,in] : 98.000000
system.stat[faults,sy] : 2179.000000
system.stat[faults,cs] : 108.000000
system.stat[cpu,us] : 0.723177
system.stat[cpu,sy] : 1.081600
system.stat[cpu,id] : 98.168777
system.stat[cpu,wa] : 0.000000
system.stat[cpu,pc] : ZBX_NOTSUPPORTED
system.stat[cpu,ec] : ZBX_NOTSUPPORTED
system.stat[lbusy] : ZBX_NOTSUPPORTED
system.stat[app] : ZBX_NOTSUPPORTED
system.stat[disk,bps] : 0
system.stat[disk,tps] : 0.000000

AIX 6.1:
zabbix_agents-2.0.0.aix6100.powerpc$ oslevel -s
6100-01-01-0823
zabbix_agents-2.0.0.aix6100.powerpc$ ~/dimir/system.stat -s 127.0.0.1 -p 31337
system.stat[ent] : ZBX_NOTSUPPORTED
system.stat[kthr,r] : 0.000000
system.stat[kthr,b] : 0.000000
system.stat[memory,avm] : 312571
system.stat[memory,fre] : 621351
system.stat[page,fi] : 0.000000
system.stat[page,fo] : 0.000000
system.stat[page,pi] : 0.000000
system.stat[page,po] : 0.000000
system.stat[page,fr] : 0.000000
system.stat[page,sr] : 0.000000
system.stat[faults,in] : 91.000000
system.stat[faults,sy] : 867.000000
system.stat[faults,cs] : 126.000000
system.stat[cpu,us] : 0.415205
system.stat[cpu,sy] : 0.706707
system.stat[cpu,id] : 98.812239
system.stat[cpu,wa] : 0.000000
system.stat[cpu,pc] : ZBX_NOTSUPPORTED
system.stat[cpu,ec] : ZBX_NOTSUPPORTED
system.stat[lbusy] : ZBX_NOTSUPPORTED
system.stat[app] : ZBX_NOTSUPPORTED
system.stat[disk,bps] : 0
system.stat[disk,tps] : 0.000000

Comment by dimir [ 2012 Jun 20 ]

Are other items working fine on that "6100-06"?
Is there any error message in the Zabbix agent log running on that machine, e. g. something about "collector"?

Comment by dimir [ 2012 Jun 28 ]

The problem is accessing perfstat data on a Aix 6.1 6100-06:

12255382:20120622:180210.861 perfstat_disk_total: [22] Invalid argument

So the perfstat_disk_total() call returns 22 (EINVAL) which means "One of the parameters is not valid".

Comment by dimir [ 2012 Jun 29 ]

Waiting for the information from reporter about accessing the machine where the problem occurred.

Comment by dimir [ 2012 Jul 12 ]

On the machine where system.stat is not working, try next simple program:

#include <stdio.h>
#include <stdlib.h>
#include <libperfstat.h>

int main(int argc, char* argv[]) {
perfstat_disk_total_t dinfo;
int rc;
rc = perfstat_disk_total(NULL, &dinfo, sizeof(perfstat_disk_total_t), 1);
if (rc != 1)

{ printf("perfstat_disk_total() failed with rc=%d\n", rc); perror("perfstat_disk_total"); exit(EXIT_FAILURE); }

perfstat_disk_total(NULL, &dinfo, sizeof(perfstat_disk_total_t), 1);
printf("Total disk statistics\n");
printf("---------------------\n");
printf("number of disks : %d\n", dinfo.number);
printf("total disk space : %llu\n", dinfo.size);
printf("total free space : %llu\n", dinfo.free);
printf("number of transfers : %llu\n", dinfo.xfers);
printf("number of blocks written : %llu\n", dinfo.wblks);
printf("number of blocks read : %llu\n", dinfo.rblks);

exit(EXIT_SUCCESS);
}

Save it to a file perfstat_disk.c and run (change "cc" to "gcc" if you want to use GNU C Compiler):

cc -Wall -o perfstat_disk -lperfstat perfstat_disk.c && ./perfstat_disk

If that gives error, run next commands and report their output:

iostat -d
iostat -d 2
lsattr -E -l sys0 -a iostat

I was thinking maybe perfstat_disk_total() fails due to disabled disk stats collection. Here is more info and also information how to enable disk collection:

http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.basetechref%2Fdoc%2Fbasetrf1%2Fperfstat_disktotal.htm

Please note that I'm not AIX system expert so I'd appreciate if someone has something to comment.

Comment by dimir [ 2012 Jul 19 ]

Please run attached script ZBX-5186-collect.sh in order to collect perfstat related info (after compiling the program mentioned in previous comment):

Save the ZBX-5186-collect.sh script to directory where perfstat_disk.c was compiled and run:

chmod +x ZBX-5186-collect.sh
./ZBX-5186-collect.sh

After that attach generated log file ZBX-5186.log .

Comment by dimir [ 2012 Jul 24 ]

OK the attached file was sent to me in private. It appeared that on one of the machines libperfstat was broken. Even the sample programs that come with libperfstat package were not working on that machine. Closing it, please feel free to reopen if you feel that the problem is still there.

Comment by Marc [ 2017 Jun 09 ]

In regards to system.stat[ent] ZBX-12270 could possibly have been the cause here as well.

Generated at Wed Apr 09 07:57:43 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.