From owner-cvs-src@FreeBSD.ORG Tue Jan 31 21:29:00 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63C7216A434; Tue, 31 Jan 2006 21:29:00 +0000 (GMT) (envelope-from grog@lemis.com) Received: from ext-gw.lemis.com (ext-gw.lemis.com [150.101.14.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id C358B43D5C; Tue, 31 Jan 2006 21:28:53 +0000 (GMT) (envelope-from grog@lemis.com) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.135]) by ext-gw.lemis.com (Postfix) with ESMTP id E5F57131DC3; Wed, 1 Feb 2006 07:58:52 +1030 (CST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id BC51485B58; Wed, 1 Feb 2006 07:58:52 +1030 (CST) Date: Wed, 1 Feb 2006 07:58:52 +1030 From: Greg 'groggy' Lehey To: Bruce Evans Message-ID: <20060131212852.GD97116@wantadilla.lemis.com> References: <200601301233.k0UCXiKq085748@repoman.freebsd.org> <20060130123525.GD83922@FreeBSD.org> <20060130215816.GC91655@wantadilla.lemis.com> <20060130220810.GA93542@FreeBSD.org> <20060131215638.V679@delplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DrWhICOqskFTAXiy" Content-Disposition: inline In-Reply-To: <20060131215638.V679@delplex.bde.org> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 VoIP: sip:0871270137@sip.internode.on.net WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: Matteo Riondato , Gleb Smirnoff , cvs-all@FreeBSD.org, src-committers@FreeBSD.org, cvs-src@FreeBSD.org Subject: Re: cvs commit: src/etc/defaults periodic.conf X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jan 2006 21:29:02 -0000 --DrWhICOqskFTAXiy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tuesday, 31 January 2006 at 21:59:48 +1100, Bruce Evans wrote: > On Tue, 31 Jan 2006, Gleb Smirnoff wrote: > >> On Tue, Jan 31, 2006 at 08:28:16AM +1030, Greg 'groggy' Lehey wrote: >> G> On Monday, 30 January 2006 at 15:35:25 +0300, Gleb Smirnoff wrote: >> G> > On Mon, Jan 30, 2006 at 12:33:44PM +0000, Matteo Riondato wrote: >> G> > M> Make df output in periodic mail human readable >> G> > >> G> > Thanks! >> G> >> G> *sigh* >> G> >> G> Not everybody is human. > > Is somebody who thinks in exponential notation human? Possibly. But is -h exponential? It's far too coarse-grained. >> The periodic output is for humans. The monitoring software - >> nagios, remstats, etc runs df (or other tools) itself. > > Then it should not use df with the -h (hideous) flag. Heh. My main objection to -h is that it's so difficult to read. Currently I look at the output and I can see optically the relationships between the individual file systems. For example: Filesystem 1048576-blocks Used Avail Capacity Mounted on /dev/ad0s3a 8905 7924 268 97% / devfs 0 0 0 100% /dev /dev/ad0s2a 7929 2385 4908 33% /5 /dev/ad0s5 9388 3615 5296 41% /ubuntu /dev/ad0s7 27764 14707 11646 56% /home procfs 0 0 0 100% /proc battunga:/ 3969 2931 721 80% /battunga battunga:/home 5267 1800 3046 37% /battunga/home echunga:/ 14873 8226 5457 60% /echunga echunga:/home 9916 3869 5252 42% /echunga/home echunga:/src 188356 115525 57762 67% /src echunga:/dump 122037 88778 23496 79% /dump wantadilla:/ 9912 5813 3305 64% /wantadilla wantadilla:/home 51895 46826 917 98% /wantadilla/home wantadilla:/dumpa 76285 62487 7695 89% /dumpa wantadilla:/dumpb 187780 180114 5788 97% /dumpb /dev/da0s1 121 16 104 13% /camera With -h, this distinction disappears: I need to read each individual line to compare them: Filesystem Size Used Avail Capacity Mounted on /dev/ad0s3a 8.7G 7.7G 268M 97% / devfs 1.0K 1.0K 0B 100% /dev /dev/ad0s2a 7.7G 2.3G 4.8G 33% /5 /dev/ad0s5 9.2G 3.5G 5.2G 41% /ubuntu /dev/ad0s7 27G 14G 11G 56% /home procfs 4.0K 4.0K 0B 100% /proc battunga:/ 3.9G 2.9G 721M 80% /battunga battunga:/home 5.1G 1.8G 3.0G 37% /battunga/home echunga:/ 15G 8.0G 5.3G 60% /echunga echunga:/home 9.7G 3.8G 5.1G 42% /echunga/home echunga:/src 184G 113G 56G 67% /src echunga:/dump 119G 87G 23G 79% /dump wantadilla:/ 9.7G 5.7G 3.2G 64% /wantadilla wantadilla:/home 51G 46G 918M 98% /wantadilla/home wantadilla:/dumpa 74G 61G 7.5G 89% /dumpa wantadilla:/dumpb 183G 176G 5.7G 97% /dumpb /dev/da0s1 121M 16M 105M 13% /camera In the first output, the size of /dummpb is clearly about 1500 times the size of /camera (bottom two lines). In the second output, you really need to look at the 'G' and the 'M'. Matteo suggested using -m instead of -k. Clearly I like that (it's my default). But maybe the real question is a matter of scaling. Clearly something like this looks confusing: Filesystem 1K-blocks Used Avail Capacity Mounted on wantadilla:/dumpb 192287056 184436908 5927280 97% /dumpb So maybe we need a df option that maintains a certain number of significant digits; for /camera it might correspond to -k: Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/da0s1 124096 16704 107392 13% /camera For most, however, it would correspond to -m. The important thing is that it should use the same unit for all file systems mentioned. Thoughts? Greg -- See complete headers for address and phone numbers. --DrWhICOqskFTAXiy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFD39aUIubykFB6QiMRAlhfAJ4ngsSXNq4+/RS9faZnm3FaR/m/YACgiDxm LOAqBF8hgkhyRRA9Ig+E1ds= =kcqh -----END PGP SIGNATURE----- --DrWhICOqskFTAXiy--