[Orca-users] Stopping 'file did exist and is now gone' message(s).

Blair Zajac blair at orcaware.com
Sat Nov 23 13:42:01 PST 2002


Blair Zajac wrote:
> 
> "isaac r." wrote:
> >
> > Dear Blair,
> >
> > Thanks for the direct pointer to a file where to
> > change this.
> >
> > I've modified the 'if' one-liner condition.
> >
> > Here's the synopsis and the 'if' line to change.
> >
> > # ---------------------------------------
> > # iz - making a modification to minimize warning
> > emails
> > # by checking if the hour on the clock is midnight,
> > # which means the day has changed within the last
> > hour.
> > # If it did, then do not send the warning email and
> > ignore the
> > # fact that the file is gone (i.e. possibly
> > compressed). Otherwise, send
> > # an email.
> > # ---------------------------------------
> >
> > Basically, assuming 'date' lives in '/bin' on
> > your system, change:
> >
> >    if ($file_status == -1) {
> >
> > to:
> >
> >    if ($file_status == -1) && (`/bin/date
> > '+%H'`!='00')  {
> >
> > This should do it.  It will also prevent OTHER types
> > of alarms from being generated, reasons for which
> > might be
> > different then due to simply compressing the file.
> > But this puts a 60 minute cap on a window within which
> > some warning emails will not be generated.
> >
> > Thoughts ?
> 
> Thanks for the patch.  I don't like to call out to external
> programs in Orca, given that Perl already has access to all
> the necessary information without forking a new process.
> 
> How about using the localtime call and rewriting the patch?

Actually, thinking about it more, what I'd like Orca to do is
to check if there are compressed versions of the filename (i.e.
check if filename.{Z,gz,bz2} exists and if it was created in the
last X minutes.  Otherwise, complain.  This way, if there is a
real error around midnight, then it won't be ignored.  In fact,
most errors could occur at midnight if something goes wrong with
the compression of the file.

Best,
Blair

-- 
Blair Zajac <blair at orcaware.com>
Web and OS performance plots - http://www.orcaware.com/orca/



More information about the Orca-users mailing list