10.4: Get status of foreground jobs with ^T

Jun 03, '05 08:57:00AM

Contributed by: Anonymous

Tiger only hintWhen running processes from Terminal/the shell, the old Unix status control character finally works in 10.4. This is useful for seeing what your process is up to. While waiting for a command to complete, press control-T to see load, command running, pid, status, and user and system CPU time used:

$ sleep 5
/* Press Control-T... */
load: 0.11  cmd: sleep 2559 waiting 0.00u 0.00s
Here's a bash example; Control-T is pressed before each output line appears:
$ while true; do set x=0; done
load: 0.04  cmd: bash 2552 running 1.01u 0.03s
load: 0.04  cmd: bash 2552 running 2.73u 0.04s
load: 0.12  cmd: bash 2552 running 4.29u 0.04s
load: 0.12  cmd: bash 2552 running 6.03u 0.05s
^C
$ 
This feature seems to be enabled by default when you create a new Terminal window, but I had to turn it on manually (by typing stty status ^T, that's literally a ^ and then a T) when sshing.

Comments (13)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050520120407161