|
From: SourceForge.net <no...@so...> - 2012-08-16 23:17:41
|
Bugs item #3557159, was opened at 2012-08-13 19:52 Message generated for change (Comment added) made by blentz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3557159&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: agent Group: aix Status: Open Resolution: None Priority: 5 Private: No Submitted By: blentz (blentz) Assigned to: Niels Baggesen (nba) Summary: AIX - HOST-RESOURCES-MIB::hrStorage* empty on 5.7.2.rc1 Initial Comment: I can tell you this works fine on 5.4.4: $ /opt/local/net-snmp/sbin/snmpd --version NET-SNMP version: 5.4.4 Web: http://www.net-snmp.org/ Email: net...@li... $ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 HOST-RESOURCES-MIB::hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: / HOST-RESOURCES-MIB::hrStorageDescr.32 = STRING: /usr HOST-RESOURCES-MIB::hrStorageDescr.33 = STRING: /var HOST-RESOURCES-MIB::hrStorageDescr.34 = STRING: /tmp HOST-RESOURCES-MIB::hrStorageDescr.35 = STRING: /home HOST-RESOURCES-MIB::hrStorageDescr.36 = STRING: /admin HOST-RESOURCES-MIB::hrStorageDescr.37 = STRING: /opt HOST-RESOURCES-MIB::hrStorageDescr.38 = STRING: /var/adm/ras/livedump HOST-RESOURCES-MIB::hrStorageDescr.39 = STRING: /nimfs HOST-RESOURCES-MIB::hrStorageDescr.40 = STRING: /opt/DR HOST-RESOURCES-MIB::hrStorageDescr.41 = STRING: /rhel HOST-RESOURCES-MIB::hrStorageDescr.42 = STRING: /opt/local/apache HOST-RESOURCES-MIB::hrStorageDescr.43 = STRING: /opt/galaxy HOST-RESOURCES-MIB::hrStorageDescr.44 = STRING: /docs HOST-RESOURCES-MIB::hrStorageDescr.45 = STRING: /opt/sysadmin HOST-RESOURCES-MIB::hrStorageDescr.46 = STRING: /tftpboot HOST-RESOURCES-MIB::hrStorageDescr.47 = STRING: /opt/nDR But on 5.7.2.rc1: $ /opt/local/net-snmp/sbin/snmpd --version NET-SNMP version: 5.7.2.rc1 Web: http://www.net-snmp.org/ Email: net...@li... $ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 HOST-RESOURCES-MIB::hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space Where did all my file system stats go?? ---------------------------------------------------------------------- >Comment By: blentz (blentz) Date: 2012-08-16 16:17 Message: Woooo!!! $ sudo /opt/local/net-snmp/sbin/snmpd -Le -p /opt/local/net-snmp/var/run/snmpd.pid -Dfsys -a -f 0.0.0.0:16161 registered debug token fsys, 1 fsys: Initialise Hardware FileSystem module fsys: Reloading Hardware FileSystems on-demand (20084178) NET-SNMP version 5.7.2.rc1 Received SNMP packet(s) from UDP: [127.0.0.1]:42808->[127.0.0.1]:16161 fsys: mntctl: 8 entries in 884 bytes fsys: fs path /dev/hd4 fsys:path: Get filesystem entry (/dev/hd4) fsys:new: Create filesystem entry (index = 1) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 fsys: fs path /dev/hd2 fsys:path: Get filesystem entry (/dev/hd2) fsys:new: Create filesystem entry (index = 2) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 fsys: fs path /dev/hd9var fsys:path: Get filesystem entry (/dev/hd9var) fsys:new: Create filesystem entry (index = 3) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 fsys: fs path /dev/hd3 fsys:path: Get filesystem entry (/dev/hd3) fsys:new: Create filesystem entry (index = 4) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 fsys: fs path /dev/hd1 fsys:path: Get filesystem entry (/dev/hd1) fsys:new: Create filesystem entry (index = 5) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 fsys: fs path /proc fsys:path: Get filesystem entry (/proc) fsys:new: Create filesystem entry (index = 6) fsys:type: Classifying 6 fsys: Results of 32-bit conversion: size 4294967295 -> 2147483647; units 1024 -> 2048; avail 0 -> 0; used 4294967295 -> 2147483647 fsys: fs path /dev/hd10opt fsys:path: Get filesystem entry (/dev/hd10opt) fsys:new: Create filesystem entry (index = 7) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 fsys: fs path /dev/galaxylv fsys:path: Get filesystem entry (/dev/galaxylv) fsys:new: Create filesystem entry (index = 8) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 And: $ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 HOST-RESOURCES-MIB::hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /dev/hd4 HOST-RESOURCES-MIB::hrStorageDescr.32 = STRING: /dev/hd2 HOST-RESOURCES-MIB::hrStorageDescr.33 = STRING: /dev/hd9var HOST-RESOURCES-MIB::hrStorageDescr.34 = STRING: /dev/hd3 HOST-RESOURCES-MIB::hrStorageDescr.35 = STRING: /dev/hd1 HOST-RESOURCES-MIB::hrStorageDescr.36 = STRING: /proc HOST-RESOURCES-MIB::hrStorageDescr.37 = STRING: /dev/hd10opt HOST-RESOURCES-MIB::hrStorageDescr.38 = STRING: /dev/galaxylv WIN ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-16 16:01 Message: Client side: $ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 HOST-RESOURCES-MIB::hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /dev/hd4 HOST-RESOURCES-MIB::hrStorageDescr.32 = STRING: ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-16 16:00 Message: Server side: $ sudo /opt/local/net-snmp/sbin/snmpd -Le -p /opt/local/net-snmp/var/run/snmpd.pid -Dfsys -a -f 0.0.0.0:16161 registered debug token fsys, 1 fsys: Initialise Hardware FileSystem module fsys: Reloading Hardware FileSystems on-demand (20084178) NET-SNMP version 5.7.2.rc1 Received SNMP packet(s) from UDP: [127.0.0.1]:42199->[127.0.0.1]:16161 fsys: mntctl: 8 entries in 884 bytes fsys: fs path /dev/hd4 fsys:path: Get filesystem entry (/dev/hd4) fsys:new: Create filesystem entry (index = 1) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54842 -> 54842; used 10694 -> 10694 fsys: fs path fsys:path: Get filesystem entry () fsys:new: Create filesystem entry (index = 2) fsys:type: Classifying 0 Cannot statfs : No such file or directory fsys: fs path fsys:path: Get filesystem entry () fsys:type: Classifying 0 Cannot statfs : No such file or directory fsys: fs path fsys:path: Get filesystem entry () fsys:type: Classifying 0 Cannot statfs : No such file or directory fsys: fs path fsys:path: Get filesystem entry () fsys:type: Classifying 0 Cannot statfs : No such file or directory fsys: fs path fsys:path: Get filesystem entry () fsys:type: Classifying 0 Cannot statfs : No such file or directory fsys: fs path fsys:path: Get filesystem entry () fsys:type: Classifying 0 Cannot statfs : No such file or directory fsys: fs path fsys:path: Get filesystem entry () fsys:type: Classifying 0 Cannot statfs : No such file or directory ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-16 15:58 Message: It's blowing up on: i++, aixcurr = (struct vmount *)((char*))aixcurr + aixcurr->vmt_length ) { /bin/sh ../../libtool --mode=compile gcc -g -Wl,-blibpath:/opt/local/net-snmp/lib:/usr/lib:/lib,-brtl -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -I/opt/local/net-snmp/include -fno-strict-aliasing -I/opt/local/net-snmp/include -Uaix5 -Daix5=aix5 -c -o hardware/fsys/fsys_mntctl.lo hardware/fsys/fsys_mntctl.c libtool: compile: gcc -g -Wl,-blibpath:/opt/local/net-snmp/lib:/usr/lib:/lib,-brtl -I../../include -I. -I../../agent -I../../agent/mibgroup -I../../snmplib -I/opt/local/net-snmp/include -fno-strict-aliasing -I/opt/local/net-snmp/include -Uaix5 -Daix5=aix5 -c hardware/fsys/fsys_mntctl.c -DPIC -o hardware/fsys/.libs/fsys_mntctl.o hardware/fsys/fsys_mntctl.c: In function 'netsnmp_fsys_arch_load': hardware/fsys/fsys_mntctl.c:98: warning: passing argument 3 of 'mntctl' from incompatible pointer type hardware/fsys/fsys_mntctl.c:110: warning: passing argument 3 of 'mntctl' from incompatible pointer type hardware/fsys/fsys_mntctl.c:125: error: expected expression before ')' token make: 1254-004 The error code from the last command is 1. Stop. make: 1254-004 The error code from the last command is 2. Stop. make: 1254-004 The error code from the last command is 2. Stop. So I did: i++, aixcurr = (struct vmount *)(char*)aixcurr + aixcurr->vmt_length ) { ... instead? ---------------------------------------------------------------------- Comment By: Niels Baggesen (nba) Date: 2012-08-16 13:13 Message: I have added a new version of agent/mibgroup/hardware/fsys/fsys_mntctl.c Could you try that, running it with -Dfsys ? I would be interested in both the messages from compiling this version, and also the output from running it. ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-15 11:47 Message: I should probably mention that the SNMP query should return the following mounted file systems in addition to '/': [blentz@optaix53ts /home/blentz]$ mount node mounted mounted over vfs date options -------- --------------- --------------- ------ ------------ --------------- /dev/hd4 / jfs2 Jul 31 18:49 rw,log=/dev/hd8 /dev/hd2 /usr jfs2 Jul 31 18:49 rw,log=/dev/hd8 /dev/hd9var /var jfs2 Jul 31 18:49 rw,log=/dev/hd8 /dev/hd3 /tmp jfs2 Jul 31 18:49 rw,log=INLINE /dev/hd1 /home jfs2 Jul 31 18:50 rw,log=/dev/hd8 /proc /proc procfs Jul 31 18:50 rw /dev/hd10opt /opt jfs2 Jul 31 18:50 rw,log=INLINE /dev/galaxylv /opt/galaxy jfs2 Jul 31 18:50 rw,log=INLINE ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-15 11:45 Message: I've uploaded a zipped copy of config.log (uncompressed the file is 1.8MB, and SF has a limitation of 256KB or something). I also tried changing the ./agent/mibgroup/hardware/fsys/fsys_mntctl.c file. In the source tarball I had: (aixcurr-aixmnt) >= size; So I changed it to: (aixcurr-aixmnt) < size; and did a make clean && make install. It did seem to return the first file system device I have mounted, /dev/hd4, which in AIX land is the root file system '/' So, we're in the right neighborhood. Server: $ sudo /opt/local/net-snmp/sbin/snmpd -Le -p /opt/local/net-snmp/var/run/snmpd.pid -Dfsys -a -f 0.0.0.0:16161 registered debug token fsys, 1 fsys: Initialise Hardware FileSystem module fsys: Reloading Hardware FileSystems on-demand (20084178) NET-SNMP version 5.7.2.rc1 Received SNMP packet(s) from UDP: [127.0.0.1]:45220->[127.0.0.1]:16161 fsys:path: Get filesystem entry (/dev/hd4) fsys:new: Create filesystem entry (index = 1) fsys:type: Classifying 0 fsys: Results of 32-bit conversion: size 65536 -> 65536; units 4096 -> 4096; avail 54843 -> 54843; used 10693 -> 10693 Client: $ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 HOST-RESOURCES-MIB::hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /dev/hd4 ---------------------------------------------------------------------- Comment By: Niels Baggesen (nba) Date: 2012-08-15 04:35 Message: I am quite surprised not seeing more debug output from -Dfsys. Also, I would have expected HAVE_SYS_MNTCTL_H to have been defined? Could you attach the config.log to the bug? Anyway ... this could be the culprit: diff --git a/agent/mibgroup/hardware/fsys/fsys_mntctl.c b/agent/mibgroup/hardwar index 3ad68d4..e96beb5 100644 --- a/agent/mibgroup/hardware/fsys/fsys_mntctl.c +++ b/agent/mibgroup/hardware/fsys/fsys_mntctl.c @@ -119,7 +119,7 @@ netsnmp_fsys_arch_load( void ) */ for ( aixcurr = aixmnt; - (aixcurr-aixmnt) >= size; + (aixcurr-aixmnt) < size; aixcurr = (char*)aixcurr + aixcurr->vmt_length ) { path = vmt2dataptr( aixcurr, VMT_OBJECT ); ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-14 18:35 Message: I understand that a lot has changed starting in 5.5... maybe we can figure out how AIX used to present it's file systems to Net-SNMP in the 5.4 branch and use it to help fix 5.5 and later? ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-14 18:33 Message: Using -Dfsys: [blentz@optaix53ts /home/blentz/build]$ sudo /opt/local/net-snmp/sbin/snmpd -Le -p /opt/local/net-snmp/var/run/snmpd.pid -Dfsys -a -f 0.0.0.0:16161 registered debug token fsys, 1 fsys: Initialise Hardware FileSystem module fsys: Reloading Hardware FileSystems on-demand (20084178) NET-SNMP version 5.7.2.rc1 Received SNMP packet(s) from UDP: [127.0.0.1]:39976->[127.0.0.1]:16161 And then the query: [blentz@optaix53ts /home/blentz]$ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 HOST-RESOURCES-MIB::hrStorageDescr HOST-RESOURCES-MIB::hrStorageDescr.1 = STRING: Physical memory HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: Real memory HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: Virtual memory HOST-RESOURCES-MIB::hrStorageDescr.10 = STRING: Swap space ---------------------------------------------------------------------- Comment By: blentz (blentz) Date: 2012-08-14 18:31 Message: Based on config.log in the net-snmp-5.7.2.rc1 directory: HAVE_SYS_MNTCTL_H: Not found. HAVE_SYS_STAFS_H: Not found. HAVE_SYS_STATVFS_H: 1 HAVE_GETFSSTAT: Not found. HAVE_GETVFSSTAT: Not found. HAVE_STATVFS: Not found. I am running with: ./configure \ --prefix=$WHERE \ --enable-shared=yes \ --enable-static=no \ --with-defaults \ --without-kmem-usage ---------------------------------------------------------------------- Comment By: Niels Baggesen (nba) Date: 2012-08-14 10:45 Message: Also, pleasetry running the agent with -Dfsys ---------------------------------------------------------------------- Comment By: Niels Baggesen (nba) Date: 2012-08-14 00:02 Message: Ups, the actual defined are HAVE_SYS_MNTCTL_H, HAVE_SYS_STAFS_H, HAVE_SYS_STATVFS_H, HAVE_GETFSSTAT, HAVE_GETVFSSTAT, HAVE_STATVFS? ---------------------------------------------------------------------- Comment By: Niels Baggesen (nba) Date: 2012-08-13 23:59 Message: Very much have changed in the abstraction layers between 5.4 and 5.7 (actually 5.5) Have does configure end up viewing AIX? Which are defined of HAVE_SYS_MNTCTL, HAVE_STAFS_H, HAVE_STATVFS_H, HAVE_GETFSSTAT, HAVE_GETVFSSTAT, HAVE_STATVFS? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3557159&group_id=12694 |