[j-nsp] SNMP polling issue MX

Richard A Steenbergen ras at e-gerbil.net
Sun Jan 9 12:59:36 EST 2011


On Sun, Jan 09, 2011 at 04:14:04PM +0300, Tarique A. Nalkhande - BMC wrote:
> All,
> 
> Even we faced a similar problem on our MX's running 10.2R3. Further 
> findings revealed memory leak bug for mib2d process.. restarting mib2d 
> fixed it.
> Juniper is probably tracking it through some internal PR, the 
> committed release is 10.2R3 which doesn't look likely.

Hrmm supposedly the mib2d memory leak is fixed was 10.2R3, but we never 
actually tested it, we just skipped straight ahead to 10.3R2 on new 
deployments (as there were many other SNMP bugs still not fixed in 10.2 
at the time). A quick and dirty workaround for the memory leak issue is 
to periodically restart the mib2d process, which you can do with an 
event script like so:

event-options {
    generate-event {
        /* Adjust ttimer as necessary based on memory consumption */
        restart-mib2d time-interval 604800;
    }
    policy restart-mib2d {
        events restart-mib2d;
        /* Adjust this too, to something slightly less than above */
        within 600000 {
            not events restart-mib2d;
        }
        then {
            event-script restart-mib2d;
        }
    }
}

/var/db/scripts/op/restart-mib2d.slax:

version 1.0;
ns junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
import "../import/junos.xsl";
 
match / {
    <op-script-results> {
        var $restart-mib2d = {
            <command> "restart mib-process gracefully";
        }
        var $result = jcs:invoke($restart-mib2d);
    }
}

-- 
Richard A Steenbergen <ras at e-gerbil.net>       http://www.e-gerbil.net/ras
GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC)


More information about the juniper-nsp mailing list