Re: linkup linkdown monitoring impacts the performance

This is a discussion on Re: linkup linkdown monitoring impacts the performance within the SNMP Coders forums, part of the Networking and Network Related category; On Fri, 24 Feb 2006, Robert Story wrote: > > On Fri, 24 Feb 2006 10:29:31 +0100 (CET) ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-07-2006
Peder Chr. Norgaard
 
Posts: n/a
Default Re: linkup linkdown monitoring impacts the performance

On Fri, 24 Feb 2006, Robert Story wrote:

>
> On Fri, 24 Feb 2006 10:29:31 +0100 (CET) Peder wrote:
> PCN> If you work on a system with "netlink" support (a linux system, for
> PCN> instance) and don't shrink from a bit of C coding you can make a sol=

ution
> PCN> that gives the alarms immediately, and costs absolutely nothing on
> PCN> run-time. The trick is to open a netlink socket and subscribe to li=

nk
> PCN> change messages. Then generate the alarms using the net-snmp C API
> PCN> interface. There is an example in one of the tutorials, and it work=

s, I
> PCN> have tried it. 100-200 lines of code.
>
> Do you have an example of the netlink watching code?


The "quagga" package uses netlink much the way I suggest (actually I
looked more in the "quagga" code than in the documentation when I wrote my
own piece). Look in the file zebra/rt_netlink.c. The function
netlink_link_change is the place where you recognize the ifUp/ifDown
events - but of course you also need the surrounding infrastructure - the
opening and configuration of the socket, the ordering of this specific
brand of events, the adding of the FD for the socket to the central select
loop etc etc.

I did not find netlink easy to work with - the documentation is sloppy and
complex, and the design is not impressive. It took me something like two
full weeks, with a lot of cheating =3D looking in kernel source, to get the
hang of it - but when you know how to work it, it works like a charm.

And for performance it really beats using /proc for almost everything.

best regards

Peder Chr. N=F8rgaard =09Senior System Developer, M. Sc.
Ericsson Denmark A/S, Telebit Division
Skanderborgvej 232 =09tel: +45 30 91 84 31
DK-8260 Viby J, Denmark fax: +45 89 38 51 01
e-mail: Peder.Chr.Norgaard@ericsson.com
(old e-mail 2000-2003: Peder.C.Norgaard@ted.ericsson.se)
(old e-mail 1992-2000: pcn@tbit.dk)
----------------------------------------------------------------
This communication is confidential and intended solely for the
addressee(s). Any unauthorized review, use, disclosure or distribution
is prohibited. If you believe this message has been sent to you in
error, please notify the sender by replying to this transmission and
delete the message without disclosing it. Thank you.

E-mail including attachments is susceptible to data corruption,
interruption, unauthorized amendment, tampering and viruses, and we
only send and receive e-mails on the basis that we are not liable for
any such corruption, interception, amendment, tampering or viruses or
any consequences thereof.




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=...720&dat=121642
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:33 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0