Hi Nick,
Nick Holland wrote on Sun, Oct 27, 2019 at 02:27:46PM -0400:
> In version 1.78 of /etc/daily, the -i flag was added to the df output.
> Apparently, some people run out of inodes.
>
> I only seem to run out of disk space, and too often, my eye skims
> the daily report from a machine, looks at the last column,sees a
> small percentage, and I decide, "all is good", even if I were
> look a couple columns in, the actual disk space is low.
>
> To try to avoid bikeshedding and flopping this back and forth,
> I offer this diff. With no change, daily df output is unchanged.
> Those of us that don't worry about running out of inodes, we can
> set DF_FLAGS in /etc/daily.local to be whatever we want, in my
> case, I like "-hl" (currently, it's "-ikl")
I don't object to the idea, but before commit, you would also have
to document it in the daily(8) manual page.
That said, i'm not enthusiastic either. I think sending mail every
day even if all is obviously fine is not really useful in the first
place; it is annoying even if you only have a handful of machines,
and it doesn't scale at all for people supervising many machines.
So i tend to think that VERBOSESTATUS=0 is the only setting that
really matters in practice (by the way, why isn't it the default?)
and in that case, your diff changes nothing.
A real improvement that i would like to see if it can be done without
excessive complication would be to print df(1) output if and only
if it looks suspicious, instead of wrapping it in a dubious
VERBOSESTATUS conditional.
Yours,
Ingo
P.S.
Do not send attachments, inline is just fine.
> Index: daily
> ===================================================================
> RCS file: /cvs/src/etc/daily,v
> retrieving revision 1.93
> diff -u -r1.93 daily
> --- daily 9 Sep 2019 20:02:26 -0000 1.93
> +++ daily 27 Oct 2019 18:03:18 -0000
> @@ -44,6 +44,10 @@
> start_part "Running daily.local:"
> run_script "daily.local"
>
> +if [ -z "$DF_FLAGS" ]; then
> + DF_FLAGS="-ikl"
> +fi
> +
> next_part "Removing scratch and junk files:"
> if [ -d /tmp -a ! -L /tmp ]; then
> cd /tmp && {
> @@ -140,7 +144,7 @@
> if [ "X$VERBOSESTATUS" != X0 ]; then
> echo ""
> echo "disks:"
> - df -ikl
> + df "$DF_FLAGS"
> echo ""
> dump W
> else