Commit Graph

232 Commits

Author SHA1 Message Date
johan
17313dcc19 style.Makefile:
Use WARNS?= instead of WARNS=
2004-02-23 20:05:14 +00:00
deischen
f91f3caef6 Allow the -H option to show threads when selecting by uid, tty,
and pid.
2004-02-22 17:59:31 +00:00
jmallett
88950ad0a0 MFp4 @46705:
Support "uprocp" exactly like "paddr" with the former having been
documented in the manual but not implemented.

PR:		42484
2004-02-08 23:57:19 +00:00
cperciva
b6a1c905a5 Bring ps.1 up to date with changes in the past seven years:
* Remove mention of '>', 'A', and 'S' states
* Mention 'W' state.
* List 'J' state in the correct location.
* Sync with flags in sys/proc.h

Approved by: rwatson (mentor)
MFC after: 7 days
2004-01-21 16:25:36 +00:00
ru
b8e742a388 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
harti
2b65944e78 Implement the nwchan keyword that has been in the man page, but was
not implemented. This is just handy if you want to ddb the address
some process is waiting on.
2003-08-13 07:35:07 +00:00
brueffer
565f56dca7 Clarify that the 'state' information consists of characters, not
only letters (e.g. IWs+)

PR:		55221
Submitted by:	Rich Morin <rdm@cfcl.com>
MFC after:	3 days
2003-08-05 10:31:28 +00:00
markm
2f11ff8443 Get this area compiling with the highest WARNS= that it works with.
Obsolete WFORMAT= junk also removed where possible.

OK'ed by:	obrien
Tested on:	sparc64, alpha, i386
2003-06-13 07:04:02 +00:00
scottl
bfba4c0a13 Add the -H option to ps(1) to display all kernel visible threads in each
process.  The default behavior of showing only the process is retained as
the default.
2003-06-12 16:53:55 +00:00
charnier
d4c5ffd3a1 add section name to .Xr 2003-06-08 09:48:39 +00:00
markm
c25fac616e Fix long constant usage for i386.
Tested by:	Joe Marcus Clarke <marcus@marcuscom.com>
2003-05-03 20:52:48 +00:00
markm
95b3ea00cd Fix a bazillion warnings. This makes almost the whole of src/bin/*
WARNS=6, std=c99 clean.

Tested on:	i386, alpha
2003-05-03 16:39:34 +00:00
obrien
c2ee62a08c fmt.c has a comparison between signed and unsigned that is unclear how
to properly fix.
2003-05-02 01:05:05 +00:00
schweikh
51a35b5696 Fix references to non-existing or obsoleted man pages.
PR:	docs/51480 (only a small part)
Submitted by:	Diomidis D. Spinellis <dds@aueb.gr>
2003-04-30 19:18:50 +00:00
charnier
c238f37631 Revert the zombie part of previous commit 2003-04-15 18:49:20 +00:00
charnier
903355aaa4 Correct style bugs. Don't skip zombies in cputime(), according to Bruce,
zombie CPU times are valid. Adjust array size in strftime(3).

Submitted by:	Bruce
2003-04-14 19:51:36 +00:00
tjr
ee6dd32236 Display residency and sleep times (re and sl fields) larger than 127 as 127.
This is what the manual page says ps should do, and what OpenBSD and NetBSD do.
Based on a patch from Ken Stailey.

PR:		27433, 46232
2003-04-12 10:39:56 +00:00
sobomax
52b7494063 Fix slight disorder that broke sorting. Put in bold warning about the
fact that in this case order matters.

Submitted by:	Peter Edwards <pmedwards@eircom.net>
2003-02-05 19:22:39 +00:00
charnier
a13b219467 Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according to
Solaris man page is the POSIX way.

Reviewed by:	jmallett
2003-02-05 13:18:17 +00:00
jmallett
4493411deb Per-variable\ entry headers, to allow the 'ps -otime -otime=FOO' or similar
case to do the right thing and affect exactly one column.  This is consistent
with GNU ps(1) in BSD mode, and POLA.
2003-01-19 00:31:16 +00:00
jmallett
edceb163e8 When inserting a non-user-specified (e.g. not via -o or -O) format, don't dupe
one that is already there.  This is consistent with GNU ps(1)'s BSD mode, and
POLA.

Reported by:	Andy Farkas <andyf@speednet.com.au>
Tested by:	Andy Farkas <andyf@speednet.com.au>
2003-01-19 00:22:34 +00:00
jmallett
b8175f1cf8 Refer to the process label as proclabel, as there is a function called label,
and that's what these locals were called before.
2003-01-18 03:31:30 +00:00
ru
24514a3504 Fixed the abuses of .Ql visible on stderr in troff mode.
PR:		docs/37176
2002-12-23 16:04:51 +00:00
tmm
5bea1e906c The hw.availpages sysctl has an unsigned long value now, fix the retrieval
to match that.
2002-11-01 23:26:20 +00:00
tjr
24ba94ebfe Do not print a header line if it would be empty; required by 1003.1-2001. 2002-10-31 13:41:37 +00:00
rwatson
b4fe9a0411 Use the MAC interface to list process MAC labels rather than using
the LOMAC-specific interface (which is being deprecated).  The
revised LOMAC using the MAC framework will export levels listable
using this mechanism.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 00:00:57 +00:00
bde
21a9a7bae0 Oops, the previous version was a last minute test version with off_t
replaced by int instead of size_t.

Spotted by:	fanf
2002-10-03 17:19:36 +00:00
bde
79f92c28b5 Use a non-bogus type for representing the values of offsets in structs.
off_t is for offsets in files, and it is signed so it was no better
than the original type of int for avoiding warnings from broken lints,
except accidentally on machines like i386's where size_t is smaller
than off_t.
2002-10-03 15:00:07 +00:00
jhb
b2fafb3737 Catch up to SMTX -> SLOCK changes. 2002-10-02 20:33:52 +00:00
jmallett
3973c574ff List valid keywords, ala kill(1), rather than the csh builtin kill, which
tells people to type kill -l, when no valid ones are specified.

Sponsored by:	Bright Path Solutions
MFC after:	4 days
2002-09-27 01:44:30 +00:00
jmallett
f99d7738fe Ala kill(1), tell people to type 'ps -L' for a list of format keywords.
Sponsored by:	Rachel Hestilow <rachel@jerkcity.com>
MFC after:	2 weeks
2002-09-27 01:40:30 +00:00
jmallett
2c2445961f Rename new PLONG type to PGTOK as the conversion is more important than the
size (which is mostly undefined anyway).

Submitted by:	bde
2002-09-17 17:13:52 +00:00
jmallett
00c425725c Conglomerate printing of ps_pgtok'd data into a PLONG type. I couldn't think
of a better name, except PINT, but I decided to go with assuming LONG to
be safe, rather than assuming INT.
2002-09-17 02:52:44 +00:00
jmallett
c6ebe2c2cb Perform keyword.c:1.27 properly, implement -orss in the New World Order of
ps(1) formatting, using pgtok() to get the value in K, rather than printing
it in pages.  This is consistent with behaviour before keyword.c:1.26 (et al)
which exists in STABLE today, and which uses the same metric as VSZ.

Submitted by:	bde
2002-09-16 20:19:51 +00:00
jmallett
c1c3734ee3 Remove some NOTINUSE stuff. Good housekeeping. 2002-09-16 20:06:04 +00:00
peter
7a36383350 Do not risk using the kernel pgtok() which assumes the page size is
constant.
2002-09-13 07:13:33 +00:00
jmallett
5dda69903b Prevent ps(1) from doing idiotic munging of things in a -ofmt= string.
God I hate the backwards compatability crap here.
2002-09-03 05:44:00 +00:00
trhodes
76af16d03e s/filesystem/file system/ as discussed on -developers 2002-08-21 17:32:44 +00:00
ru
59fe21e369 mdoc(7) police: whitespace nits. 2002-08-09 10:49:50 +00:00
bde
ecfcd4dd65 Fixed a printf format error that was fatal on alphas. Adding WFORMAT=0
to the Makefile didn't affect this bug because WFORMAT only controls
higher- level format checking (not the -Wformat that is implicit in
-Wall).

Fixed a nearby printf format error that was benign and 3 nearby style bugs.
2002-07-11 17:28:29 +00:00
dillon
75a17ac3b1 err() is documented as allowing NULL for the format string but GCC isn't
happy about it any more so change the usage to make buildworld work again.
2002-07-10 20:44:55 +00:00
jmallett
b2da06f09d Bring back WFORMAT=0. 2002-07-08 15:48:39 +00:00
robert
83be44ac06 - Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able to
(-)remove the inclusions of <utmp.h>.
2002-07-08 09:08:51 +00:00
jmallett
14d9dd718e Make printval() take a 'void *' thus negating any assumptions the compiler
may try to make about the alignment of the dereferenced datum.
2002-07-07 21:45:59 +00:00
mike
8913593fc1 Don't depend on pollution in <limits.h> for the definition of
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
obrien
3ba7184ea6 Consistently use FBSDID 2002-06-30 05:15:05 +00:00
sobomax
59ad22bb1f Don't try to decode old-style options if the argv[1] begins with `-' and the
second character represents some option taking an argument. This fixes
problem when ps(1) is invoked for examply as follows:

$ ps -Ufoobar1234

the above example results in option string being interpreted as
-U foobarp1234 - note extra `p'.

Reported by:	Vladimir Sotnikov <vovan@kyivstar.net>
MFC after:	2 weeks
2002-06-20 14:55:53 +00:00
jmallett
d1a89591eb ps(1) appeared in v4
Submitted by:	grog
2002-06-10 22:48:51 +00:00
jmallett
d9de72075a Note early appearence of some commands. These actually appeared in PWB, but
it seems we don't have a macro for that yet, so list them in the first UNIX
release since then that we have a .At for: v7.
2002-06-10 05:03:20 +00:00
jmallett
d774a2a20e Allow whitespace to act as a delimiter in the keywords list given to the -o,
again, but also allow it in the user-specified header, too.  This is far more
backwards compatible and SUSv3-happy than allowing only comma to seperate the
keywords list.

Submitted by:	tjr
2002-06-08 18:11:52 +00:00