Fix a bug with the disk statistics in the Linux PMDA. The sizes
and signedness of the sprintf format and several of the fields of
the per-device structure did not match the kernel, and did not
cater for differences between 32 and 64 bit longs.
Initially observed as disk read/write_bytes and blkread/write on
one of our product NAS servers not being updated - this turned out
to be due to using signed vs unsigned integers in a sprintf. The
fix was verified on the same machine:
~$ pminfo -f disk.dev.blkread
disk.dev.blkread
inst [3 or "sdc"] value 2147483647
~$ gdb -q
(gdb) p /x 2147483647
$1 = 0x7fffffff
~$ pminfo -f disk.dev.blkread
disk.dev.blkread
inst [3 or "sdc"] value 3247668682
$ gdb -q
(gdb) p /x 3247668682
$1 = 0xc1937dca
Fix a bug with the disk statistics in the Linux PMDA. The sizes
and signedness of the sprintf format and several of the fields of
the per-device structure did not match the kernel, and did not
cater for differences between 32 and 64 bit longs.
Initially observed as disk read/write_bytes and blkread/write on
one of our product NAS servers not being updated - this turned out
to be due to using signed vs unsigned integers in a sprintf. The
fix was verified on the same machine:
~$ pminfo -f disk.dev.blkread
disk.dev.blkread
inst [3 or "sdc"] value 2147483647
~$ gdb -q
(gdb) p /x 2147483647
$1 = 0x7fffffff
~$ pminfo -f disk.dev.blkread
disk.dev.blkread
inst [3 or "sdc"] value 3247668682
$ gdb -q
(gdb) p /x 3247668682
$1 = 0xc1937dca