Hi,

[EMAIL PROTECTED] wrote:
RS> On Mon,  5 Jul 2004 23:24:01 +0200 [EMAIL PROTECTED] wrote:
AD>> I implemented the config management with help of the array-user table,
AD>> which worked fine for me. The other part of the software is more
AD>> dynamic: A thread collects traffic statistics (how many octets on which
AD>> port) and stores them in an dynamic sized array in memory.

RS> How are you going to get the data to the agent? Shared memory? database? How
RS> big is the array?

At the moment, I use a global variable protected by a pthread_mutex. A
posix thread listens on all interfaces and collects the traffic
statistics. The table is not extremely large. You can have a maximum
of 2x65536 (udp and tcp, all ports) entries for every interface. But
this is the theoretical maximum - in real-life (tm), you will expect
traffic on 20 to 1000 ports.


AD>> I want these array to be accessible via snmp (read-only, of course). I'm
AD>> not sure how to implement this sort of table, as the size of the array
AD>> can change every few seconds.. I can't use the usual CONTAINER_INSERT
AD>> macros, I think. Do I have to implement a special get_next handling?

RS> What kind of schedule are you on? What are your needs as far as code stability?
RS> Can you use CVS code? A patched release?

It's a project at the university, but I have to finish in the next
two weeks. As I said, the basic agent (implemented as dlmod) is up and
running, it serves basic configuration functions of the system. Yes, I
can use CVS code, and/or a patched release, but I would favor a
standard release included/available on most platforms.


RS> It's hard to say without answers to some of the above, but what I'm thinking is
RS> adding a cache handler to an array-user table. The cache handler will take care
RS> of getting an up to date container. As long as you are talking about a really
RS> large array, that should work ok.

Is there any example code or hints about the structure and
implementaion of such a cache container? I found the examples on the
net-snmp site extremly simple - advanced or complicated topics are not
available. I already tried to use mfd, but I couldn't get it to
compile, so I didn't try to work me into it too hard..

Regards,
Arne



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to