diff options
| author | Dmitrij Tejblum <dt@FreeBSD.org> | 1999-05-22 20:10:31 +0000 |
|---|---|---|
| committer | Dmitrij Tejblum <dt@FreeBSD.org> | 1999-05-22 20:10:31 +0000 |
| commit | 9d3a4425833fdfb43b86a1df924a26fcf89f27f9 (patch) | |
| tree | 7f0a2b6bcc22590b8b78e74dc78eb6d629493399 /sys/kern/tty.c | |
| parent | 53ee42d318231cd7fffb5b76c866a8ea7d006819 (diff) | |
Notes
Diffstat (limited to 'sys/kern/tty.c')
| -rw-r--r-- | sys/kern/tty.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 8b946cf98ec3..e9de97ba0cf4 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id: tty.c,v 1.117 1999/05/06 18:12:47 peter Exp $ + * $Id: tty.c,v 1.118 1999/05/08 06:39:42 phk Exp $ */ /*- @@ -2260,15 +2260,18 @@ ttyinfo(tp) pick->p_stat == SRUN ? "running" : pick->p_wmesg ? pick->p_wmesg : "iowait"); - calcru(pick, &utime, &stime, NULL); + if (pick->p_flag & P_INMEM) { + calcru(pick, &utime, &stime, NULL); - /* Print user time. */ - ttyprintf(tp, "%ld.%02ldu ", - utime.tv_sec, utime.tv_usec / 10000); + /* Print user time. */ + ttyprintf(tp, "%ld.%02ldu ", + utime.tv_sec, utime.tv_usec / 10000); - /* Print system time. */ - ttyprintf(tp, "%ld.%02lds ", - stime.tv_sec, stime.tv_usec / 10000); + /* Print system time. */ + ttyprintf(tp, "%ld.%02lds ", + stime.tv_sec, stime.tv_usec / 10000); + } else + ttyprintf(tp, "?.??u ?.??s "); /* Print percentage cpu, resident set size. */ tmp = (pick->p_pctcpu * 10000 + FSCALE / 2) >> FSHIFT; |
