On 16/12/06, payal singla <[EMAIL PROTECTED]> wrote:
>  I have found two ways to extend snmpagent
>  1) by writing MIB and adding corresponding implementation
>      for different object ids
>  2) by execv command in conf file for different oids

[I assume you mean "exec" rather than "execv" there]


>  Which method is more efficient to use??

It depends on exactly what you mean by "efficient".
Using the "exec" or "extend" directives are by far the
easiest way to extend the range of information provided
by the agent, so this is the most efficient in terms of
development time and effort.

  But there are three main drawbacks to this approach.
Firstly, the information is returned in a strictly defined
format, so this is no use for implementing a standard or
new MIB object.

Secondly, the specified command will be run for each
incomping SNMP request.   This typically involves a
greater overhead than MIB modules implemented in C.
So from a run-time persepecitve, option 1) is more efficient.

Thirdly, the "exec/extend" mechanism can only sensibly
handle GET and GETNEXT requests.  It's not really
designed for SET requests.

It's best use for quick-n-dirty implementations.
Anything more serious, should be written in C.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to