Re: [evlog-dev] evlog and db2
Hien Q Nguyen <[email protected]> Wed, 5 Mar 2003 15:02:46 -0800
| Newsgroups | gmane.linux.kernel.event-logging |
|---|---|
| Message-ID | <OF1A889E99.1CE05A70-ON88256CE0.007B2359-88256CE0.007E98A3@us.ibm.com> |
Hi Mark, There is a little clearer example on how to use the notification APIs under evlog/user/cmd/evlnotifyd/test Look at the testclient.c or test.c evlactiond is also a notification client. You may want to look at the code too. it is under evlog/user/cmd/evlactiond . Regarding performance between notification vs plugin, it is depends on what do you do when you get a signal with notify scheme or a event record with the plugin. With notify scheme you will get notify when a match happens (event that you register to be notified), along with the signal you will get the recid, now if you decide that you need more info about the event you could use the recid and open the log via posix_log_read and some others api to look for that particular record.... On the other using the plugin method, you probably want to process the events very quick then write them to the database (you may want to keep the db connection open all the time, open the db connection with _evlInitPlugin). If you can process them faster than the rate of arriving events than you may want to consider the plugin method. If you can't process them fast enough, you still can buffer them when they arrive then process them latter. The TCP plugin buffers events when the connection to the remote host goes away, you may want something similar. Best regards, Hien. Hien Nguyen [email protected] (503) 578-4347 Mark Megerian/Rochester/IBM@IBMUS Sent by: To: [email protected] [email protected] cc: ceforge.net Subject: [evlog-dev] evlog and db2 03/05/2003 02:18 PM I have made good progress with getting the evlog data into a db2 table. In looking through the code in evlview for getting notified of new events, I was puzzled by something. I suspect this is a naive question, but: - The code uses posix_log_notify_add to ask to be notified about new events, but then it uses posix_log_read to process all of the events. To the uninitiated, that seems like a contradiction. Why ask to be notified, if you are essentially going to loop on reading the log for new events anyway? Is it because there is a level of indirection between the evlog event, and this posix log?? Also, I am interested in getting any opinions on the performance expectations of using this notify technique vs. the plug-in technique. Expecting to have a large volume of events over 1,024 nodes, so pathlength is important. thanks! Mark Megerian (507) 253-1682 [email protected] ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com _______________________________________________ evlog-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/evlog-developers ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com