From owner-svn-src-all@FreeBSD.ORG Thu Apr 30 08:31:17 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13274106566B; Thu, 30 Apr 2009 08:31:17 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail11.syd.optusnet.com.au (mail11.syd.optusnet.com.au [211.29.132.192]) by mx1.freebsd.org (Postfix) with ESMTP id 982108FC19; Thu, 30 Apr 2009 08:31:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-107-120-227.carlnfd1.nsw.optusnet.com.au [122.107.120.227]) by mail11.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n3U8V6Do017844 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Apr 2009 18:31:10 +1000 Date: Thu, 30 Apr 2009 18:31:06 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "M. Warner Losh" In-Reply-To: <20090430.011913.-1023162474.imp@bsdimp.com> Message-ID: <20090430172939.M1225@besplex.bde.org> References: <200904300124.n3U1Or1w097927@svn.freebsd.org> <20090430162311.T2904@delplex.bde.org> <20090430110739.682cc989.stas@FreeBSD.org> <20090430.011913.-1023162474.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: stas@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, brde@optusnet.com.au Subject: Re: svn commit: r191677 - head/usr.bin/du X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2009 08:31:17 -0000 On Thu, 30 Apr 2009, M. Warner Losh wrote: > In message: <20090430110739.682cc989.stas@FreeBSD.org> > Stanislav Sedov writes: > : On Thu, 30 Apr 2009 16:36:38 +1000 (EST) > : Bruce Evans mentioned: > : > : > On Thu, 30 Apr 2009, Warner Losh wrote: > : > > : > > Log: > : > > Report the next directory being scanned when a ^T is pressed (or any > : > > SIGINFO). Provides some progress report for the impatient. > : > > : > The impatient should use a tracing utility instead of encrufting > : > individual utilities. > : > : On the other hand, using tracing utilities is not the best way to retireve > : status information in all cases. It just handles many more cases better than encrufting utilities does. > Especially if one started the job and then it seems to be "stuck". > It is most efficient to know if something is going on, and ^T gives > that with a very minimal set of code. No, this case is handled almost identically for utilities (like all the encrufted ones starting with cp) whose activity consists mainly of making syscalls -- both will report no output. The tracing utilities should be able to better when started with -p pid by determining if the process is in a syscall (blocked or not) on startup. Testing processes blocked in sleep(100) shows some bugs in truss(1): - under ~5.2, truss without -p doesn't report the nanosleep() syscall until after 100 seconds, while ktrace without -p (plus kdump to watch) reports the syscall as soon as it is made followed by syscall return 100 seconds later. I think truss only reports syscall completion, so it works less well than ktrace for watching blocked syscalls. - under ~5.2, both truss and ktrace/kdump with -p report the completion of the syscall after 100 seconds. - under -current, truss with -p is broken. It now aborts the nanosleep() immediately with EINTR. ktrace with -p still works correctly. > Tracing utilities produce way too much output... This is a feature. Instead of being restricted to the output that has been encrufted, you can get fairly complete details of non-internal (i.e., syscall) activity and filter out the parts that you don't want to see. Of course, large utilities with lots of internal state that might be interesting to follow cannot be handled well by either ^T or tracing utilities. I hestitate to point out that your patch could be made less encrufted and more useful by making it toggle the -v flag. It could be made more encrufted and more useful by subverting ^T further to cycle through various combinations of flags, in particular -i for cp and rm. Toggling -i would fix the missing interaction of turning off -i in -i mode itself Full encruftion would add GUI interaction to all the little utilities, making them perfectly large and un-unixlike. Bruce