redxix Posted December 27, 2008 Share Posted December 27, 2008 Hi all, I took computer programming in high school so i have a basic understanding of language code, but far from understanding most scripts these days. I have set up a couple RAID arrays and would like the server to do an auto-shutdown in case of a RAID drive failure. I talked to Adaptec and they mentioned it is possible if you have a script that runs through the event log. Anyone have any experience with this? Link to comment Share on other sites More sharing options...
Zedna Posted December 27, 2008 Share Posted December 27, 2008 Search forum for :+event +logand turn-on option "search titles only"http://www.autoitscript.com/forum/index.ph...%2Bevent+%2Blog Also look at _EventLog_xxx functionsin#Include <EventLog.au3> Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
redxix Posted December 27, 2008 Author Share Posted December 27, 2008 Thanks Zedna. I have lots of reading to do~ Link to comment Share on other sites More sharing options...
Confuzzled Posted December 28, 2008 Share Posted December 28, 2008 (edited) Reading the event log is after the event, unless you want some watchdog program sitting in the background continually reading the event log (and consuming valuable resources).Isn't RAID supposed to reduce the risk of data loss? If the one you are using is not, consider a robust backup operation or try a different flavor of RAID.Back to event log: Use WMI to search for the appropriate error codes. When one is found, don't forget to remove it from your list of events to scan before shutting down, otherwise your program will continue to trigger. Hint: Use a sleep command inside your loop to stop your script consuming all the CPU resources.Are you going to pull the rug out from under your users when an error is detected? What method will you use to alert that the reason for the server shutdown is because of possible data loss?Edit: Saw Zedna's post. The help file for "_EventLog__Notify" seems quite promising as an alternative to using WMI. Of course you may not need the GUI portion of the sample code in your final version if you want this to run in the background. Edited December 28, 2008 by Confuzzled 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