Hi,

Wow! I'm blessed one of the gurus. Ok no problem.

>What platform are you using?

The OS platform is Redhat 9. Complete installation. If you do a partial
installation your going to hit all sorts of missing
libraries. Quite funny when you only do a regular installation....not.

> - What threading mechanism are you using?

I'm using Linux pthread. I'm not a fan of threads having seen the disasters
of misuse. But this seemed to be
an acceptable solution.

> The number of threads I use in my application. I link a library which I
know uses pthreads which performs alot of the driver
functionality to the hardware.
However the generated code produced using mib2c I wanted to keep pretty much
the same (to avoid additional headaches when changing mibs etc) so I created
global object that the table functionality directed requests to. Its within
this oject that I created threads. I have only two threads in this global
object. One to monitor link up and link downs and to invoke a trap when this
happens. Another to send a trap upon the completion
of a download or upload to and from the hardware. I dont want to block the
main thread so this was a good solution.

> Have you implemented any locking mechanism?

Standard pthread mutexs were used.

> Is your application an agent

Yes my application is an agent. Its controlled either from a perl script
which I wrote which uses Dave M.Towns Net::SNMP perl module. Its going to be
controlled by a browser which one of our guys are working.

>  Do you call init_snmp()/init_agent() in more than one thread?

never.

> - Are you using methods other than those documented in README.threads in a
> thread other than the 'main' snmp thread?

I would have to read the README documentation on threads. I am using the
pthread implementation and including the pthreadlib.


> > And about traps in particular:
> - What method do you use to send the trap? Manual building and
> sending using the single-session API, or something like send_easy_trap?

It was very easy to perform manual building. Using the notification example
you could figure out what was going on.
send_v2trap is what I am using.

Much appreciated,
Garyc


----- Original Message -----
From: "Robert Story (Users)" <[EMAIL PROTECTED]>
To: "Gary Clark" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, October 27, 2004 10:23 AM
Subject: Re: Sending traps in another thread


> On Wed, 27 Oct 2004 08:47:42 -0500 Gary wrote:
> GC> I have sent traps in using a pthread.
>
> Hi Gary,
>
> Do you mind if I ask a few questions about how your app works? We need to
> gather information to help identify what does and doesn't work. Even if
you can
> only answer briefly, like 'yes/no', that helps. If you can expound a bit,
even
> better. If you can't respond publicly, a private message to me would be
great.
>
> - What platform are you using?
> - What threading mechanism are you using?
> - How many threads use functions the snmp or agent libraries?
> - Have you implemented any locking mechanism?
> - Is your application an agent?
> - Do you call init_snmp()/init_agent() in more than one thread?
> - Are you using methods other than those documented in README.threads in a
> thread other than the 'main' snmp thread?
>
> And about traps in particular:
> - What method do you use to send the trap? Manual building and
> sending using the single-session API, or something like send_easy_trap?
>
>
> Thanks!
>
>
> --
> Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
> <irc://irc.freenode.net/#net-snmp>
> Archive:
<http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>
>
> You are lost in a twisty maze of little standards, all different.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> 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



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
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