Date: Fri, 15 Feb 2008 10:07:17 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: rc@freebsd.org Subject: 420.status-network Message-ID: <867ih61tbu.fsf@ds4.des.no>
next in thread | raw e-mail | index | archive | help
In my continuing quest to reduce periodic/daily email to something that can actually be read and understood at a glance, I've come up with the following patch, which strips uninteresting interfaces and link-level data from the output of 420.status-network: Index: 420.status-network =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/etc/periodic/daily/420.status-network,v retrieving revision 1.6 diff -u -r1.6 420.status-network --- 420.status-network 14 Sep 2000 17:19:10 -0000 1.6 +++ 420.status-network 15 Feb 2008 09:02:08 -0000 @@ -21,9 +21,11 @@ netstat -i && rc=3D0 || rc=3D3;; *) netstat -in && rc=3D0 || rc=3D3;; - esac;; - - *) rc=3D0;; + esac | egrep -v '(^(lo|faith)[0-9]+|pflog\>)|<Link\#[0-9]+>' + ;; + *) + rc=3D0 + ;; esac =20 exit $rc Instead of this: Network interface status: Name Mtu Network Address Ipkts Ierrs Opkts Oerrs = Coll msk0 1500 <Link#1> 00:16:e6:dc:b5:62 10094199 0 9731102 0 = 0 msk0 1500 10.0.0.0 ds4 10100875 - 9967045 - = - lo0 16384 <Link#2> 1341743 0 1341741 0 = 0 lo0 16384 fe80:2::1 fe80:2::1 0 - 0 - = - lo0 16384 localhost ::1 0 - 0 - = - lo0 16384 your-net localhost 1290637 - 1290633 - = - pflog 33160 <Link#3> 0 0 147 0 = 0 I get this: Network interface status: Name Mtu Network Address Ipkts Ierrs Opkts Oerrs = Coll msk0 1500 10.0.0.0 ds4 10100920 - 9967083 - = - BTW, I think daily_status_network_usedns should be off by default. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?867ih61tbu.fsf>