Re: how to monitor memory usage on freebsd systems - SNMP

This is a discussion on Re: how to monitor memory usage on freebsd systems - SNMP ; 2008/8/12 Chee Meng Gui : > So the hrStorageEntry.hrStorageUsed.1 is in kilobytes? 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 ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Re: how to monitor memory usage on freebsd systems

  1. Re: how to monitor memory usage on freebsd systems

    2008/8/12 Chee Meng Gui :
    > So the hrStorageEntry.hrStorageUsed.1 is in kilobytes?


    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  2. Re: how to monitor memory usage on freebsd systems

    2008/8/14 Chee Meng Gui :
    > Something is not right with net-snmp implementation for freebsd?


    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.

    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  3. Re: how to monitor memory usage on freebsd systems

    2008/8/15 Chee Meng Gui :
    > As requested, attached here are the results of snmpwalk and sysctl -a.


    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?

    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  4. Re: how to monitor memory usage on freebsd systems

    2008/8/18 Chee Meng Gui :
    > The issue is hrStorageUsed does not make sense.
    > It is much greater than the value calculated from sysctl -a.



    As I said earlier:

    >> ...... 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?


    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  5. Re: how to monitor memory usage on freebsd systems

    2008/8/18 Chee Meng Gui :
    > How do I get retrieve the vm_meter values?



    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"

    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


  6. Re: how to monitor memory usage on freebsd systems

    2008/8/19 Chee Meng Gui :
    > This is the struct vmtotal output
    >
    > vmtotal :
    > run queue 1
    > jobs in disk wait 4
    > jobs in page wait 0
    > jobs in sleeping in core 59
    > swapped out runnable/short block jobs 0
    > total virtual memory 610377642
    > active virtual memory 44897
    > total real memory 122578
    > active real memory 16055
    > shared virtual memory 9315
    > active shared virtual memory 6527
    > shared real memory 4214
    > active shared real memory 2901
    > free memory pages 8870


    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.

    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.p...r_id=100&url=/
    _______________________________________________
    Net-snmp-users mailing list
    Net-snmp-users@lists.sourceforge.net
    Please see the following page to unsubscribe or change other options:
    https://lists.sourceforge.net/lists/...net-snmp-users


+ Reply to Thread