[prev in list] [next in list] [prev in thread] [next in thread]
List: net-snmp-bugs
Subject: [ net-snmp-Bugs-3557159 ] AIX - HOST-RESOURCES-MIB::hrStorage* empty on 5.7.2.rc1
From: SourceForge.net <noreply () sourceforge ! net>
Date: 2012-08-29 19:24:05
Message-ID: E1T6nrz-00071h-31 () sfs-ml-1 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Bugs item #3557159, was opened at 2012-08-13 19:52
Message generated for change (Comment added) made by nba
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: Closed
>Resolution: Accepted
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-snmp-coders@lists.sourceforge.net
$ /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-snmp-coders@lists.sourceforge.net
$ /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: Niels Baggesen (nba)
Date: 2012-08-29 12:24
Message:
Thanks for the bug report!
We've fixed the problem in the 5.5.x, 5.6.x and 5.7.x code branches and the
main development tree, so it should be fixed in future releases of the
Net-SNMP package.
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-18 16:39
Message:
Test #2:
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]:51800->[127.0.0.1]:16161
fsys:path: Get filesystem entry (/)
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:path: Get filesystem entry (/usr)
fsys:new: Create filesystem entry (index = 2)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 786432 -> 786432; units 4096 ->
4096; avail 187763 -> 187763; used 598669 -> 598669
fsys:path: Get filesystem entry (/var)
fsys:new: Create filesystem entry (index = 3)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 1310720 -> 1310720; units 4096 ->
4096; avail 1248053 -> 1248053; used 62667 -> 62667
fsys:path: Get filesystem entry (/tmp)
fsys:new: Create filesystem entry (index = 4)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 524288 -> 524288; units 4096 ->
4096; avail 515976 -> 515976; used 8312 -> 8312
fsys:path: Get filesystem entry (/home)
fsys:new: Create filesystem entry (index = 5)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 524288 -> 524288; units 4096 ->
4096; avail 426776 -> 426776; used 97512 -> 97512
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:path: Get filesystem entry (/opt)
fsys:new: Create filesystem entry (index = 7)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 786432 -> 786432; units 4096 ->
4096; avail 334635 -> 334635; used 451797 -> 451797
fsys:path: Get filesystem entry (/opt/galaxy)
fsys:new: Create filesystem entry (index = 8)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 786432 -> 786432; units 4096 ->
4096; avail 632455 -> 632455; used 153977 -> 153977
fsys:path: Get filesystem entry (/mnt)
fsys:new: Create filesystem entry (index = 9)
fsys:type: Classifying 18
fsys: Results of 32-bit conversion: size 147193856 -> 147193856; units 4096
-> 4096; avail 8863443 -> 8863443; used 138330413 -> 138330413
Client:
$ sudo mount optaixnim01:/nimfs /mnt
$ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 | grep
hrStorageD
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: /proc
HOST-RESOURCES-MIB::hrStorageDescr.37 = STRING: /opt
HOST-RESOURCES-MIB::hrStorageDescr.38 = STRING: /opt/galaxy
HOST-RESOURCES-MIB::hrStorageDescr.39 = STRING: /mnt
HOST-RESOURCES-MIB::hrSWRunParameters.1032212 = STRING: "hrStorageD"
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-18 16:36
Message:
Test #1:
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]:51705->[127.0.0.1]:16161
fsys:path: Get filesystem entry (/)
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:path: Get filesystem entry (/usr)
fsys:new: Create filesystem entry (index = 2)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 786432 -> 786432; units 4096 ->
4096; avail 187763 -> 187763; used 598669 -> 598669
fsys:path: Get filesystem entry (/var)
fsys:new: Create filesystem entry (index = 3)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 1310720 -> 1310720; units 4096 ->
4096; avail 1248054 -> 1248054; used 62666 -> 62666
fsys:path: Get filesystem entry (/tmp)
fsys:new: Create filesystem entry (index = 4)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 524288 -> 524288; units 4096 ->
4096; avail 515976 -> 515976; used 8312 -> 8312
fsys:path: Get filesystem entry (/home)
fsys:new: Create filesystem entry (index = 5)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 524288 -> 524288; units 4096 ->
4096; avail 426776 -> 426776; used 97512 -> 97512
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:path: Get filesystem entry (/opt)
fsys:new: Create filesystem entry (index = 7)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 786432 -> 786432; units 4096 ->
4096; avail 334635 -> 334635; used 451797 -> 451797
fsys:path: Get filesystem entry (/opt/galaxy)
fsys:new: Create filesystem entry (index = 8)
fsys:type: Classifying 0
fsys: Results of 32-bit conversion: size 786432 -> 786432; units 4096 ->
4096; avail 632455 -> 632455; used 153977 -> 153977
Client:
$ /opt/local/net-snmp/bin/snmpwalk -v 2c -c aix2011 localhost:16161 | grep
hrStorageD
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: /proc
HOST-RESOURCES-MIB::hrStorageDescr.37 = STRING: /opt
HOST-RESOURCES-MIB::hrStorageDescr.38 = STRING: /opt/galaxy
HOST-RESOURCES-MIB::hrSWRunParameters.1032204 = STRING: "hrStorageD"
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-18 16:34
Message:
This works good:
--- ./agent/mibgroup/hardware/fsys/fsys_mntctl.c 2012-08-18
19:15:06.000000000 -0400
+++ ./agent/mibgroup/hardware/fsys/fsys_mntctl.c 2012-08-18
19:20:29.000000000 -0400
@@ -81,7 +81,7 @@
void
netsnmp_fsys_arch_load( void )
{
- int ret = 0;
+ int ret = 0, i = 0;
uint size = 0;
struct vmount *aixmnt, *aixcurr;
@@ -118,18 +118,18 @@
* ... and insert this into the filesystem container.
*/
- for ( aixcurr = aixmnt;
- (aixcurr-aixmnt) >= size;
- aixcurr = (char*)aixcurr + aixcurr->vmt_length ) {
+ for (i = 0;
+ i < ret;
+ i++, aixcurr = (struct vmount *) ((char*)aixcurr +
aixcurr->vmt_length) ) {
- path = vmt2dataptr( aixcurr, VMT_OBJECT );
+ path = vmt2dataptr( aixcurr, VMT_STUB );
entry = netsnmp_fsys_by_path( path, NETSNMP_FS_FIND_CREATE );
if (!entry) {
continue;
}
strlcpy(entry->path, path, sizeof(entry->path));
- strlcpy(entry->device, vmt2dataptr(aixcurr, VMT_STUB),
+ strlcpy(entry->device, vmt2dataptr(aixcurr, VMT_OBJECT),
sizeof(entry->device));
entry->type = _fsys_type( aixcurr->vmt_gfstype );
Attached.
----------------------------------------------------------------------
Comment By: Niels Baggesen (nba)
Date: 2012-08-16 23:01
Message:
Good news! And sorry about that misplaced parenthesis :-(
Yes, the loop test is the problem, we need to count the entries as we go,
so I think it must be
for ( i = 0, aixcurr = aixmnt;
i < ret;
i++, aixcurr = (struct vmount *) ((char*)aixcurr +aixcurr->vmt_length)
) {
Enjoy your vacation!
I will try to hold back the 5.7.2 release until we have this fixed.
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-16 17:53
Message:
I must be doing something wrong with that loop test. NFS or not, I get an
infinite loop if I have an odd-number of file systems mounted. I must be
missing something obvious.
I will be on vacation next week, so it might be a bit before I can test
more.
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-16 17:25
Message:
Swapping VMT_OBJECT and VMT_STUB fixes the discrepancy between the device
and the mount point, however, there's a problem with the loop not exiting
if I have an NFS file system mounted... so there's something still not
right with the patch.
But I'm guessing it's close.
--- ./agent/mibgroup/hardware/fsys/fsys_mntctl.c.orig 2012-08-16
20:16:13.000000000 -0400
+++ ./agent/mibgroup/hardware/fsys/fsys_mntctl.c 2012-08-16
20:17:18.000000000 -0400
@@ -119,17 +119,17 @@
*/
for ( aixcurr = aixmnt;
- (aixcurr-aixmnt) >= size;
- aixcurr = (char*)aixcurr + aixcurr->vmt_length ) {
+ (aixcurr->vmt_length) < size;
+ aixcurr = (struct vmount *) ((char*)aixcurr +
aixcurr->vmt_length) ) {
- path = vmt2dataptr( aixcurr, VMT_OBJECT );
+ path = vmt2dataptr( aixcurr, VMT_STUB );
entry = netsnmp_fsys_by_path( path, NETSNMP_FS_FIND_CREATE );
if (!entry) {
continue;
}
strlcpy(entry->path, path, sizeof(entry->path));
- strlcpy(entry->device, vmt2dataptr(aixcurr, VMT_STUB),
+ strlcpy(entry->device, vmt2dataptr(aixcurr, VMT_OBJECT),
sizeof(entry->device));
entry->type = _fsys_type( aixcurr->vmt_gfstype );
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-16 17:05
Message:
It looks like the "path" and "device" entries are backwards...
strlcpy(entry->path, path, sizeof(entry->path));
printf("bl debug path: %s\n", entry->path);
strlcpy(entry->device, vmt2dataptr(aixcurr, VMT_STUB),
sizeof(entry->device));
printf("bl debug device: %s\n", entry->device);
bl debug path: /dev/hd4
bl debug device: /
bl debug path: /dev/hd2
bl debug device: /usr
bl debug path: /dev/hd9var
bl debug device: /var
bl debug path: /dev/hd3
bl debug device: /tmp
bl debug path: /dev/hd1
bl debug device: /home
bl debug path: /proc
bl debug device: /proc
bl debug path: /dev/hd10opt
bl debug device: /opt
bl debug path: /dev/galaxylv
bl debug device: /opt/galaxy
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-16 16:43
Message:
What do you think about this?
$ /opt/local/diffutils/bin/diff -u
./agent/mibgroup/hardware/fsys/fsys_mntctl.c.orig
./agent/mibgroup/hardware/fsys/fsys_mntctl.c
--- ./agent/mibgroup/hardware/fsys/fsys_mntctl.c.orig 2012-08-16
19:26:45.000000000 -0400
+++ ./agent/mibgroup/hardware/fsys/fsys_mntctl.c 2012-08-16
19:42:16.000000000 -0400
@@ -119,8 +119,8 @@
*/
for ( aixcurr = aixmnt;
- (aixcurr-aixmnt) >= size;
- aixcurr = (char*)aixcurr + aixcurr->vmt_length ) {
+ (aixcurr->vmt_length) < size;
+ aixcurr = (struct vmount *) ((char*)aixcurr +
aixcurr->vmt_length) ) {
path = vmt2dataptr( aixcurr, VMT_OBJECT );
entry = netsnmp_fsys_by_path( path, NETSNMP_FS_FIND_CREATE );
----------------------------------------------------------------------
Comment By: blentz (blentz)
Date: 2012-08-16 16:18
Message:
I modified your line as follows:
i++, aixcurr = (struct vmount *) ((char*)aixcurr + aixcurr->vmt_length) ) {
----------------------------------------------------------------------
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
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-bugs mailing list
Net-snmp-bugs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic