Forse non tutti sanno che Windows (il 2003 se non altro) contiene un sistema di monitoraggio automatico degli eventi di sistema: eventtriggers
Per un help del comando digitate:
eventtriggers /?
e seguite le istruzioni.
Un banale trigger di monitoraggio del raid software di windows potrebbe essere il seguente:
eventtriggers /create /tr "RAID NOT OK" /ru "System" /L "System" /so dmboot
/tk "C:\comando.bat"
Dove comando.bat e' un file batch che sara' eseguito all'attivazione del trigger. Credo si possano usare anche file .cmd
E' poi possibile creare trigger piu' specifici utilizzando il parametro /EID che permette di specificare l'ID dell'evento. Segue una lista degli ID relativi alla gestione del RAID:
Event ID 1: "dmboot: Volume %2 (no mountpoint) started in failed redundancy mode."
Event ID 2: "dmboot: Volume %2 (%3) started in failed redundancy mode."
Event ID 3: "dmboot: Failed to start volume %2 (%3)"
Event ID 4: "dmboot: Failed to encapsulate selected disks"
Event ID 5: "dmboot: Disk group %2 failed. All volumes in the disk group are not available."
Event ID 6: "dmboot: Failed to auto-import disk group %2. All volumes in the disk group are not available."
Event ID 7: "dmboot: Failed to restore all volume mount points. All volume mount points may not be available. %2"
Event ID: 1, "dmio: Device %2,%3: Received spurious close"
Event ID: 2, "dmio: Failed to log the detach of the DRL volume %2"
Event ID: 3, "dmio: DRL volume %2 is detached"
Event ID: 4, "dmio: %2 error on %3 %4 of volume %5 offset %6 length %7"
Event ID: 5, "dmio: %2 %3 detached from volume %4"
Event ID: 6, "dmio: Overlapping mirror %2 %3 detached from volume %4"
Event ID: 7, "dmio: Kernel log full: %2 %3 detached"
Event ID: 8, "dmio: Kernel log update failed: %2 %3 detached"
Event ID: 9, "dmio: detaching RAID-5 %2"
Event ID: 10, "dmio: object %2 detached from RAID-5 %3 at column %4 offset %5"
Event ID: 11, "dmio: RAID-5 %2 entering degraded mode operation"
Event ID: 12, "dmio: Double failure condition detected on RAID-5 %2"
Event ID: 13, "dmio: Failure in RAID-5 logging operation"
Event ID: 14, "dmio: log object %2 detached from RAID-5 %3"
Event ID: 15, "dmio: check_ilocks: stranded ilock on %2 start %3 len %4"
Event ID: 16, "dmio: check_ilocks: overlapping ilocks: %2 for %3, %4 for %5"
Event ID: 17, "dmio: Illegal vminor encountered"
Event ID: 18, "dmio: %2 %3 block %4: Uncorrectable %5 error"
Event ID: 19, "dmio: %2 %3 block %4:\r\n Uncorrectable %5 error on %6 %7 block %8"
Event ID: 20, "dmio: Cannot open disk %2: kernel error %3"
Event ID: 21, "dmio: Disk %2: Unexpected status on close: %3"
Event ID: 22, "dmio: read error on object %2 of mirror %3 in volume %4 (start %5, length %6) corrected"
Event ID: 23, "dmio: Reassigning bad block number %2 on disk %3"
Event ID: 24, "dmio: Reassign bad block(s) on disk %2 succeeded"
Event ID: 25, "dmio: Fail to reassign bad block(s) on disk %2: error 0x%3"
Event ID: 26, "dmio: Found a bad block on disk %2 at block number %3"
Event ID: 27, "dmio: Corrected a read error during RAID5 initialization on %2"
Event ID: 28, "dmio: Failed to recover a read error during RAID5 initialization on %2: error %3"
Event ID: 29, "dmio: %2 read error at block %3: status 0x%4"
Event ID: 30, "dmio: %2 write error at block %3: status 0x%4"
Event ID: 31, "dmio: %2 write error at block %3 due to disk removal"
Event ID: 32, "dmio: %2 read error at block %3 due to disk removal"
Event ID: 33, "dmio: %2 is disabled by PnP"
Event ID: 34, "dmio: %2 is re-online by PnP"
Event ID: 35, "dmio: Disk %2 block %3 (mountpoint %4): Uncorrectable read error"
Event ID: 36, "dmio: %2 %3 block %4 (mountpoint %5): Uncorrectable read error"
Event ID: 37, "dmio: Disk %2 block %3 (mountpoint %4): Uncorrectable write error"
Event ID: 38, "dmio: %2 %3 block %4 (mountpoint %5): Uncorrectable write error"
mercoledì 11 febbraio 2009
Iscriviti a:
Commenti sul post (Atom)
Nessun commento:
Posta un commento