Commit Graph

32 Commits

Author SHA1 Message Date
davidn
790f0d443c Reduce max length of user names to 15 characters to reflect reality.
This also prevents the line-wrap and messed up display that occurs
when there happens to be one or more names with 15 chars.
1999-11-17 16:31:51 +00:00
bde
0aaffe32fb Fixed sorting on time. On i386's, time differences of more than 2147
seconds caused overflow.  Use a type-safe but slightly slower comparison.
Comparisons for other fields are still fragile.

Fixed rounding of cputime (don't do extra work to get it slightly wrong
by first converting without rounding to milliseconds).

Removed dead code for setting cputime.

Fixed comments about cputime.
1999-11-17 03:25:54 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
n_hibma
05c69628cc Man pages for top refer to only 2.x, but not to 3.x and later 1999-06-14 12:06:11 +00:00
peter
a470222f84 Tidy up references to <sys/rlist.h> and support for the old swap management
that went away in January.
1999-05-11 14:32:18 +00:00
jhay
e5d86bb31b Fix the display of the "nice" value of processes like ntpd that use the
posix sched_setscheduler() to set their priority.

Noticed by:	Mark Allwright <mallwri@orion.didata.co.za>
1999-04-22 14:34:53 +00:00
bde
367d8e03b5 Oops, the test for "no-cpu" was inverted.
Submitted by:	Seigo TANIMURA <tanimura@naklab.dnj.ynu.ac.jp>
1999-03-07 06:55:47 +00:00
bde
8e66690b56 The magic "no-cpu" cpu number is 0xff. Don't misrepresent cpu
numbers as chars or use bogus casts in an attempt to unmisrepresnt
them.  In top, don't assume that 0xff is the only negative cpu
number when cpu numbers are (mis)represented.
1999-03-05 16:38:13 +00:00
fenner
40cf948f68 Don't dump core when p_stat is not in the expected range. This is
only likely to happen when you have a kernel<>userland mismatch,
but it's really annoying when top dumps core and leaves the terminal
in a mangled state; it's much nicer to print nicely formatted gibberish.
1999-02-06 16:58:50 +00:00
dillon
5fbde81658 Make 'top' handle case w/ new swapper where no swap is configured 1999-02-06 06:33:55 +00:00
dillon
457f999361 Make top use new kvm_getswapinfo() call. 1999-01-22 11:09:41 +00:00
obrien
71ee92a055 uptime display more in style with original code 1999-01-09 20:25:02 +00:00
bde
b197f78fe7 Removed unused nlist'ed variables stathz and hz. These used to be used
to half compensate for broken scaling of p_pctcpu in the kernel, but the
previous commit removed this compensation.  %cpu values will be wrong by
a factor of stathz/hz until the kernel is fixed.  (The kernel gets it
wrong by a factor of stathz/hz, and top got the compensation wrong by
a factor of 100/stathz.)
1998-11-26 12:59:21 +00:00
dfr
fad527cee1 Port top to the alpha.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-11-25 09:45:28 +00:00
dt
a65e8bc6eb Some fixes for swap space accounting.
Obtained from:  pstat.c
1998-09-11 14:38:12 +00:00
wosch
dbdb393361 Merge from stable: support for the o, order, command 1998-08-12 09:58:15 +00:00
des
75a0abfaae Add -t option ('t' in interactive mode) to make top(1) ignore itself.
Attempts to contact the author of top(1) (William LeFebvre) have so
far been unsuccessful.

PR:		7253
Submitted by:	Yours Truly
1998-08-04 14:10:48 +00:00
wosch
5954d8a17c Round - not cut - the real cpu time. 1998-07-27 12:21:58 +00:00
dt
07b5ab38e5 Make value of SIZE accurate.
Obtained from:	ps(1)
1998-06-21 18:00:34 +00:00
phk
69ad703802 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
peter
e06fdf0e8d Fix top sorting of idle processes. top used p_cpticks as a tie-breaker
but that isn't suitable (it gets zeroed each second apparently).

PR: bin/4957
Submitted-by: Dan Nelson <dnelson@emsphone.com>
1998-02-14 13:34:59 +00:00
fsmp
5bd196d0a8 For SMP, add a space between the state name and the CPU#.
Everything following bumps right 1 character.
1997-10-05 21:20:56 +00:00
peter
ed6105d8ca YAMF22: (rev 1.3.2.2) Display realtime and idle priorities appropriately. 1997-09-28 00:59:04 +00:00
peter
f4d76fa2a9 Adapt to recent smp tree changes.. 1997-08-27 03:48:25 +00:00
bde
623d389659 Added top.1 to CLEANFILES. 1997-07-21 16:06:00 +00:00
peter
24dc1d05f1 Hack to work around the large username field... scan for the largest
username present on the system at startup and use that for the field width.
It's not ideal but (I think) better than it was before.  The width is
limited to within 8..16.
1997-07-14 09:06:46 +00:00
peter
90f9237552 Dynamically adapt to smp mode at runtime. This stops the cpu column
appearing on uniprocessor systems since the smp->current merge.
1997-07-12 10:51:54 +00:00
ache
4928a62e62 Long usernames fixes 1997-04-21 13:53:47 +00:00
peter
e40e7bf4d7 Tweak column headers a tad for when running in SMP mode. 1997-04-19 20:28:50 +00:00
peter
a404eaeab5 move top.1 -> top.local.1, and generate top.1 so that the man page
is remotely useful
1997-04-05 22:05:46 +00:00
ache
249c412418 Remove libcurses, it is pure termcap application 1997-03-24 14:29:46 +00:00
joerg
fa71779225 This is the FreeBSD-specific files for top, plus the Makefile
that pulls all the files from contrib.

Obtained from:	The ports collection (mostly).
1997-03-23 18:55:20 +00:00