Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nathanw_sa]: src Catch up to -current.
details: https://anonhg.NetBSD.org/src/rev/0087ec7e9adb
branches: nathanw_sa
changeset: 506444:0087ec7e9adb
user: nathanw <nathanw%NetBSD.org@localhost>
date: Tue Nov 12 20:31:57 2002 +0000
description:
Catch up to -current.
diffstat:
bin/ps/keyword.c | 32 +-
bin/ps/print.c | 7 +-
bin/ps/ps.1 | 128 +++-
bin/ps/ps.c | 9 +-
usr.bin/top/boolean.h | 30 +-
usr.bin/top/commands.c | 543 +++++++++++++++++++++
usr.bin/top/commands.h | 30 +-
usr.bin/top/display.c | 1210 +++++++++++++++++++++++++++++++++++++++++++++++
usr.bin/top/display.h | 66 ++
usr.bin/top/layout.h | 59 ++
usr.bin/top/loadavg.h | 30 +-
usr.bin/top/machine.h | 101 +++
usr.bin/top/os.h | 30 +-
usr.bin/top/screen.c | 522 ++++++++++++++++++++
usr.bin/top/screen.h | 30 +-
usr.bin/top/sigconv.awk | 27 +
usr.bin/top/top.c | 1006 +++++++++++++++++++++++++++++++++++++++
usr.bin/top/top.h | 69 ++
usr.bin/top/top.local.h | 58 ++-
usr.bin/top/username.c | 27 +-
usr.bin/top/username.h | 30 +-
usr.bin/top/utils.c | 27 +-
usr.bin/top/utils.h | 27 +-
usr.bin/top/version.c | 27 +-
usr.bin/w/Makefile | 8 +-
usr.bin/w/pr_time.c | 6 +-
usr.bin/w/w.c | 608 +++++++++++++++++++++++
27 files changed, 4644 insertions(+), 103 deletions(-)
diffs (truncated from 5196 to 300 lines):
diff -r 9ebf245240f3 -r 0087ec7e9adb bin/ps/keyword.c
--- a/bin/ps/keyword.c Tue Nov 12 20:11:04 2002 +0000
+++ b/bin/ps/keyword.c Tue Nov 12 20:31:57 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: keyword.c,v 1.26.2.3 2002/04/24 21:42:30 nathanw Exp $ */
+/* $NetBSD: keyword.c,v 1.26.2.4 2002/11/12 20:31:57 nathanw Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)keyword.c 8.5 (Berkeley) 4/2/94";
#else
-__RCSID("$NetBSD: keyword.c,v 1.26.2.3 2002/04/24 21:42:30 nathanw Exp $");
+__RCSID("$NetBSD: keyword.c,v 1.26.2.4 2002/11/12 20:31:57 nathanw Exp $");
#endif
#endif /* not lint */
@@ -93,13 +93,13 @@
{"blocked", "", "sigmask"},
{"caught", "", "sigcatch"},
{"command", "COMMAND", NULL, COMM|LJUST, command},
- {"cpu", "CPU", NULL, 0, pvar, 0, POFF(p_estcpu), UINT, "d"},
+ {"cpu", "CPU", NULL, 0, pvar, 0, POFF(p_estcpu), UINT, "u"},
{"cputime", "", "time"},
{"f", "F", NULL, 0, pvar, 0, POFF(p_flag), INT, "x"},
{"flags", "", "f"},
{"holdcnt", "HOLDCNT", NULL, LWP, pvar, 0, LOFF(l_holdcnt), INT, "d"},
{"ignored", "", "sigignore"},
- {"inblk", "INBLK", NULL, 0, pvar, 0, POFF(p_uru_inblock), UINT64, "lld"},
+ {"inblk", "INBLK", NULL, 0, pvar, 0, POFF(p_uru_inblock), UINT64, "llu"},
{"inblock", "", "inblk"},
{"jobc", "JOBC", NULL, 0, pvar, 0, POFF(p_jobc), SHORT, "d"},
{"ktrace", "KTRACE", NULL, 0, pvar, 0, POFF(p_traceflag), INT, "x"},
@@ -111,21 +111,21 @@
{"logname", "", "login"},
{"lstart", "STARTED", NULL, LJUST, lstarted},
{"lstate", "STAT", NULL, LJUST|LWP, lstate},
- {"majflt", "MAJFLT", NULL, 0, pvar, 0, POFF(p_uru_majflt), UINT64, "lld"},
- {"minflt", "MINFLT", NULL, 0, pvar, 0, POFF(p_uru_minflt), UINT64, "lld"},
- {"msgrcv", "MSGRCV", NULL, 0, pvar, 0, POFF(p_uru_msgrcv), UINT64, "lld"},
- {"msgsnd", "MSGSND", NULL, 0, pvar, 0, POFF(p_uru_msgsnd), UINT64, "lld"},
+ {"majflt", "MAJFLT", NULL, 0, pvar, 0, POFF(p_uru_majflt), UINT64, "llu"},
+ {"minflt", "MINFLT", NULL, 0, pvar, 0, POFF(p_uru_minflt), UINT64, "llu"},
+ {"msgrcv", "MSGRCV", NULL, 0, pvar, 0, POFF(p_uru_msgrcv), UINT64, "llu"},
+ {"msgsnd", "MSGSND", NULL, 0, pvar, 0, POFF(p_uru_msgsnd), UINT64, "llu"},
{"ni", "", "nice"},
{"nice", "NI", NULL, 0, pnice},
- {"nivcsw", "NIVCSW", NULL, 0, pvar, 0, POFF(p_uru_nivcsw), UINT64, "lld"},
+ {"nivcsw", "NIVCSW", NULL, 0, pvar, 0, POFF(p_uru_nivcsw), UINT64, "llu"},
{"nlwp", "NLWP", NULL, 0, pvar, 0, POFF(p_nlwps), UINT64, "lld"},
{"nsignals", "", "nsigs"},
- {"nsigs", "NSIGS", NULL, 0, pvar, 0, POFF(p_uru_nsignals), UINT64, "lld"},
- {"nswap", "NSWAP", NULL, 0, pvar, 0, POFF(p_uru_nswap), UINT64, "lld"},
- {"nvcsw", "NVCSW", NULL, 0, pvar, 0, POFF(p_uru_nvcsw), UINT64, "lld"},
+ {"nsigs", "NSIGS", NULL, 0, pvar, 0, POFF(p_uru_nsignals), UINT64, "llu"},
+ {"nswap", "NSWAP", NULL, 0, pvar, 0, POFF(p_uru_nswap), UINT64, "llu"},
+ {"nvcsw", "NVCSW", NULL, 0, pvar, 0, POFF(p_uru_nvcsw), UINT64, "llu"},
/* XXX */
{"nwchan", "WCHAN", NULL, LWP, pvar, 0, LOFF(l_wchan), KPTR, "llx"},
- {"oublk", "OUBLK", NULL, 0, pvar, 0, POFF(p_uru_oublock), UINT64, "lld"},
+ {"oublk", "OUBLK", NULL, 0, pvar, 0, POFF(p_uru_oublock), UINT64, "llu"},
{"oublock", "", "oublk"},
/* XXX */
{"p_ru", "P_RU", NULL, 0, pvar, 0, POFF(p_ru), KPTR, "llx"},
@@ -139,7 +139,7 @@
{"pmem", "", "%mem"},
PID("ppid", "PPID", pvar, POFF(p_ppid)),
{"pri", "PRI", NULL, LWP, pri},
- {"re", "RE", NULL, INF127|LWP, pvar, 0, LOFF(l_swtime), UINT, "d"},
+ {"re", "RE", NULL, INF127|LWP, pvar, 0, LOFF(l_swtime), UINT, "u"},
GID("rgid", "RGID", pvar, POFF(p_rgid)),
/* XXX */
{"rlink", "RLINK", NULL, LWP, pvar, 0, LOFF(l_back), KPTR, "llx"},
@@ -159,7 +159,7 @@
NULL, 0, pvar, 0, POFF(p_sigignore), SIGLIST, "s"},
{"sigmask", "BLOCKED",
NULL, 0, pvar, 0, POFF(p_sigmask), SIGLIST, "s"},
- {"sl", "SL", NULL, INF127|LWP, pvar, 0, LOFF(l_slptime), UINT, "d"},
+ {"sl", "SL", NULL, INF127|LWP, pvar, 0, LOFF(l_slptime), UINT, "u"},
{"start", "STARTED", NULL, 0, started},
{"stat", "", "state"},
{"state", "STAT", NULL, LJUST, state},
@@ -174,7 +174,7 @@
{"tty", "TTY", NULL, LJUST, longtname},
{"ucomm", "UCOMM", NULL, LJUST, ucomm},
UID("uid", "UID", pvar, POFF(p_uid)),
- {"upr", "UPR", NULL, LWP, pvar, 0, LOFF(l_usrpri), UCHAR, "d"},
+ {"upr", "UPR", NULL, LWP, pvar, 0, LOFF(l_usrpri), UCHAR, "u"},
{"user", "USER", NULL, LJUST, uname},
{"usrpri", "", "upr"},
{"vsize", "", "vsz"},
diff -r 9ebf245240f3 -r 0087ec7e9adb bin/ps/print.c
--- a/bin/ps/print.c Tue Nov 12 20:11:04 2002 +0000
+++ b/bin/ps/print.c Tue Nov 12 20:31:57 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.71.2.5 2002/07/26 00:03:22 nathanw Exp $ */
+/* $NetBSD: print.c,v 1.71.2.6 2002/11/12 20:31:58 nathanw Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: print.c,v 1.71.2.5 2002/07/26 00:03:22 nathanw Exp $");
+__RCSID("$NetBSD: print.c,v 1.71.2.6 2002/11/12 20:31:58 nathanw Exp $");
#endif
#endif /* not lint */
@@ -302,7 +302,6 @@
if (needcomm) {
name = ki->p_comm;
if (!commandonly) {
- argv = NULL;
argv = kvm_getargv2(kd, ki, termwidth);
if ((p = argv) != NULL) {
while (*p) {
@@ -434,6 +433,8 @@
*cp++ = 'N';
if (flag & P_TRACED)
*cp++ = 'X';
+ if (flag & P_SYSTRACE)
+ *cp++ = 'x';
if (flag & P_WEXIT && !is_zombie)
*cp++ = 'E';
if (flag & P_PPWAIT)
diff -r 9ebf245240f3 -r 0087ec7e9adb bin/ps/ps.1
--- a/bin/ps/ps.1 Tue Nov 12 20:11:04 2002 +0000
+++ b/bin/ps/ps.1 Tue Nov 12 20:31:57 2002 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ps.1,v 1.50.2.4 2002/04/24 04:29:59 nathanw Exp $
+.\" $NetBSD: ps.1,v 1.50.2.5 2002/11/12 20:31:58 nathanw Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
.\" The Regents of the University of California. All rights reserved.
@@ -41,7 +41,7 @@
.Nd process status
.Sh SYNOPSIS
.Nm ""
-.Op Fl acCehjKlmrsSTuvwx
+.Op Fl acCehjlmrsSTuvwx
.Bk -words
.Op Fl M Ar core
.Ek
@@ -99,23 +99,26 @@
scripts will show as
.Dq sh .
.It Fl C
-Change the way the cpu percentage is calculated by using a ``raw''
-cpu calculation that ignores ``resident'' time (this normally has
-no effect).
+Change the way the cpu percentage is calculated by using a
+.Dq raw
+cpu calculation that ignores
+.Dq resident
+time (this normally has no effect).
.It Fl e
-Display the environment as well. The environment for other
+Display the environment as well.
+The environment for other
users' processes can only be displayed by the super-user.
.It Fl h
Repeat the information header as often as necessary to guarantee one
header per page of information.
.It Fl j
Print information associated with the following keywords:
-user, pid, ppid, pgid, sess, jobc, state, tt, time and command.
+user, pid, ppid, pgid, sess, jobc, state, tt, time, and command.
.It Fl L
List the set of available keywords.
.It Fl l
Display information associated with the following keywords:
-uid, pid, ppid, cpu, pri, nice, vsz, rss, wchan, state, tt, time
+uid, pid, ppid, cpu, pri, nice, vsz, rss, wchan, state, tt, time,
and command.
.It Fl M
Extract values associated with the name list from the specified core
@@ -138,13 +141,17 @@
.Tn ID ,
in the default information
display.
-Keywords may be appended with an equals (``='') sign and a string.
+Keywords may be appended with an equals
+.Pq Dq =
+sign and a string.
This causes the printed header to use the specified string instead of
the standard header.
.It Fl o
Display information associated with the space or comma separated list
of keywords specified.
-Keywords may be appended with an equals (``='') sign and a string.
+Keywords may be appended with an equals
+.Pq Dq =
+sign and a string.
This causes the printed header to use the specified string instead of
the standard header.
.It Fl p
@@ -166,8 +173,13 @@
with the standard input.
.It Fl t
Display information about processes attached to the specified terminal
-device. Use an question mark (``?'') for processes not attached to a
-terminal device and a minus sign (``-'') for processes that have
+device.
+Use an question mark
+.Pq Dq \&?
+for processes not attached to a
+terminal device and a minus sign
+.Pq Dq -
+for processes that have
been revoked from their terminal device.
.It Fl U
Displays processes belonging to the user whose username or uid has
@@ -176,7 +188,7 @@
switch.
.It Fl u
Display information associated with the following keywords:
-user, pid, %cpu, %mem, vsz, rss, tt, state, start, time and command.
+user, pid, %cpu, %mem, vsz, rss, tt, state, start, time, and command.
The
.Fl u
option implies the
@@ -185,7 +197,7 @@
.It Fl v
Display information associated with the following keywords:
pid, state, time, sl, re, pagein, vsz, rss, lim, tsiz,
-%cpu, %mem and command.
+%cpu, %mem, and command.
The
.Fl v
option implies the
@@ -224,34 +236,40 @@
the include file
.Aq Pa sys/proc.h :
.Bl -column P_NOCLDSTOP P_NOCLDSTOP
-.It Dv "P_ADVLOCK" Ta No "0x0000001 process may hold a POSIX advisory lock"
-.It Dv "P_CONTROLT" Ta No "0x0000002 process has a controlling terminal"
-.It Dv "P_INMEM" Ta No "0x0000004 process is loaded into memory"
-.It Dv "P_NOCLDSTOP" Ta No "0x0000008 no
+.It Dv "P_ADVLOCK" Ta No "0x00000001 process may hold a POSIX advisory lock"
+.It Dv "P_CONTROLT" Ta No "0x00000002 process has a controlling terminal"
+.It Dv "P_INMEM" Ta No "0x00000004 process is loaded into memory"
+.It Dv "P_NOCLDSTOP" Ta No "0x00000008 no
.Dv SIGCHLD
when children stop
-.It Dv "P_PPWAIT" Ta No "0x0000010 parent is waiting for child to exec/exit"
-.It Dv "P_PROFIL" Ta No "0x0000020 process has started profiling"
-.It Dv "P_SELECT" Ta No "0x0000040 selecting; wakeup/waiting danger"
-.It Dv "P_SINTR" Ta No "0x0000080 sleep is interruptible"
-.It Dv "P_SUGID" Ta No "0x0000100 process had set id privileges since last exec"
-.It Dv "P_SYSTEM" Ta No "0x0000200 system process: no sigs, stats or swapping"
-.It Dv "P_TIMEOUT" Ta No "0x0000400 timing out during sleep"
-.It Dv "P_TRACED" Ta No "0x0000800 process is being traced"
-.It Dv "P_WAITED" Ta No "0x0001000 debugging process has waited for child"
-.It Dv "P_WEXIT" Ta No "0x0002000 working on exiting"
-.It Dv "P_EXEC" Ta No "0x0004000 process called"
+.It Dv "P_PPWAIT" Ta No "0x00000010 parent is waiting for child to exec/exit"
+.It Dv "P_PROFIL" Ta No "0x00000020 process has started profiling"
+.It Dv "P_SELECT" Ta No "0x00000040 selecting; wakeup/waiting danger"
+.It Dv "P_SINTR" Ta No "0x00000080 sleep is interruptible"
+.It Dv "P_SUGID" Ta No "0x00000100 process had set id privileges since last exec"
+.It Dv "P_SYSTEM" Ta No "0x00000200 system process: no sigs, stats or swapping"
+.It Dv "P_TIMEOUT" Ta No "0x00000400 timing out during sleep"
+.It Dv "P_TRACED" Ta No "0x00000800 process is being traced"
+.It Dv "P_WAITED" Ta No "0x00001000 debugging process has waited for child"
+.It Dv "P_WEXIT" Ta No "0x00002000 working on exiting"
+.It Dv "P_EXEC" Ta No "0x00004000 process called"
.Xr execve 2
-.It Dv "P_OWEUPC" Ta No "0x0008000 owe process an addupc() call at next ast"
+.It Dv "P_OWEUPC" Ta No "0x00008000 owe process an addupc() call at next ast"
.\" the routine addupc is not documented in the man pages
-.It Dv "P_FSTRACE" Ta No "0x0010000 tracing via file system"
-.It Dv "P_NOCLDWAIT" Ta No "0x0020000 no zombies when children die"
+.It Dv "P_FSTRACE" Ta No "0x00010000 tracing via file system"
+.It Dv "P_NOCLDWAIT" Ta No "0x00020000 no zombies when children die"
+.It Dv "P_32" Ta No "0x00040000 32-bit process (used on 64-bit kernels)"
+.It Dv "P_BIGLOCK" Ta No "0x00080000 process needs kernel ``big lock'' to run"
+.It Dv "P_INEXEC" Ta No "0x00100000 process is exec'ing and cannot be traced"
+.It Dv "P_SYSTRACE" Ta No "0x00200000 process system call tracing active"
.El
.It lim
The soft limit on memory used, specified via a call to
.Xr setrlimit 2 .
.It lstart
-The exact time the command started, using the ``%C'' format described in
+The exact time the command started, using the
+.Dq %C
+format described in
.Xr strftime 3 .
.It nice
The process scheduling increment (see
@@ -261,11 +279,17 @@
.It start
The time the command started.
If the command started less than 24 hours ago, the start time is
-displayed using the ``%l:%M%p'' format described in
+displayed using the
+.Dq %l:%M%p
+format described in
Home |
Main Index |
Thread Index |
Old Index