summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-08-17 23:18:48 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-08-17 23:18:48 +0000
commit50d4324685596c637ffce53b252a362b2cca779a (patch)
treede897c319967be2fdc928a5edd25ef7bf05e9eb6 /usr.bin
parentda0db51398e785c7b9d06b2c915bfa2d6737abe2 (diff)
print "idle" for idle processes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/top/machine.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index b8def959ae0..dc8f07cf876 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machine.c,v 1.1 1997/08/14 14:00:22 downsj Exp $ */
+/* $OpenBSD: machine.c,v 1.2 1997/08/17 23:18:47 kstailey Exp $ */
/*
* top - a top users display for Unix
@@ -497,7 +497,8 @@ char *(*get_userid)();
PP(pp, p_nice) - NZERO,
format_k(pagetok(PROCSIZE(pp))),
format_k(pagetok(VP(pp, vm_rssize))),
- state_abbrev[(unsigned char) PP(pp, p_stat)],
+ (PP(pp, p_stat) == SSLEEP && PP(pp, p_slptime) > MAXSLP)
+ ? "idle" : state_abbrev[(unsigned char) PP(pp, p_stat)],
p_wait,
format_time(cputime),
100.0 * pct,