From: Keith Bostic Date: Wed, 13 Feb 1991 08:05:59 +0000 (-0800) Subject: delete "rusage" alias; delete -s option; change "trs" to "trss" X-Git-Tag: BSD-4_3_Net_2-Snapshot-Development~1386 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/0f5eb034dfb9ca06cb77987d17aa5a3bd59e944d delete "rusage" alias; delete -s option; change "trs" to "trss" two bugs: sortby needed to be initalized, typo in an error message SCCS-vsn: bin/ps/keyword.c 5.2 SCCS-vsn: bin/ps/ps.1 6.13 SCCS-vsn: bin/ps/ps.c 5.34 --- diff --git a/usr/src/bin/ps/keyword.c b/usr/src/bin/ps/keyword.c index 4632f8d107..3294143ff8 100644 --- a/usr/src/bin/ps/keyword.c +++ b/usr/src/bin/ps/keyword.c @@ -6,7 +6,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)keyword.c 5.1 (Berkeley) %G%"; +static char sccsid[] = "@(#)keyword.c 5.2 (Berkeley) %G%"; #endif /* not lint */ #include @@ -98,9 +98,6 @@ VAR var[] = { {"rssize", "", "rsz"}, {"rsz", "RSZ", NULL, 0, rssize, 4}, {"ruid", "RUID", NULL, 0, pvar, UIDLEN, POFF(p_ruid), USHORT, UIDFMT}, - {"rusage", "", - "minflt majflt nswap inblock oublock msgsnd msgrcv nsigs \ - nvcsw nivcsw"}, {"ruser", "RUSER", NULL, LJUST, runame, USERLEN}, {"sess", "SESS", NULL, 0, evar, 6, EOFF(e_sess), KPTR, "x"}, {"sig", "PENDING", NULL, 0, pvar, 8, POFF(p_sig), LONG, "x"}, diff --git a/usr/src/bin/ps/ps.1 b/usr/src/bin/ps/ps.1 index 04b91d8bff..eae8abb1f6 100644 --- a/usr/src/bin/ps/ps.1 +++ b/usr/src/bin/ps/ps.1 @@ -3,7 +3,7 @@ .\" .\" %sccs.include.redist.man% .\" -.\" @(#)ps.1 6.12 (Berkeley) %G% +.\" @(#)ps.1 6.13 (Berkeley) %G% .\" .TH PS 1 "March 10, 1988" .UC 4 @@ -12,7 +12,7 @@ ps \- process status .SH SYNOPSIS .nf .ft B -ps [ \-aChjlmrSsTuvwx ] [ \-O|o fmt ] [ \-p pid ] [ \-t tty \] [ system ] [ core ] [ swap ] +ps [ \-aChjlmrSTuvwx ] [ \-O|o fmt ] [ \-p pid ] [ \-t tty \] [ system ] [ core ] [ swap ] ps [ \-L ] .ft R .fi @@ -85,10 +85,6 @@ Sort by current cpu usage, instead of by process ID. Change the way the process time is calculated by summing all exited children to their parent process. .TP -\-s -Display information associated with the following keywords: -uid, pid, sig, sigmask, sigignore, sigcatch, state, tt and command. -.TP \-T Display information about processes attached to the device associated with the standard input. @@ -104,7 +100,7 @@ The \-u option implies the \-r option. .TP \-v Display information associated with the following keywords: -pid, state, time, sl, re, pagein, vsz, rss, lim, tsiz, trs, +pid, state, time, sl, re, pagein, vsz, rss, lim, tsiz, trss, %cpu, %mem and command. The \-v option implies the \-m option. .TP @@ -196,7 +192,7 @@ If the command started less than 24 hours ago, the start time is displayed using the ``%l:ps.1p'' format described in .IR strftime (3). If the command started less than 7 days ago, the start time is -displayed using the ``%a6.12p'' format. +displayed using the ``%a6.13p'' format. Otherwise, the start time is displayed using the ``%e%b%y'' format. .TP state @@ -367,9 +363,6 @@ resident set size resident set size + (text size / text use count) (alias rssize) .IP ruid 10 real user ID -.IP rusage 10 -an alias for the following keywords: minflt, majflt, nswap, inblock, -oublock, msgsnd, msgrcv, nsigs, nvcsw and nivcsw. .IP ruser 10 user name (from ruid) .IP sess 10 @@ -398,7 +391,7 @@ control terminal device number accumulated cpu time, user + system (alias cputime) .IP tpgid 10 control terminal process group ID -.IP trs 10 +.IP trss 10 text resident set size (in Kbytes) .IP tsess 10 control terminal session pointer diff --git a/usr/src/bin/ps/ps.c b/usr/src/bin/ps/ps.c index e335981eac..e740d47b13 100644 --- a/usr/src/bin/ps/ps.c +++ b/usr/src/bin/ps/ps.c @@ -12,7 +12,7 @@ char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)ps.c 5.33 (Berkeley) %G%"; +static char sccsid[] = "@(#)ps.c 5.34 (Berkeley) %G%"; #endif /* not lint */ #include @@ -44,7 +44,7 @@ int totwidth; /* calculated width of requested variables */ static int needuser, needcomm; -enum sort { SORTMEM, SORTCPU } sortby; +enum sort { DEFAULT, SORTMEM, SORTCPU } sortby = DEFAULT; uid_t getuid(); char *ttyname(); @@ -53,7 +53,6 @@ char *ttyname(); #define JFMT "user pid ppid pgid sess jobc state tt time command" #define LFMT \ "uid pid ppid cpu pri nice vsz rss wchan state tt time command" -#define SFMT "uid pid sig sigmask sigignore sigcatch state tt command" #define UFMT \ "user pid %cpu %mem vsz rss tt state start time command" #define VFMT \ @@ -137,10 +136,6 @@ main(argc, argv) case 'S': sumrusage = 1; break; - case 's': - parsefmt(SFMT); - fmt = 1; - break; case 'T': if ((optarg = ttyname(STDIN_FILENO)) == NULL) error("stdin: not a terminal"); @@ -159,7 +154,7 @@ main(argc, argv) ttypath = optarg; if (stat(ttypath, &stbuf) == -1) { (void)fprintf(stderr, - "ps: %s: %s\n", strerror(ttypath)); + "ps: %s: %s\n", ttypath, strerror(errno)); exit(1); } if (!S_ISCHR(stbuf.st_mode))