On Fri, 27 Apr 2001, Mike Noyes wrote:
> Jack Coates, 2001-04-27 07:12 -0700
> ><snip>
> > > >running, as "echo test > file" won't work if the disk is
> > > >full. So...be cautious turning Nessus loose on your own
> > > >LRP box. :)
> > >
> > > I think this is a problem. I believe the ramdisk shouldn't fill up
> > > under any circumstances. Can we change log rotate to trigger on file
> > > size in addition to periodically?
> >
> >It's got the ability in multicron, but commented out by default. I
> >haven't formally tested it, but it seemed to worked on my old low-memory
> >router. Still, a check every few minutes to start action seems like a
> >kludgy way to handle it.
>
> Jack,
> Is there an elegant solution to the problem?
>
Uhhh.... quotas?
Uhhh.... at least using a cat /proc/whatever instead of df?
Here's the code from /etc/multicron-p:
periodic () {
checkfreespace
pingcheck
}
...
updatefree () {
IFS="$SP$TAB%"
set -- $(df | sed -n 2p)
IFS=$OIFS
bfree=$4
pfree=$((100 - $5))
}
ckfree () {
[ $bfree -le ${lrp_SC_MINKB:--1} ] && return 1
[ $pfree -le ${lrp_SC_MINPER:-101} ] && return 1
return 0
}
the annoying thing is that I don't see where it's getting called from --
it's not in crontab, but I do know it's getting called because the ping
check goes off about hourly.
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/leaf-devel