From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 13 14:13:25 2003 Return-Path: Delivered-To: freebsd-ports-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FFF237B401; Wed, 13 Aug 2003 14:13:25 -0700 (PDT) Received: from shrike.submonkey.net (pc1-cdif2-5-cust38.cdif.cable.ntl.com [81.101.150.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 082BD43F3F; Wed, 13 Aug 2003 14:13:24 -0700 (PDT) (envelope-from setantae@submonkey.net) Received: from setantae by shrike.submonkey.net with local (Exim 4.20) id 19n2vq-000Amc-98; Wed, 13 Aug 2003 22:13:22 +0100 Date: Wed, 13 Aug 2003 22:13:22 +0100 From: Ceri Davies To: G.Czaplinski@prioris.mini.pw.edu.pl Message-ID: <20030813211322.GC39980@submonkey.net> Mail-Followup-To: Ceri Davies , G.Czaplinski@prioris.mini.pw.edu.pl, freebsd-ports-bugs@FreeBSD.org, freebsd-bugs@FreeBSD.org References: <200308132029.h7DKTrmN051522@freefall.freebsd.org> <20030813204708.GO13622@prioris.mini.pw.edu.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qz2CZ664xQdCRdPu" Content-Disposition: inline In-Reply-To: <20030813204708.GO13622@prioris.mini.pw.edu.pl> User-Agent: Mutt/1.5.4i Sender: Ceri Davies cc: freebsd-ports-bugs@FreeBSD.org cc: freebsd-bugs@FreeBSD.org Subject: Re: misc/55411: One of the freebsd-tips in fortune(1) is incorrect on time(1) command. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Aug 2003 21:13:25 -0000 --Qz2CZ664xQdCRdPu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 13, 2003 at 10:47:09PM +0200, Grzegorz Czaplinski wrote: > On Wed, Aug 13, 2003 at 01:29:53PM -0700, Ceri Davies wrote: > > Synopsis: One of the freebsd-tips in fortune(1) is incorrect on time(1)= command. > >=20 > > State-Changed-From-To: open->closed > > State-Changed-By: ceri > > State-Changed-When: Wed Aug 13 13:28:53 PDT 2003 > > State-Changed-Why:=20 > > The fortune is fine. > > If it mentioned the -h switch then I'd agree, but it doesn't. > >=20 > >=20 > > Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-bugs > > Responsible-Changed-By: ceri > > Responsible-Changed-When: Wed Aug 13 13:28:53 PDT 2003 > > Responsible-Changed-Why:=20 > > Not a ports bug. > >=20 >=20 > Hi there, >=20 > STOP! >=20 > I see you don't get the whole point. This is not the only one error in > fortune tips given by Dru*. I don't think it's an error. The tip says: "To see how long it takes a command to run, type the word "time" before the command name." That doesn't have anything to do with what you've mentioned below, or the -h option, which is what your PR was about. If that's not what your PR was ab= out, then you should have said so, in the PR. > Consider that: > 1. > alphax# time ping -c prioris.mini.pw.edu.pl > ping: invalid count of packets to transmit: `prioris.mini.pw.edu.pl' > 0.000u 0.004s 0:00.04 0.0% 0+0k 1+0io 6pf+0w > alphax# time ping -c 2 prioris.mini.pw.edu.pl > PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes > 64 bytes from 194.29.178.2: icmp_seq=3D0 ttl=3D68 time=3D0.874 ms > 64 bytes from 194.29.178.2: icmp_seq=3D1 ttl=3D68 time=3D0.602 ms >=20 > --- prioris.mini.pw.edu.pl ping statistics --- > 2 packets transmitted, 2 packets received, 0% packet loss > round-trip min/avg/max/stddev =3D 0.602/0.738/0.874/0.136 ms > 0.000u 0.008s 0:01.06 0.0% 0+0k 0+0io 4pf+0w I see times here. It tells me how many page faults there were too. > 2. > alphax# \time ping -c 2 prioris.mini.pw.edu.pl > PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes > 64 bytes from 194.29.178.2: icmp_seq=3D0 ttl=3D68 time=3D0.675 ms > 64 bytes from 194.29.178.2: icmp_seq=3D1 ttl=3D68 time=3D0.630 ms >=20 > --- prioris.mini.pw.edu.pl ping statistics --- > 2 packets transmitted, 2 packets received, 0% packet loss > round-trip min/avg/max/stddev =3D 0.630/0.653/0.675/0.022 ms > 1.02 real 0.00 user 0.00 sys I see times here. > 3. > alphax# \time -h ping -c 2 prioris.mini.pw.edu.pl > PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes > 64 bytes from 194.29.178.2: icmp_seq=3D0 ttl=3D68 time=3D0.683 ms > 64 bytes from 194.29.178.2: icmp_seq=3D1 ttl=3D68 time=3D0.507 ms >=20 > --- prioris.mini.pw.edu.pl ping statistics --- > 2 packets transmitted, 2 packets received, 0% packet loss > round-trip min/avg/max/stddev =3D 0.507/0.595/0.683/0.088 ms > 1.01s real 0.00s user 0.00s sys I see times here. > These examples are from: > alphax# uname -a > FreeBSD alphax.mini.pw.edu.pl 5.1-RELEASE FreeBSD 5.1-RELEASE #1: Mon > Jun 16 20:46:55 CEST 2003 root@alphax.mini.pw.edu.pl:/usr/obj/usr/src= /sys/ >=20 > The shell is csh. From zsh it looks much different: >=20 > alphax# time ping -c 2 prioris.mini.pw.edu.pl > PING prioris.mini.pw.edu.pl (194.29.178.2): 56 data bytes > 64 bytes from 194.29.178.2: icmp_seq=3D0 ttl=3D68 time=3D0.666 ms > 64 bytes from 194.29.178.2: icmp_seq=3D1 ttl=3D68 time=3D0.642 ms >=20 > --- prioris.mini.pw.edu.pl ping statistics --- > 2 packets transmitted, 2 packets received, 0% packet loss > round-trip min/avg/max/stddev =3D 0.642/0.654/0.666/0.012 ms > ping -c 2 prioris.mini.pw.edu.pl 0.00s user 0.01s system 0% cpu 1.012 > total OK, so zsh's builtin time looks doesn't prefix it's output with a newline. Your PR didn't say that either. > If someone has csh as his/her default shell the output is totally > unreadable. This is because you call shells builtin. Prefixing time > command with a "\" you prevent such errors as then you call time(1). That's a matter of opinion. It does tell you how long the command took to execute. > I guess you did not perform any tests before closing the PR. You guessed incorrectly. Ceri --=20 User: DO YOU ACCEPT JESUS CHRIST AS YOUR PERSONAL LORD AND SAVIOR? Iniaes: Sure, I can accept all forms of payment. -- www.chatterboxchallenge.com --Qz2CZ664xQdCRdPu Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/OqnyocfcwTS3JF8RAlEmAKDKMYv+kfPy8Gok8YSGtrwTnE3FpwCguUbQ 2Cda08tGP7kjIItl8vck1oY= =sUMY -----END PGP SIGNATURE----- --Qz2CZ664xQdCRdPu--