473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

How to get new Event Log Entry?

I am writing a program that gets event logs from remote machines and
stores them in local database. The process runs at night every day.
To save time, every time when the process reads event log from remote
machine the process should only insert new event logs to the
database. Since I have no rights to creating a new event trigger on
remote machine , the only way I can do that is to analyze the event
log entry from remote machines. Is there any smart solution to
verifing whether the Event Log is new or not in a short time :?:
Thx a lot.

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 15 '05 #1
2 2592
I've written an app that does the exact same thing. What I did was to get
the highest recordnumber in the eventlog by using the Windows API methods,
OpenEventLog, GetNumberOfEventLogRecords, GetOldestEventLogRecord and
CloseEventLog (use DllImport), and then start at that number and decrement
the counter down until I get to a record I already have in the database.
Arild

"dabingyoutiao" <lu********@yahoo-dot-com.no-spam.invalid> wrote in message
news:40********@127.0.0.1...
I am writing a program that gets event logs from remote machines and
stores them in local database. The process runs at night every day.
To save time, every time when the process reads event log from remote
machine the process should only insert new event logs to the
database. Since I have no rights to creating a new event trigger on
remote machine , the only way I can do that is to analyze the event
log entry from remote machines. Is there any smart solution to
verifing whether the Event Log is new or not in a short time :?:
Thx a lot.

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

=---
Nov 15 '05 #2
I just got solution. Every time the program records the largest index
of Event Log entry. Whenever it refreshes the database system, it
only inserts the Event Log entry with index larger than the
previously recorded largest index. I think this solution is pretty
much like yours.
Thank you very much

----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: wang xiaoyu | last post by:
Hello,everyone. my program runs well in windows,i use tkSimpleDialog to receive some input,but when i copy my program into Linux RH8.0,entrys in my tkSimpleDialog derived Dialog have a vital...
0
by: Gnaneshwar Babu | last post by:
Hi I am facing a problem with extracting event logs of win32 to a file. Am using the following code to extract eventlogs to file use Win32::EventLog; $handle=Win32::EventLog->new("System",...
5
by: Maxine G | last post by:
I have two forms, a menu and a data entry form. The entry form is bound to a query against linked SQL server tables. In the deactivate event, I have some code which asks the user if they want to...
11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
7
by: MattC | last post by:
I am able to successfully make entries into the Event Log for my Web App but all the entries have this before my text: The description for Event ID ( 0 ) in Source ( Conquest ) cannot be found....
3
by: Charles Law | last post by:
Under what circumstances would e.Cancel be set to True on entry to the Closing event of an MDI child form? I have found that this is why my application won't close properly. I can explicitly set...
0
by: Tuomas | last post by:
import pygtk, gtk, gobject, ... class MyEntry(gtk.Entry): def __init__(self, is_OK): gtk.Entry.__init__(self) self.is_OK=is_OK self.add_events(gtk.gdk.FOCUS_CHANGE)...
2
by: erbilkonuk | last post by:
Hi, I am very new to .NET Remoting and I try to run a simple program to subscribe to an event raised by Remoting Class. The Remoting Server initiates an instance of Remoting Class as Singleton /...
4
by: portCo | last post by:
Hello there, I am using Visual Basic 2005. I want to store a value when I press enter key on the keyboard. Could anyone help me out? Thanks alot.
6
by: kirk | last post by:
I have three events, using event handler methods as depicted below. Two of those event handler methods need to reset specific data whenever the other event left fires. I wasn't sure how to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.