I want to send an email when the tape drive is empty and when the tape drive is filled. I use RHEL 5.

I don't want to check using a script every X seconds to test if the tape status is changed. There probably is another way, a trigger or something? A reoccuring check (CRON) will not alert if I change tape tape within the duration that the script is not executed.

In an HP server with HP agents installed in it, I get this sort of email alerts (directly after putting in and getting out tape). The server I am working on is a VM using a tape drive.

How can I do this?

Update: *The tape drive: HP StorageWorks Ultrium 960 SCSI External Tape Drive (Q1539B)

link|improve this question
2  
I agree every X seconds is a bit excessive, but why not every 10 minutes or so? – Ben Pilbrow Mar 18 '11 at 8:54
What make and model of tape drive? Some can notify the system of a status change, while others must be polled. – John Gardeniers Mar 18 '11 at 9:01
You might want to see if the tape drive exposes information by SNMP - that might give you what you need, depending on the tape drive of course. – Ben Pilbrow Mar 18 '11 at 9:07
As I can get state information using tar, SNMP is not needed. I search I trigger like way. Thanks. – user74952 Mar 18 '11 at 9:22
What software are you using for the backup? If its Gnu tar, look at the --new-volume-script option – symcbean Mar 18 '11 at 9:55
show 1 more comment
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.