History log of /freebsd-9.3-release/usr.bin/top/machine.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 266289 17-May-2014 bdrewery

MFC r265267:

Fix width/alignment of JID column. Make it support up to the maximum 7-wide
JIDs. On a system using jails for common tasks the JID can quickly increase.


# 266288 17-May-2014 bdrewery

MFC r251630:

Bump the CPU/WCPU column width by one so that it fits values from 100% up to
999.99% CPU.


# 266287 17-May-2014 bdrewery

MFC r265249,r265250,r265251:

- Add -J command/flag to filter by jail name/jid. This will automatically
display the JID as well (the -j command/flag).
- Add a hint for 'u' and 'J' command that '+' displays all.
- Add J command to help.


# 251311 03-Jun-2013 jhb

MFC 248167:
Fix the 'C' field for a running thread to match the behavior described
in the manpage by having it display the current CPU (ki_oncpu) rather
than the previously used CPU (ki_lastcpu). ki_lastcpu is still used for
all other thread states.


# 247483 28-Feb-2013 jhb

MFC 241730: Correct the order of the MFU and MRU labels.


# 239750 27-Aug-2012 jhb

MFC 237646,237656,238020:
- Add a new line to top that provides a brief summary of the ZFS ARC memory
usage on hosts using ZFS. The new line displays the total amount of RAM
used by the ARC along with the size of MFU, MRU, anonymous (in flight),
headers, and other (miscellaneous) sub-categories. The line is not
displayed on systems that are not using ZFS.
- Clarify that the cached file data pages included in the "Wired" count
in top are the BIO-level cached data (i.e. "Buf"), since the previous
phrase was a bit ambiguous with the "Cache" count.


# 234667 25-Apr-2012 kib

MFC r234416:
Fix string buffer overflow when preparing the line of output.

PR: bin/161739


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 224205 18-Jul-2011 jhb

Rework the dynamic per-CPU stats code a bit. Always set 'statics->ncpus'
to the maximum number of CPUs to ensure that lcpustates[] array is always
allocated to the maximum size. Previously, if top was started without
per-CPU stats it would allocate a smaller lcpustates[] array. When
per-CPU stats were then enabled, it would overflow the array and trash
the cpustates_columns[] array causing the CPU stats to be printed in the
wrong locations.

Approved by: re (kib)
MFC after: 1 week


# 224202 18-Jul-2011 bz

Constantly print the command name and if set include the thread
name in per-thread mode.

Discussed with: jhb
Obtained from: Ed Maste at Sandvine Incorporated
Sponsored by: Sandvine Incorporated
MFC after: 1 week
Approved by: re (kib)


# 224199 18-Jul-2011 bz

Rename ki_ocomm to ki_tdname and OCOMMLEN to TDNAMLEN.
Provide backward compatibility defines under BURN_BRIDGES.

Suggested by: jhb
Reviewed by: emaste
Sponsored by: Sandvine Incorporated
Approved by: re (kib)


# 224188 18-Jul-2011 jhb

- Export each thread's individual resource usage in in struct kinfo_proc's
ki_rusage member when KERN_PROC_INC_THREAD is passed to one of the
process sysctls.
- Correctly account for the current thread's cputime in the thread when
doing the runtime fixup in calcru().
- Use TIDs as the key to lookup the previous thread to compute IO stat
deltas in IO mode in top when thread display is enabled.

Reviewed by: kib
Approved by: re (kib)


# 224062 15-Jul-2011 jhb

Revert 130163 and let top use KERN_PROC_PROC when individual threads are
not displayed. The KERN_PROC_PROC sysctl was fixed in 188764.


# 224011 14-Jul-2011 bz

Fix indentation.

Obtained from: Ed Maste at Sandvine Incorporated
Sponsored by: Sandvine Incorporated
MFC after: 3 days


# 223936 11-Jul-2011 jhb

Allow per-CPU statistics to be toggled at runtime via the 'P' key.
While here, make -P a toggle similar to other options such as -I.

Reviewed by: arundel
MFC after: 1 week


# 223841 07-Jul-2011 jhb

Always skip the kernel idle process if requested, it is not specific to
the 'CPU' mode.

PR: bin/158677
Reported by: arundel
MFC after: 3 days


# 222530 31-May-2011 jhb

Add a new option to toggle the display of the system idle process (per-CPU
idle threads). The process is displayed by default (subject to whether or
not system processes are displayed) to preserve existing behavior. The
system idle process can be hidden via the '-z' command line argument or the
'z' key while top is running. When it is hidden, top more closely matches
the behavior of FreeBSD <= 4.x where idle time was not accounted to any
process.

MFC after: 2 weeks


# 222136 20-May-2011 pluknet

Add missing header file.

MFC after: 1 week


# 189626 10-Mar-2009 jhb

Update top and systat for vfs.bufcache now being a long rather than an int.


# 186499 26-Dec-2008 rpaulo

Right align the CPU column header.


# 183526 01-Oct-2008 jhb

Make the CPU column in top always be 2 characters and print in decimal
rather than hex.

Requested by: rwatson


# 182966 12-Sep-2008 sepotvin

Display the sum of the runtime of all the threads in a process when it's
multithreaded instead of picking the time of the first thread found.

Reviewed by: jhb
Approved by: kan (mentor)
MFC after: 1 month


# 178116 11-Apr-2008 ru

system_info.cpustates isn't sparse, so a bitmask of available CPU states
is redundant (I think it's a leftover from an older implementation).


# 178115 11-Apr-2008 ru

Allocate enough memory for pcpu_cp_time[] to stop sysctl() from
writing outside of array bounds. This fully fixes -P display on
i386, where kern.cp_times prints zeroes for non-existing CPUs.


# 178071 10-Apr-2008 ru

Fix "top -P" (`&' mistyped as `&&' and a botched logic).
The bug was unnoticed on non-i386 because mp_maxid is
initialized differently, kern.cp_times doesn't print
zeroes for non-existing CPUs, so no "writing outside of
array bounds" happens.

MFC after: 3 days


# 175779 28-Jan-2008 delphij

Use calloc() when requesting zero'ed memory allocation rather than rolling
our own.


# 175420 17-Jan-2008 peter

Add a -P flag to display per-cpu cpu usage stats.


# 175195 09-Jan-2008 obrien

Improve -u (limit uid lookups) behavior.

Submitted by: David Frascone <dave@frascone.com>
PR: 119490


# 173004 26-Oct-2007 julian

Introduce a way to make pure kernal threads.
kthread_add() takes the same parameters as the old kthread_create()
plus a pointer to a process structure, and adds a kernel thread
to that process.

kproc_kthread_add() takes the parameters for kthread_add,
plus a process name and a pointer to a pointer to a process instead of just
a pointer, and if the proc * is NULL, it creates the process to the
specifications required, before adding the thread to it.

All other old kthread_xxx() calls return, but act on (struct thread *)
instead of (struct proc *). One reason to change the name is so that
any old kernel modules that are lying around and expect kthread_create()
to make a process will not just accidentally link.

fix top to show kernel threads by their thread name in -SH mode
add a tdnam formatting option to ps to show thread names.

make all idle threads actual kthreads and put them into their own idled process.
make all interrupt threads kthreads and put them in an interd process
(mainly for aesthetic and accounting reasons)
rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper'

man page fixes to follow.


# 172207 17-Sep-2007 jeff

- Move all of the PS_ flags into either p_flag or td_flags.
- p_sflag was mostly protected by PROC_LOCK rather than the PROC_SLOCK or
previously the sched_lock. These bugs have existed for some time.
- Allow swapout to try each thread in a process individually and then
swapin the whole process if any of these fail. This allows us to move
most scheduler related swap flags into td_flags.
- Keep ki_sflag for backwards compat but change all in source tools to
use the new and more correct location of P_INMEM.

Reported by: pho
Reviewed by: attilio, kib
Approved by: re (kensmith)


# 170774 15-Jun-2007 bde

Third stage of unbreaking printing of pseudo-nice values (realtime
priorities, etc.) in the NICE field:

Use a combination of pri_native and pri_user instead of pri_level to
guess the original realtime priority. Using pri_level here has been
wrong since 2001/02/12. Using only pri_native here would be correct
if the kernel actually initialized it reasonably. (The kernel exports
its raw td_base_priority as pri_native, but userland mostly wants a
refined base priority). Give up on waiting pri_native to work correctly
and only use it when there is nothing better (for kthreads).

This should reduce printing of bizarre pseudo-nice values. Bizarre
values are still printed if we observe a transient borrowed priority
for a kthread (transient borrowing is the main thing that makes the
raw td_base_priority almost useless in userland), or if there is a
kernel bug. One current kernel bug involves the kernel idprio thread
pagezero permanently changing its priority from PRI_MAX_IDLE (255) to
PUSER (160). Then the bizarre value "ki-6" is printed instead of
"ki31". Here "-6" is PRI_MIN_IDLE - PUSER = -64 truncated to 2
characters. We are observing a transient borrowed priority that has
become permanent due to a bug.

ps/print.c:priorityr() needs similar changes (including ones in stage 2
here).


# 168799 17-Apr-2007 rafan

- Add a new 'j' switch and runtime option to toggle display jail id for
each process.
- While I'm here, keep help message sorted by keys

PR: 98489, 98975
Submitted by: clsung
Approved by: delphij (mentor)
MFC after: 2 weeks


# 168710 14-Apr-2007 stas

- Add new 'a' switch and runtime option that allows 'top' to display process
titles extracted from argv vector instead of the real executable names.
This is useful when you want to watch applications that set their status
information via setproctitle(3).

Approved by: alfred
MFC after: 2 weeks


# 164058 07-Nov-2006 bde

Second stage of unbreaking thr formatting of the NICE field: decode the
priority class and use this to:

- print "-" instead of a garbage value for ithreads. Print "-" instead
of the unused nice value for kthreads which are (mis)classified as
PRI_TIMESHARE. For such threads, the nice value can be set to nonzero
by root, but it is never used (at least by the 4bsd scheduler). For
ithreads, we didn't even print the unused value.

- print "i<priority>" and "r<priority>" instead of a biased "<priority>"
for idletime and realtime threads, Here <priority> is the priority
parameter to idprio/rtprio(1). Just add the prefix and remove the
bias for now. <priority> has been stored indirectly in the kernel
since 2001/02/12, and even the kernel cannot recover the original
value in all cases. Here we need to handle more cases than pri_to_rtp(),
but actually handle fewer cases, and end up printing garbage after
a thread changes its current priority while in the kernel.

- for idletime and realtime threads, if they are kthreads then add a prefix
of "k" to the previous string.

- for idletime and realtime threads, if they in the FIFO scheduling class
then add a suffix of "F" to the previous string (if it fits; the other
parts of the string are sure to fit unless <priority> is garbage).


# 159520 11-Jun-2006 se

Fix display of idle processes, which had been broken since rev. 1.56 of
machine.c. The traditional condition was (pctcpu > 0 || SRUN), but the
negation of the condition logic (from select to skip) made this come
out as (pctcpu > 0 && SRUN), leading to a very erratic display, except
for purely CPU bound processes.

This has been discussed in the mail lists some time ago and I have used
top with this patch on my systems for more than a year without problems
(just forgot to commit it earlier, since my systems were all fixed ...).


# 158282 04-May-2006 bde

Move the formatting of the NICE column to a new function format_nice()
so that it can be more easily unbroken and extended.

Try to use `static', `const' (as appropriate), prototypes declared together,
and parameter names in prototypes for all private functions, not just the
new one.


# 158280 04-May-2006 bde

Fixed some style bugs (mainly missing and wrong splitting of long lines).


# 146343 18-May-2005 keramida

(1) Revert unnecessary indentation changes I committed as part of the
last version and (2) remove a disabled debugging fprintf() that I
accidentally committed here.

Noticed by: simon (2)


# 146342 18-May-2005 keramida

Merge the CPU and WCPU columns in a single %6.2f column, add a new 'C'
command that toggles between the two and update the ORDER_PCTCPU()
macro to sort correctly by the visible "cpu" value.

This saves 6 more columns in 80-column terminals, making things a lot
better for the COMMAND column.

Tested on: i386, sparc64 (panther), amd64 (sledge)
Approved by: davidxu (in principle)


# 146291 16-May-2005 obrien

Hardcode username to 8 characters. This makes top(1) output sane when
there are users on the system (even if not running a single process)
with a login > 8 chars.
I'm not all that happy limiting the username width like this, but it
restores sanity to top(1) output.

Discussed with: keramida


# 145155 16-Apr-2005 keramida

Reduce the width of the THR column to 4 characters, to avoid wrap-around
of lines in SMP machines (which are wider), until we have a better way
of handling window sizes & columns in top.

Caught by: ache, Andre Guibert de Bruet <andy@siliconlandmark.com>
Point hat: keramida


# 145073 14-Apr-2005 keramida

- Add a THR column to the process listing, that shows the number of
threads a process has. The THR column is disabled and disappears
when 'H' is hit, because then every thread gets its own output line.
- Allow sorting processes by "threads".

Approved by: davidxu
Inspired by: Jiawei Ye <leafy7382@gmail.com>


# 144636 04-Apr-2005 stefanf

Include <string.h> and <strings.h> for various functions.


# 133817 16-Aug-2004 alfred

This patch merges the sort fields for both pages, so you can (for
example) view io stats while sorting by process size. Also adds
voluntary and involuntary context-switch stats to the io page because
there was lots of room.

Submitted by: Dan Nelson dnelson at allantgroup.com


# 132955 01-Aug-2004 alfred

Comment some of the 'io' functions.


# 132024 12-Jul-2004 des

Adjust the show_self code (the test got inadvertantly reversed a couple of
revisions ago)

Submitted by: Alex Vasylenko <lxv@omut.org>


# 132015 12-Jul-2004 alfred

Cache a pointer to the old proc (as well as negative cache) to make
computing the io statistics over and over not as expensive.
This is a bit of a cop out, as I should just allocate a struct with
the computed values, but this will do for now.


# 131829 08-Jul-2004 keramida

Build upon the nice work of Alfred and add sorting capabilities to
the -m "io" mode of top.

Approved by: alfred


# 131628 05-Jul-2004 des

Additional preemptive unsigned -> signed casts.


# 131627 05-Jul-2004 des

ki_pctcpu is unsigned, so we cast to long before subtracting.


# 131626 05-Jul-2004 des

Unhealthy amount of manual code cleanup. Some long lines still remain.


# 131623 05-Jul-2004 des

Apply consistent indentation. Long lines will be fixed in a separate
commit.


# 131622 05-Jul-2004 des

Protoize.


# 131621 05-Jul-2004 des

Sort out the #include mess. In particular, do not #include "os.h", since
all it does is provide broken prototypes for standard library functions.


# 131620 05-Jul-2004 des

Mechanical whitespace cleanup.


# 131619 05-Jul-2004 des

My previous commit fixed uid filtering, but broke io mode. Unravel the
process filtering logic to prevent this from happening again.


# 131617 05-Jul-2004 des

Fix selecting processes by uid, which was broken in the previous commit.


# 131412 01-Jul-2004 alfred

Tell what percentage of the total IO a process is doing.
TODO: Show system totals.


# 131402 01-Jul-2004 alfred

New feature, provide a display that shows the amount of IO processes
are doing. Toggle this mode by hitting "m" or passing the command line
option "-m io" to top(1). This allows one to identify disk bandwidth
hogs much easier.


# 131310 30-Jun-2004 alfred

style, remove register.


# 130163 06-Jun-2004 green

Do not use KERN_PROC_PROC with kvm_getproc(3); instead, if only process
(and not thread) scope is to be displayed, use KERN_PROC_ALL and
accrue CPU% ourselves, as the kernel makes no attempt to do so.

Of course, this doesn't make most stats any less bogus when displaying
threaded processes, but at least the CPU time is added up and not just
always 0.00%. There are still issues with SCHED_ULE in top(1) that
cause other processes to display 0.00% CPU when they in fact have used
more.


# 117709 17-Jul-2003 julian

Changes to allow top to decide whether or not to show multiple threads per
process. Option -H enables it and it is toggled at the interactive
screen by 'H'.

Submitted by: Jung-uk Kim <jkim@niksun.com>


# 111002 16-Feb-2003 phk

Remove #include <sys/dkstat.h>


# 104388 02-Oct-2002 jhb

Catch up to SMTX -> SLOCK changes.


# 102412 25-Aug-2002 charnier

Replace various spelling with FALLTHROUGH which is lint()able


# 92922 21-Mar-2002 imp

remove __P


# 84768 10-Oct-2001 bde

Compensate for "Compensate for header dethreading" by backing it out.


# 77553 31-May-2001 tmm

Cast size_t variables before printing them to cope with the case of
sizeof(size_t) != sizeof(int).


# 77098 23-May-2001 phk

We don't need to include <sys/conf.h>


# 76169 01-May-2001 markm

Compensate for header dethreading.


# 76079 27-Apr-2001 jhb

Check the new kern.smp.active sysctl rather than the non-existent
smp.smp_active sysctl to determine if we are running on an SMP machine.


# 74524 20-Mar-2001 tmm

Correct the top memory stats display: convert page counts to kB.

Submitted by: Andrea Campi <andrea@webcom.it>
Approved by: rwatson
Pointy hat to: myself


# 74142 12-Mar-2001 will

Fix top(1) display for SMP systems where the username is longer than 14
characters. This should avoid unattractive wrapping for people who are
stuck in an 80x24 screen. :-)

PR: 22270
Submitted by: William Carrel <williamc@go2net.com>


# 73164 27-Feb-2001 gallatin

- An array of 4 32-bit ints for avenrun doesn't work on the alpha because
fscale is a (64-bit) long. So just use a struct loadavg.
This fixes the recent failure of top on alphas:
top: sysctl(vm.loadavg...) failed: Cannot allocate memory

- use size_t for sizeof() so as to fix a few int/long warnings on alpha

Reviewed by: Thomas Moestl <tmoestl@gmx.net>


# 72951 23-Feb-2001 rwatson

Adapt the top utility to not use kmem_read to retrieve variables now
available via sysctl(). As a result, top should now be able to run without
setgid kmem.

Submitted by: Thomas Moestl <tmoestl@gmx.net>
Reviewed by: freebsd-audit


# 72647 18-Feb-2001 markm

Adjust columns for wide nicenesses in 'top -S'.


# 72377 11-Feb-2001 jake

Catch up to new priority interface.


# 71589 24-Jan-2001 jhb

Catch up to proc flag change.


# 69896 12-Dec-2000 mckusick

Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.


# 69375 29-Nov-2000 jhb

Make use of the full screen width to display p_comm rather than assuming a
hardcoded screen width of 80 chars.


# 69370 29-Nov-2000 jhb

Display the name of the mutex we are blocked on in the state field. To
differentiate mutex names from wait channel names, prefix mutex names with
an asterisk.

Submitted by: Dan Nelson <dnelson@emsphone.com>


# 65557 06-Sep-2000 jasone

Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*(). See mutex(9). (Note: The
alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
preempted (i386 only).

Partially contributed by: BSDi (BSD/OS)
Submissions by (at least): cp, dfr, dillon, grog, jake, jhb, sheldonh


# 53281 17-Nov-1999 davidn

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.


# 53255 17-Nov-1999 bde

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.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 47901 14-Jun-1999 n_hibma

Man pages for top refer to only 2.x, but not to 3.x and later


# 47018 11-May-1999 peter

Tidy up references to <sys/rlist.h> and support for the old swap management
that went away in January.


# 45936 22-Apr-1999 jhay

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>


# 44543 07-Mar-1999 bde

Oops, the test for "no-cpu" was inverted.

Submitted by: Seigo TANIMURA <tanimura@naklab.dnj.ynu.ac.jp>


# 44487 05-Mar-1999 bde

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.


# 43720 06-Feb-1999 fenner

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.


# 43697 06-Feb-1999 dillon

Make 'top' handle case w/ new swapper where no swap is configured


# 43053 22-Jan-1999 dillon

Make top use new kvm_getswapinfo() call.


# 42447 09-Jan-1999 obrien

uptime display more in style with original code


# 41358 26-Nov-1998 bde

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.)


# 41325 25-Nov-1998 dfr

Port top to the alpha.

Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>


# 39075 11-Sep-1998 dt

Some fixes for swap space accounting.

Obtained from: pstat.c


# 38278 12-Aug-1998 wosch

Merge from stable: support for the o, order, command


# 38090 04-Aug-1998 des

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


# 37885 27-Jul-1998 wosch

Round - not cut - the real cpu time.


# 37100 21-Jun-1998 dt

Make value of SIZE accurate.

Obtained from: ps(1)


# 36441 28-May-1998 phk

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


# 33341 14-Feb-1998 peter

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>


# 30130 05-Oct-1997 fsmp

For SMP, add a space between the state name and the CPU#.
Everything following bumps right 1 character.


# 29904 27-Sep-1997 peter

YAMF22: (rev 1.3.2.2) Display realtime and idle priorities appropriately.


# 28819 27-Aug-1997 peter

Adapt to recent smp tree changes..


# 27390 14-Jul-1997 peter

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.


# 27340 12-Jul-1997 peter

Dynamically adapt to smp mode at runtime. This stops the cpu column
appearing on uniprocessor systems since the smp->current merge.


# 25077 21-Apr-1997 ache

Long usernames fixes


# 25032 19-Apr-1997 peter

Tweak column headers a tad for when running in SMP mode.


# 24144 23-Mar-1997 joerg

This commit was generated by cvs2svn to compensate for changes in r24143,
which included commits to RCS files with non-trunk default branches.


# 24143 23-Mar-1997 joerg

This is the FreeBSD-specific files for top, plus the Makefile
that pulls all the files from contrib.

Obtained from: The ports collection (mostly).