hrStorageUsed is reported in the units specified in hrStorageUnits.
So if hrStorageUnits.1 is 1024, then hrStorageUsed.1 is in Kb
> When I checked this result against the used memory output of sysctl {
> hw.physmem - ( ( vm.stats.vm.v_inactive_count + vm.stats.vm.v_cache_count +
> vm.stats.vm.v_free_count ) * hw.pagesize ) } , the two were not equal.
On FreeBSD with the latest (5.4.x) agent, "Physical memory" is
retrieved by running sysctl on HW_USERMEM. Most of the other
values are calculated by running sysctl on VM_METER
See 'agent/mibgroup/hardware/memory/memory_freebsd.c'
for the details.
Dave
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Net-snmp-users mailing list
Net-snm...@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Rather than try to guess what might be happening,
could you please post the results of:
a) snmpwalk hrStorageTable
b) sysctl -a
That should give us something to work with.
Hmmm...
Well, the value for hrStorageSize.1 makes sense:
pa005: hw.physmem: 1063620608 / 4096 = 259673 = hrStorageSize.1
pa037: hw.physmem: 526729216 / 4096 = 128596 = hrStorageSize.1
Unfortunately, all of the other values are calculated using
figures from 'vm.vm_meter', which isn't part of the sysctl -a output.
Can you try retrieving these vm_meter values, and see how they
compare with the other memory-related figures?
As I said earlier:
>> ...... all of the other values are calculated using
struct vmtotal total;
size_t total_size = sizeof(total);
int total_mib[] = { CTL_VM, VM_METER };
sysctl(total_mib, 2, &total, &total_size, NULL, 0);
Then you can print out the contents of the "struct vmtotal"
That's probably not a lot of use in isolation.
And comparing it to the snmpwalk output is
difficult, becuase the data will be sampled at
different times.
What you probably need to do is tweak your
test program so that it runs sysctl on *both*
VM_METER *and* the other structures that
you're interested in. You can then print out
the full contents of both structures, and compare
the values in a sensible manner.
Unfortunately I won't be around for the next
week or so, but I'll check in again after that
to see how you're getting on.