summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-11-29 12:34:23 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-11-29 12:34:23 +0000
commit567a03881779688d34d57c2d20be81bebf982df1 (patch)
tree56b9ed423639cee463f4e9b5f0e36a4d283da286
parentb0713b912ca8c95fe4eea51c080490f69f59e73f (diff)
Do not test for processes being swapped out since this can't happen anymore.
-rw-r--r--bin/ps/keyword.c5
-rw-r--r--bin/ps/print.c14
-rw-r--r--bin/ps/ps.19
-rw-r--r--usr.bin/systat/pigs.c6
-rw-r--r--usr.bin/top/machine.c11
5 files changed, 11 insertions, 34 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c
index a7f95e43d56..1a418c8521c 100644
--- a/bin/ps/keyword.c
+++ b/bin/ps/keyword.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: keyword.c,v 1.25 2006/10/16 15:00:10 millert Exp $ */
+/* $OpenBSD: keyword.c,v 1.26 2006/11/29 12:34:19 miod Exp $ */
/* $NetBSD: keyword.c,v 1.12.6.1 1996/05/30 21:25:13 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: keyword.c,v 1.25 2006/10/16 15:00:10 millert Exp $";
+static char rcsid[] = "$OpenBSD: keyword.c,v 1.26 2006/11/29 12:34:19 miod Exp $";
#endif
#endif /* not lint */
@@ -104,7 +104,6 @@ VAR var[] = {
{"flags", "", "f"},
GID("gid", "GID", pvar, POFF(p_gid)),
{"group", "GROUP", NULL, LJUST, gname, USERLEN},
- {"holdcnt", "HOLDCNT", NULL, 0, pvar, 8, 0, POFF(p_holdcnt), INT32, "d"},
{"ignored", "", "sigignore"},
{"inblk", "INBLK", NULL, USER, pvar, 4, 0, POFF(p_uru_inblock), UINT64, "lld"},
{"inblock", "", "inblk"},
diff --git a/bin/ps/print.c b/bin/ps/print.c
index 1594121e200..428ec7807fc 100644
--- a/bin/ps/print.c
+++ b/bin/ps/print.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print.c,v 1.41 2006/05/02 05:25:19 hugh Exp $ */
+/* $OpenBSD: print.c,v 1.42 2006/11/29 12:34:19 miod Exp $ */
/* $NetBSD: print.c,v 1.27 1995/09/29 21:58:12 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
-static char rcsid[] = "$OpenBSD: print.c,v 1.41 2006/05/02 05:25:19 hugh Exp $";
+static char rcsid[] = "$OpenBSD: print.c,v 1.42 2006/11/29 12:34:19 miod Exp $";
#endif
#endif /* not lint */
@@ -243,9 +243,6 @@ state(const struct kinfo_proc2 *kp, VARENT *ve)
}
cp++;
- if (flag & P_INMEM) {
- } else
- *cp++ = 'W';
if (kp->p_nice < NZERO)
*cp++ = '<';
else if (kp->p_nice > NZERO)
@@ -260,9 +257,6 @@ state(const struct kinfo_proc2 *kp, VARENT *ve)
*cp++ = 'V';
if (flag & P_SYSTEM)
*cp++ = 'K';
- /* XXX Since P_SYSTEM now shows a K, should L just be for holdcnt? */
- if ((flag & P_SYSTEM) || kp->p_holdcnt)
- *cp++ = 'L';
if ((flag & P_SYSTEM) == 0 &&
kp->p_rlim_rss_cur / 1024 < pgtok(kp->p_vm_rssize))
*cp++ = '>';
@@ -541,7 +535,7 @@ getpcpu(const struct kinfo_proc2 *kp)
#define fxtofl(fixpt) ((double)(fixpt) / fscale)
/* XXX - I don't like this */
- if (kp->p_swtime == 0 || (kp->p_flag & P_INMEM) == 0)
+ if (kp->p_swtime == 0)
return (0.0);
if (rawcpu)
return (100.0 * fxtofl(kp->p_pctcpu));
@@ -578,7 +572,7 @@ getpmem(const struct kinfo_proc2 *kp)
if (failure)
return (0.0);
- if ((kp->p_flag & P_INMEM) == 0 || (kp->p_flag & P_SYSTEM))
+ if (kp->p_flag & P_SYSTEM)
return (0.0);
/* XXX want pmap ptpages, segtab, etc. (per architecture) */
szptudot = USPACE/getpagesize();
diff --git a/bin/ps/ps.1 b/bin/ps/ps.1
index 3c6e0d4574c..25692320e50 100644
--- a/bin/ps/ps.1
+++ b/bin/ps/ps.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ps.1,v 1.62 2006/11/02 12:34:19 jmc Exp $
+.\" $OpenBSD: ps.1,v 1.63 2006/11/29 12:34:19 miod Exp $
.\" $NetBSD: ps.1,v 1.16 1996/03/21 01:36:28 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -222,7 +222,6 @@ the include file
.Bd -literal
P_ADVLOCK 0x0000001 process may hold a POSIX advisory lock
P_CONTROLT 0x0000002 process has a controlling terminal
-P_INMEM 0x0000004 process is loaded into memory
P_NOCLDSTOP 0x0000008 no SIGCHLD when children stop
P_PPWAIT 0x0000010 parent is waiting for child to
exec/exit
@@ -253,8 +252,6 @@ P_SYSTRACE 0x0400000 process system call tracing is active
Effective group.
.It Cm group
Text name of effective group ID.
-.It Cm holdcnt
-Number of holds on the process (if non-zero, process can't be swapped).
.It Cm inblk
Alias:
.Cm inblock .
@@ -427,8 +424,6 @@ swapped.
The process is trying to exit.
.It K
The process is a kernel thread.
-.It L
-The process has pages locked in core (for example, for raw I/O).
.It N
The process has a reduced CPU
scheduling priority.
@@ -445,8 +440,6 @@ The process is a session leader.
.It V
The process is suspended during a
.Xr vfork 2 .
-.It W
-The process is swapped out.
.It X
The process is being traced or debugged.
.It x
diff --git a/usr.bin/systat/pigs.c b/usr.bin/systat/pigs.c
index 93e45f77cdf..21ea763ffb3 100644
--- a/usr.bin/systat/pigs.c
+++ b/usr.bin/systat/pigs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pigs.c,v 1.18 2006/03/31 04:10:59 deraadt Exp $ */
+/* $OpenBSD: pigs.c,v 1.19 2006/11/29 12:34:22 miod Exp $ */
/* $NetBSD: pigs.c,v 1.3 1995/04/29 05:54:50 cgd Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)pigs.c 8.2 (Berkeley) 9/23/93";
#endif
-static char rcsid[] = "$OpenBSD: pigs.c,v 1.18 2006/03/31 04:10:59 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: pigs.c,v 1.19 2006/11/29 12:34:22 miod Exp $";
#endif /* not lint */
/*
@@ -194,7 +194,7 @@ fetchpigs(void)
for (i = 0; i < nproc; i++) {
pt[i].pt_kp = &kpp[i];
pctp = &pt[i].pt_pctcpu;
- if (kpp->p_swtime == 0 || (kpp->p_flag & P_INMEM) == 0)
+ if (kpp->p_swtime == 0)
*pctp = 0;
else
*pctp = ((double) kpp->p_pctcpu / sysload.fscale) /
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 20e3b39eac0..9a2a54963b4 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machine.c,v 1.53 2006/09/20 21:26:20 ray Exp $ */
+/* $OpenBSD: machine.c,v 1.54 2006/11/29 12:34:22 miod Exp $ */
/*-
* Copyright (c) 1994 Thorsten Lockert <tholo@sigmasoft.com>
@@ -475,15 +475,6 @@ format_next_process(caddr_t handle, char *(*get_userid)(uid_t))
pp = *(hp->next_proc++);
hp->remaining--;
- if ((pp->p_flag & P_INMEM) == 0) {
- /*
- * Print swapped processes as <pname>
- */
- char buf[sizeof(pp->p_comm)];
-
- (void) strlcpy(buf, pp->p_comm, sizeof(buf));
- (void) snprintf(pp->p_comm, sizeof(pp->p_comm), "<%s>", buf);
- }
cputime = (pp->p_uticks + pp->p_sticks + pp->p_iticks) / stathz;
/* calculate the base for cpu percentages */