Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: bug with for and time



Dan Nelson wrote:
> In the last episode (Oct 06), Peter Stephenson said:
> > This has never been great.  There appear to be two problems.
> 
> Actually it _was_ great back in zsh 2.5, which did use getrusage().  It
> was dropped in zsh 3.0 for some reason.  My TIMEFMT is still set to
> "U:%U S:%S E:%E CPU:%P Faults:%F Swaps:%W" as a reminder to put it back
> in (not a very effective reminder I guess).

I can vaguely remember that the getrusage() fields which didn't
correspond to times were dropped when we switched to autoconf, simply
because it became hard to test for all the fields.  I didn't notice
getrusage() disappearing entirely then, but it certainly must have at
some point.

I suppose this will give us a base for putting them back, with suitable
configuration tests.  Here's what we're aiming at (from 2.5.03):

TIMEFMT
       The format of process time reports with the time keyword.
       The default is "%E real  %U  user   %S  system   %P  %J".
       Recognizes the following escape sequences:

        %U     CPU seconds spent in user mode.
        %S     CPU seconds spent in kernel mode.
        %E     Elapsed time in seconds.
        %P     The CPU percentage, computed as (%U+%S)/%E.
        %W     Number of times the process was swapped.
        %X     The average amount in (shared) text space used in
               Kbytes.
        %D     The average amount in (unshared) data/stack space
               used in Kbytes.
        %K     The total space used (%X+%D) in Kbytes.
        %M     The  maximum memory the process had in use at any
               time in Kbytes.
        %F     The number of major page faults (page  needed  to
               be brought from disk).
        %R     The number of minor page faults.
        %I     The number of input operations.
        %O     The number of output operations.
        %r     The number of socket messages received.
        %s     The number of socket messages sent.
        %k     The number of signals received.
        %w     Number of voluntary context switches (waits).
        %c     Number of involuntary context switches.
        %J     The name of this job.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



Messages sorted by: Reverse Date, Date, Thread, Author