You could use something like monit, set the poll frequency to 60 seconds or so. You could either script something to act on the alert, or have monit execute a script to do the wiping.
For wiping the disk I would use badblacks (with the -w flag) and logging the output. Easier than parsing syslog for errors after using dd or something similar, also badblocks can output a file that can be used by fsck. If you wanted something closer to even driven, this discussion on stack exchange might be useful: http://serverfault.com/questions/386784/linux-trigger-a-real-time-alarm-on-a-low-disk-space-condition On Tue, Oct 22, 2013 at 1:47 AM, Terrell Larson <t...@terralogic.net> wrote: > How did you do it? > > I am thinking you put together a cron script and when something happened > you triggered what you wanted. This is what I meant by testing for the > condition. > > If you are not doing this via cron then you must have used a deamon. I > can check my book on linux kernal internals. I can even lend it if I > get the collateral of your first born child. :-) I've never looked to > do this. I would think a driver of some sort or a kernal level error > handler can likely hook to a event... but again I've never looked for > this. To do this properly one would need to hook to something and be > likely in whatever space modules run in. > > > > T. > > As part of a long running experiment, I already have a utility that > > notifies me whenever a particular drive (or partition reaches a preset > > limit). I could just reuse the code and add the needed functionality... > > > > =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= > > On 2013-10-21 11:12 PM, "Terrell Larson" <t...@terralogic.net> wrote: > > > > > You are going to have to tet it somehow. The OS knows this but to get > > > this information relayed to your own code you need to hook into the > file > > > system. > > > > > > On Mon, Oct 21, 2013 at 07:57:54PM -0600, Juan Alberto Cirez wrote: > > > > Quick question: is there a way (other than a shell script) to ensure > > > that a > > > > drive is overwritten after its full...? Or better after 98% full? > > > > > > > > Thanks > > _______________________________________________ > clug-talk mailing list > clug-talk@clug.ca > http://clug.ca/mailman/listinfo/clug-talk_clug.ca > Mailing List Guidelines (http://clug.ca/ml_guidelines.php) > **Please remove these lines when replying >
_______________________________________________ clug-talk mailing list clug-talk@clug.ca http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these lines when replying