AgentX semantics - SNMP

This is a discussion on AgentX semantics - SNMP ; I'm sure this is in a spec somewhere and surely knowable from the code but if someone can answer off the top of their head, it'd save me a lot of digging and I'd appreciate it. I have a multi-threaded ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: AgentX semantics

  1. AgentX semantics

    I'm sure this is in a spec somewhere and surely knowable from the code
    but if someone can answer off the top of their head, it'd save me a
    lot of digging and I'd appreciate it.

    I have a multi-threaded application which acts as an AgentX subagent
    for a couple of MIBs and I have monitoring programs that gather data
    via SNMP.

    * When I run my text-based monitor (which opens a session and
    repeately queries the MIB), all it well.

    * When I run my web-based monitor (which repeatedly runs a CGI which
    opens a sesssion, gets the data, and closes the session), my
    application hands after 20 or so requests.

    My monitors are surely talking only to snmpd so I wonder if snmpd
    opens a new session to the subagent for each incoming session/request
    or if it keeps a session open to the subagent and uses it over and
    over. If the former, that would explain how my CGI can hang my
    application. If the latter, I have to look elsewhere.

    Thanks for any pointers.


    Chris

    -------------------------------------------------------------------------
    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: AgentX semantics

    > From: Chris Nelson [mailto:chris.nelson.1022@gmail.com]
    > Sent: Tuesday, October 07, 2008 7:48 AM



    > I'm sure this is in a spec somewhere and surely knowable from the code
    > but if someone can answer off the top of their head, it'd save me a
    > lot of digging and I'd appreciate it.


    http://www.ietf.org/rfc/rfc2257.txt?number=2257

    You may need to reference it at some point.

    > I have a multi-threaded application which acts as an AgentX subagent
    > for a couple of MIBs and I have monitoring programs that gather data
    > via SNMP.
    >
    > * When I run my text-based monitor (which opens a session and
    > repeately queries the MIB), all it well.
    >
    > * When I run my web-based monitor (which repeatedly runs a CGI which
    > opens a sesssion, gets the data, and closes the session), my
    > application hands after 20 or so requests.


    Are you sure it's the subagent hanging here? Are all other MIB objects fully responsive?

    > My monitors are surely talking only to snmpd so I wonder if snmpd
    > opens a new session to the subagent for each incoming session/request
    > or if it keeps a session open to the subagent and uses it over and
    > over. If the former, that would explain how my CGI can hang my
    > application. If the latter, I have to look elsewhere.


    AgentX is single-session by design. The subagent opens the session with the master, registers the objects it will manage, then waits for and responds to requests from the master agent, serially.

    Are the two command generator applications polling at the same rate?


    HTH,

    Mike

    -------------------------------------------------------------------------
    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: AgentX semantics

    >> I'm sure this is in a spec somewhere and surely knowable from the code
    >> but if someone can answer off the top of their head, it'd save me a
    >> lot of digging and I'd appreciate it.

    >
    > http://www.ietf.org/rfc/rfc2257.txt?number=2257
    >
    > You may need to reference it at some point.


    Thanks.

    >> I have a multi-threaded application which acts as an AgentX subagent
    >> for a couple of MIBs and I have monitoring programs that gather data
    >> via SNMP.
    >>
    >> * When I run my text-based monitor (which opens a session and
    >> repeately queries the MIB), all it well.
    >>
    >> * When I run my web-based monitor (which repeatedly runs a CGI which
    >> opens a sesssion, gets the data, and closes the session), my
    >> application hands after 20 or so requests.

    >
    > Are you sure it's the subagent hanging here? Are all other MIB objects fully responsive?


    No. I didn't mean to say it was the subagent thread that's hanging.
    Actually, on different runs I see either the main thread or the
    subagent thread hang. OTOH, yes, I'm sure that the application that
    includes the subagent thread misbehaves.


    >> My monitors are surely talking only to snmpd so I wonder if snmpd
    >> opens a new session to the subagent for each incoming session/request
    >> or if it keeps a session open to the subagent and uses it over and
    >> over. If the former, that would explain how my CGI can hang my
    >> application. If the latter, I have to look elsewhere.

    >
    > AgentX is single-session by design. The subagent opens the session with the master, registers the objects it will manage, then waits for and responds to requests from the master agent, serially.


    Knowing that helps. Thanks.


    > Are the two command generator applications polling at the same rate?


    Yes. Retrieving a dozen or so OID values ever 5 seconds.


    If I run the monitor that only gets system name, uptime, etc. that are
    served by snmpd directly, my system never misbehaves. If I run the
    monitor that accesses data in the subagent, it misbehaves after 20 or
    so requests.

    -------------------------------------------------------------------------
    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: AgentX semantics

    >> From: Chris Nelson [mailto:chris.nelson.1022@gmail.com]

    >> My monitors are surely talking only to snmpd so I wonder if snmpd
    >> opens a new session to the subagent for each incoming session/request
    >> or if it keeps a session open to the subagent and uses it over and
    >> over.


    There's a persistent Net-SNMP session connection established between
    the master and subagent. This is used for all request/response
    dialog between the two.
    (Note that it's actually the subagent that establishes this session,
    not the master agent. But I doubt that is relevant to your problem).

    I'd agree with Mike - the first thing to do would be to identify whether
    this is an issue between the master and subagent, or between the
    master and your monitoring application.


    2008/10/7 Mike Ayers :
    > AgentX is single-session by design.


    That's not strictly true, Mike.
    The AgentX protocol supports the idea of multiple sessions between
    the same subagent/master pair. See RFC 2741, section 6.1:

    h.sessionID

    ..... A subagent may establish multiple AgentX sessions
    by sending multiple agentx-Open-PDUs to the master agent.


    I haven't checked the Net-SNMP code, as to how this is implemented
    (or even if it's supported at all). I strongly suspect it hasn't really
    been tested in anger.


    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