markd89 Posted July 25, 2018 Share Posted July 25, 2018 Hi, I'd like to make a script that counts the number of log entires in the Windows Application Log, System log and Security Log for the last hour only. I'm then going to pass that to another tool which graphs. Usually the number of entries will be 0 or just a few. If there are hundreds or thousands of them, then I know I have an issue I need to look at. I found _EventLog__Count but it doesn't let me get the data for just the last hour. I know I can store the last result in a variable and compare it hour to hour. That would be OK, but then if the log is cleared or my app doesn't run for a while, it gets screwy. Better would be something discrete that just counts for the last hour and returns that number. Any suggestions? Can _EventLog__Count be modified to take a date? Any help or best, sample code, much appreciated! Mark Link to comment Share on other sites More sharing options...
Earthshine Posted July 25, 2018 Share Posted July 25, 2018 check this thread and this solution. you could have a compiled exe as a scheduled task to do this. very fast markd89 1 My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
markd89 Posted July 26, 2018 Author Share Posted July 26, 2018 Thanks much! I have it almost figured out. I posted one question in the thread you linked to. If you have a suggestion there, it'd be also much appreciated! Thanks, Mark Link to comment Share on other sites More sharing options...
Earthshine Posted July 26, 2018 Share Posted July 26, 2018 Uez is the person there for that. My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now