tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
/etc/daily, rc.conf, swap, NTP, NFS
If one has configured Network Time Protocol (NTP, i.e. ntpd) to
run on NetBSD, should not /etc/daily check it?
Also, why doesn't /etc/daily read /etc/rc.conf to check optionally
configured subsystems? That applies to the rwho check, also.
A proposed diff to correct:
*** daily.orig 2013-06-03 22:27:59.000000000 -0700
--- daily 2013-06-29 08:32:13.000000000 -0700
***************
*** 26,31 ****
--- 26,38 ----
exit 1;
fi
+ if [ -f /etc/rc.conf ]; then
+ . /etc/rc.conf
+ else
+ echo "Can't read /etc/rc.conf; aborting."
+ exit 1;
+ fi
+
if [ -z "$MAILTO" -o "$USER" != "root" ]; then
MAILTO=root
fi
***************
*** 183,188 ****
--- 190,201 ----
fi
echo ""
fi
+ if checkyesno no_swap; then
+ else
+ echo ""
+ echo "swap space:"
+ pstat -sh
+ fi
rm -f $TMP $TMP2
touch $TMP2
for dev in $(iostat -x | awk '/^raid/ { print $1 }'); do
***************
*** 200,216 ****
rm -f $TMP2
fi
- if checkyesno check_mailq; then
- mailq > $TMP
- if ! grep -q "queue is empty$" $TMP; then
- echo ""
- echo "mail:"
- cat $TMP
- fi
- fi
-
- rm -f $TMP
-
if checkyesno check_network; then
echo ""
echo "network:"
--- 213,218 ----
***************
*** 233,245 ****
}
}'
fi
! echo ""
! t=/var/rwho/*
! if [ "$t" != '/var/rwho/*' ]; then
ruptime
fi
fi
if checkyesno run_fsck; then
echo ""
echo "Checking filesystems:"
--- 235,278 ----
}
}'
fi
! if checkyesno rwhod; then
! echo ""
ruptime
fi
+ if checkyesno ntpd; then
+ echo ""
+ echo "Network Time Protocol (NTP):"
+ ntpq -p
+ echo ""
+ ntptime
+ fi
+ if checkyesno nfs_server; then
+ echo ""
+ echo "Network File System (NFS) server:"
+ nfsstat -s
+ fi
+ if checkyesno nfs_client; then
+ echo ""
+ echo "Network File System (NFS) client:"
+ nfsstat -c
+ fi
+ if checkyesno ipfilter; then
+ echo ""
+ ipfstat
+ fi
fi
+ if checkyesno check_mailq; then
+ mailq > $TMP
+ if ! grep -q "queue is empty$" $TMP; then
+ echo ""
+ echo "mail:"
+ cat $TMP
+ fi
+ fi
+
+ rm -f $TMP
+
if checkyesno run_fsck; then
echo ""
echo "Checking filesystems:"
Home |
Main Index |
Thread Index |
Old Index