Commit Graph

68 Commits

Author SHA1 Message Date
bde
935c494c4b Fixed imperfections in previous commit (a poor variable name,
excessive 64-bit arithmetic, and excessive changes).
1998-05-31 12:09:50 +00:00
phk
d3d65c6b2e Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
steve
b273678ed2 If no value is present for the login name set it to '-'.
Also pretty-up the display of 'ps -Ortprio'.

PR:		4947
Submitted by:	Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
1998-05-25 05:07:18 +00:00
charnier
cf1a881890 Correct use of .Nm. Add rcsid. 1998-05-15 06:30:58 +00:00
dima
bc6fcbb867 Add 'f' flag to the optstring. 1998-02-18 22:49:58 +00:00
dima
7dfa939b99 cosmetic change for optstring 1998-02-18 22:45:22 +00:00
dyson
1038ea3399 Display VSZ much more accurately now. 1998-02-02 05:16:42 +00:00
dyson
510c87e6e2 Document the new -f flag.
PR:	5196
Submitted by:	Matt Dillon <dillon@best.net>
1997-12-05 07:35:31 +00:00
dyson
e09d7daa42 Add an option to building PS, so that the upages are explicitly paged in only
for users who are root, or in group wheel.  This is useful on large timesharing
systems where a PS command can cause the system to grind to a halt.  The
ability to get the information isn't diminished for those who really need the
additional detail (administrators.)  Normal users won't see any difference unless
the processes are swapped out.  The "really get it mode" is invoked by the
use of an additional flag in the command string "-f".  New/old behavior is
selectable with a compile option.

PR:		5196
Submitted by:	Matt Dillon <dillon@best.net>
1997-12-05 07:33:40 +00:00
jlemon
4113dc3c02 Document correct option in manual page.
PR:		3769
Submitted by:	johnp@lodgenet.com
1997-08-19 21:52:07 +00:00
steve
ccbdaeb2aa Use -I${.CURDIR}/../../sys so that the path is relative
to the source code directory.

Submitted by:	bde
1997-08-13 17:35:00 +00:00
steve
6f3a8cdf64 Oops, add #include's (forgotten in last commit) to make this
compile again.
1997-08-11 02:41:02 +00:00
steve
c0576fc29d Use -I../../sys instead of -I/sys. 1997-08-11 02:36:09 +00:00
steve
2a27aabc95 Remove #ifdef NEWVM code and remove extra "key.name = p" line. 1997-08-11 02:35:16 +00:00
steve
6cd5fcd54b Fix seg fault when invalid keywords are used.
PR:		bin/4253
Submitted by:	Jesse Rosenstock <jmr@ugcs.caltech.edu>
1997-08-11 02:29:50 +00:00
peter
3071fee9c6 Fix "lstart". (Displays "19" rather than time)
PR: 4206
Submitted by: Tetsuya Furukawa <tetsuya@secom-sis.co.jp>
1997-08-03 08:33:17 +00:00
peter
459ed6dfdb Kill #ifndef NEWVM etc. It affected a lot of other things besides
VM structure (eg: credentials etc) and it's highly unlikely we'll ever
get to see the "tainted" BSD<=4.3 VM code in public use.  Although it
indicated the way some things used to be done, it obfuscates things too
much.
1997-08-03 08:25:01 +00:00
bde
dec6f3aeb8 devname.c moved to libc before Lite1 and isn't in ps in Lite2. 1997-07-13 07:43:41 +00:00
charnier
ae2a236f86 Cosmetic change in usage string. 1997-06-06 06:40:06 +00:00
jkh
e2ef6a625f Dynamically adjust size of displayed username to the longest username which
appears, not the longest _maximum_ username (this should probably also go
into 2.2, for the day when we bump up the username length there too).

Submitted-By: Terry Lambert <terry@lambert.org>
1997-04-29 05:26:05 +00:00
jdp
563d27a55f When "-c" is specified, don't pad the command with spaces if it is
the last field on the line.  "ps -axlc" was needlessly wrapping
around on 80-character windows.
1997-04-16 16:08:11 +00:00
imp
054f35c222 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-28 15:24:41 +00:00
guido
b27e3f2aef Fix buffer overflow (probably unexploitable). 1997-03-10 19:10:08 +00:00
ache
264293aa5c Big usernames fixes 1997-03-04 00:33:56 +00:00
ache
648176d7b8 Use MAXLOGNAME-1 for width because MAXLOGNAME includes NUL 1997-03-03 08:20:28 +00:00
peter
83b3c2c161 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
steve
c5d0f9cb39 -Wall cleaning. 1996-12-14 06:08:03 +00:00
hsu
5b38eecfbf Remove unneeded #include <sys/proc.h>. 1996-11-10 06:13:12 +00:00
peter
8fd01a136e Implement a -c option to ps to display the short command name instead of
the full argument vector.

I've bumped into a few things that expected this switch to be present,
the most recent was the snmp package in ports.  I'm not 100% sure of the
origins of this, but Linux has it, so does the "BSD-compatable" version
of ps on our SVR4 systems (so I assume SunOS has it too).
1996-10-21 07:30:26 +00:00
dg
7f56d763c5 Updated to match kernel changes for timer/run queue. 1996-07-31 09:27:23 +00:00
mpp
007afe4849 The default swap device is /dev/drum, not /dev/swap
as ps.1 states.

Submitted by:	Zahemszhky Gabor <zgabor@code.hu>
1996-07-03 22:17:28 +00:00
peter
de937c496c Make %CPU add up closer to 100%.. At least, it now agrees with top.. :-)
Pointed out by: bde
1996-06-29 10:25:31 +00:00
peter
70d631930f Fix (I think) the %MEM count in 'ps -u'. It was bogusly taking the
vm_rssize (in pages, not bytes), then dividing (bogusly) by the page size,
then using that as a fraction of the total pages.
1996-06-29 08:04:05 +00:00
phk
7c53a1f932 CLSIZE -> getpagesize() 1996-05-02 13:06:21 +00:00
phk
4622dbc30b Replace NBPG with getpagesize() 1996-05-02 08:37:16 +00:00
smpatel
bdb7006ab6 Fix up the badly out of date struct proc's p_flags.
Flags aren't printed in hexadecimal, as documented.
1996-04-19 22:23:27 +00:00
mpp
9fcf3504c2 Correct some cross references and some path names. 1996-04-06 09:47:30 +00:00
mpp
3c9b360579 Fix some incorrect locations in the FILES sections of some man pages. 1996-02-02 18:22:04 +00:00
mpp
2b29f1bc1b Use the correct buffer size from limits.h for the error buffer
passed to kvm_open.  Closes PR# 476.

Submitted by:	Jeffrey Hsu <hsu@freebsd.org>
1996-01-20 10:43:54 +00:00
peter
b90ef46a2f oops. I forgot to add the "[-U username]" option to the usage string. 1996-01-12 08:49:43 +00:00
joerg
39d74eed64 Small man page tweaks:
. mention the need for procfs
. make it clear that default sorting is first by ctty, then by PID

Submitted by: schweikh@ito.uni-stuttgart.de (Jens Schweikhardt)
1995-12-30 13:52:02 +00:00
peter
82fea0b00e Implement a new option to ps.. `-U username'. This allows you to
list the processes belonging to a particular user without having to use
`-u' and grepping for the username.  Basically you can now get a short
`ps -x' like list (with more space for the command) for other users.
1995-12-26 03:38:55 +00:00
phk
fe6be261cf I add #include <sys/user.h> 1995-10-28 20:11:18 +00:00
ache
c2d646c037 Change local to LC_ALL, there is no bitmask 1995-10-26 10:57:52 +00:00
torstenb
a31022b303 fix bad dependencies (LIBMATH -> LIBM) 1995-10-25 15:08:21 +00:00
ache
426182c17e Add setlocale LC_CTYPE|LC_TIME 1995-10-23 21:06:31 +00:00
ache
ac2673a0e9 Remove unneded ctype.h 1995-10-23 21:03:40 +00:00
peter
5a3733e33d Correct the alignment of the tty column, which was affected by my change to
allow more than two tty characters.

David Greenman pointed out that when a process that had been revoked from
it's controlling tty, the "-" sign was detached from any two-character
names.
1995-09-26 17:48:59 +00:00
peter
136c23f685 Increase the tty column width from 2 to 3 characters.
This gives us more room to breath with tty names, especially with drivers
that support large numbers of ports..  eg: specialix and digiboard.

This does not actually change the current tty names, it just allows room
for reporting more characters if the drivers use them.
1995-09-04 01:22:54 +00:00