* Notification of time a command took
@ 2004-04-25 15:55 Kai Grossjohann
2004-04-25 16:12 ` Thomas Köhler
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Kai Grossjohann @ 2004-04-25 15:55 UTC (permalink / raw)
To: zsh-users
I think I remember having somebody seen with a tcsh which reported the
time a command took, if it took longer than N seconds. This seems to
be a useful feature, and since zsh has the union of all features of
all shells, surely it is possible in zsh, too. But how?
Kai
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Notification of time a command took
2004-04-25 15:55 Notification of time a command took Kai Grossjohann
@ 2004-04-25 16:12 ` Thomas Köhler
2004-04-25 16:29 ` Wayne Davison
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Thomas Köhler @ 2004-04-25 16:12 UTC (permalink / raw)
To: Kai Grossjohann; +Cc: zsh-users
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
Kai Grossjohann wrote:
> I think I remember having somebody seen with a tcsh which reported the
> time a command took, if it took longer than N seconds. This seems to
> be a useful feature, and since zsh has the union of all features of
> all shells, surely it is possible in zsh, too. But how?
What about setting REPORTTIME to N? :-)
I use N=3:
~> grep REPORT .zshrc
export REPORTTIME=3
> Kai
Ciao,
Thomas
--
Thomas Köhler Email: jean-luc@picard.franken.de
<>< WWW: http://jeanluc-picard.de
IRC: tkoehler
PGP public key available from Homepage!
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Notification of time a command took
2004-04-25 15:55 Notification of time a command took Kai Grossjohann
2004-04-25 16:12 ` Thomas Köhler
@ 2004-04-25 16:29 ` Wayne Davison
2004-04-25 16:32 ` Andy Spiegl
2004-04-25 16:44 ` Kai Grossjohann
3 siblings, 0 replies; 5+ messages in thread
From: Wayne Davison @ 2004-04-25 16:29 UTC (permalink / raw)
To: Kai Grossjohann; +Cc: zsh-users
On Sun, Apr 25, 2004 at 05:55:46PM +0200, Kai Grossjohann wrote:
> I think I remember having somebody seen with a tcsh which reported the
> time a command took, if it took longer than N seconds.
Searching through the zsh man page, I found that setting the environment
variable REPORTTIME=N will accomplish that (where N sets the minimum
total CPU time for the report to happen, not the minimum elapsed time).
..wayne..
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Notification of time a command took
2004-04-25 15:55 Notification of time a command took Kai Grossjohann
2004-04-25 16:12 ` Thomas Köhler
2004-04-25 16:29 ` Wayne Davison
@ 2004-04-25 16:32 ` Andy Spiegl
2004-04-25 16:44 ` Kai Grossjohann
3 siblings, 0 replies; 5+ messages in thread
From: Andy Spiegl @ 2004-04-25 16:32 UTC (permalink / raw)
To: zsh-users
> This seems to be a useful feature, and since zsh has the union of all
> features of all shells, surely it is possible in zsh, too.
You're right. :-)
man zshparam
...
REPORTTIME
If nonnegative, commands whose combined user and system execution
times (measured in seconds) are greater than this value have timing
statistics printed for them.
...
So:
condor:~>grep -i time .zshrc
# show process statistics if cpu time is > 5 seconds
export REPORTTIME=5
Chau,
Andy.
--
o _ _ _
------- __o __o /\_ _ \\o (_)\__/o (_) -o)
----- _`\<,_ _`\<,_ _>(_) (_)/<_ \_| \ _|/' \/ /\\
---- (_)/ (_) (_)/ (_) (_) (_) (_) (_)' _\o_ _\_v
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"You can't have everything. Where would you put it?" (Steven Wright)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Notification of time a command took
2004-04-25 15:55 Notification of time a command took Kai Grossjohann
` (2 preceding siblings ...)
2004-04-25 16:32 ` Andy Spiegl
@ 2004-04-25 16:44 ` Kai Grossjohann
3 siblings, 0 replies; 5+ messages in thread
From: Kai Grossjohann @ 2004-04-25 16:44 UTC (permalink / raw)
To: zsh-users
Thanks, folks, for pointing out $REPORTTIME, instead of saying RTFM...
Kai
--
Why should I read the fucking manual? I know how to fuck!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-04-25 16:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-25 15:55 Notification of time a command took Kai Grossjohann
2004-04-25 16:12 ` Thomas Köhler
2004-04-25 16:29 ` Wayne Davison
2004-04-25 16:32 ` Andy Spiegl
2004-04-25 16:44 ` Kai Grossjohann
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).