Merge branch 'vendor/OPENSSL'
[dragonfly.git] / contrib / top / Changes
1 Tue May  6 2008 - wnl (3.8beta1)
2         Main code: fixed bugs in screen_cleareol and in display code. Fixed
3         bug in i_swap when all data is 0.  Added ^W patch (from thaquis).
4         Fixed bug in xdprintf.  Added command line options for the "t" and
5         "m" commands.
6         SunOS 5 changes:  Support for showing individual threads.  Redid
7         allocation of prpsinfo structures.  Added a pidthr hash that uses
8         both pid and thread id for a key. Changed format_process_header
9         and format_next_process to use a table-driven method for generating
10         the columns.  Status files from /proc (psinfo and lpsinfo) are now
11         cached to avoid repeatedly reopening them.  Column showing number of
12         LWPs is now called "NLWP" and column showing lwpid is "LWP".
13         FreeBSD changes: Runtime check to ensure binary is running on
14         the same machine type it was compiled for.  Lots of cleanup and
15         changed nearly everything to use sysctl rather than kvm, and
16         inability to open kvm is no longer fatal. Improved thread reporting:
17         disabled for 7.x and lower.  Added lwpid hash for proper tracking
18         of threads.  Changed format_process_header and format_next_process
19         to use a table-driven method for generating the columns.
20         Dec Alpha: configure uses compile-time options to properly trap
21         and handle exceptions from the Alpha FPU (from Brian Maly).
22
23 Tue Feb 26 2008 - wnl (3.7)
24         Prepare for version 3.7 release.
25
26 Fri Feb  1 2008 - wnl (3.7beta4)
27         Using the $ notation in printf formats for freebsd apparently was
28         causing problems on 64-bit systems. All such usage has been
29         removed and the process line is formatted piecemeal.
30
31 Thu Dec 27 2007 - wnl (3.7beta3)
32         Improved function comments in display.c for message_error functions.
33         Changed some of the error messages in top.c to be more succint.
34
35 Fri Dec  7 2007 - wnl (3.7beta3)
36         Changes to freebsd port: moved some functions up front to
37         eliminate forward references. Use sysctl to get all vm stats
38         information, as some of this isn't updated in the struct
39         vmmeter under FreeBSD 7.0.  Added routines to support large-scale
40         sysctl access.
41
42 Wed Nov 28 2007 - wnl (3.7beta3)
43         Changes to documentation: FAQ, README, man page.
44
45 Tue Nov 27 2007 - wnl (3.7beta3)
46         For freebsd, added page faults, pageins, pageouts, and pages
47         freed to the kernel display line.  These numbers reflect the
48         values presented in vmstat.  For sunos5, added page faults,
49         pageins and pageouts to the kernel display line.
50
51 Fri Nov  2 2007 - wnl (3.7beta3)
52         Added copyright notices to the top of every source and include file.
53         Added copyright information to the man page.
54         Removed a few outdated things from the manifest.
55         Minor changes to sigconv.awk. 
56
57 Sat Oct 27 2007 - wnl (3.7beta3)
58         Added check for sys_signame at configure time and if it is
59         present then it is used in commands.c to translate signal names
60         in to numbers.
61         Added alternate snprintf and vsnprintf functions from apache (in
62         ap_snprintf.c).  Added configure magic to define and compile them in
63         where needed.  Added check to configure for variadic macros.
64         Preprocessor defintion of dprintf (in utils.h) now depends on
65         support for variadic macros.  Cleaned up m_linux code.
66
67 Wed Oct  3 2007 - wnl (3.7beta3)
68         Lots of changes, thanks to Mark Wong.  Most changes were to
69         clean the code up so that it would compile cleanly with -Wall
70         (all warnings).  Changed function names in screen.c so that
71         they all start with "screen_".  Isolated all interaction with
72         termcap to screen.c by adding a real function for cursor
73         addressing (in the past it was just a macro).  Only screen.c
74         now needs to worry about defining templates for the termcap
75         functions.  Added configure and preprocessor magic to ensure
76         that all the termcap functions used in the code are defined
77         with templates.  Changed names of some other functions and
78         global variables to avoid name conflicts with functions in
79         curses and other well established libraries.  Changed dprintf
80         macro to use variadic arguments so that the preprocessor can
81         gobble up the entire call when compiling without debugging
82         (this will have to be made more portable). All include files
83         are surrounded by #ifndef statements to accomodate multiple
84         inclusions.  Platform module is now compiled with
85         -fno-strict-aliasing as some of the modules do type punning
86         that can confuse the optimizer.
87
88 Wed Sep 26 2007 - wnl (3.7beta3)
89         For freebsd, priority is no longer normalized by PZERO.  This
90         contradicts the behavior used by ps when it displays priority.
91         But normalizing by PZERO has become a bit of an anachronism
92         and it actually obscures the meaning of the priority without
93         adding any real value.
94
95 Wed Sep 19 2007 - wnl (3.7beta3)
96         Many changes to improve the display of threads.  Changed
97         process summary line to use the word "threads" when showing
98         individual threads.  Added the system command to toggle the
99         display of system processes.  Fixed bug in hash.c remove_pos.
100         For freebsd: count threads correctly when they are being
101         displayed, nice column is more closely in line with ps
102         (nothing fancy for real time processes), add two more process
103         states that didn't exist in older releases of freebsd (wait
104         and lock).
105         For linux: Threads done right.  Now track individual threads
106         of multi-threaded processes separately so that we always know
107         their %cpu.  Switch to format_process_header so that we can
108         change the column headings and remove the THR column when
109         displaying individual threads.  Switched process (and thread)
110         tracking over to use generic hash table functions included
111         with the new version of top.  Process states and total now
112         include threads when they are being shown. Added "SHR" column
113         to show the amount of shared memory per process. Improved
114         calculation of elapsed time and percent cpu to avoid
115         overflows. Remove weighted cpu calculations entirely as it is
116         an anachronism.
117         For Solaris: Moved check for libelf to accomodate older systems.
118         
119 Sun Sep  9 2007 - wnl (3.7beta2)
120         Documentation changes.  Fixes to sunos5 port.  Added display of
121         thread count and selection by command name to linux port.  Removed
122         the use of inline functions from hash.c as that doesn't appear to
123         be very portable.
124
125 Wed Sep  5 2007 - wnl (3.7beta1)
126         Fixed freebsd and linux configuration bugs.  Added configuration
127         options for tweaking program defaults.  Rewrote top level code
128         (top.c) from scratch, including command handling so that adding
129         new commands is much easier.  Changed message-line handling to
130         ensure that the message is displayed for at least 5 seconds
131         regardless of the update frequency.  Added a "miniupdate" that
132         occurs one second after the initial screen on systems that don't
133         already delay the first screen.  The mini-update shows cpu state
134         percentages.  Added ability to select output by command name on
135         some systems.  Fixed color toggling via the "C" command.  Added
136         long options via getopt_long to complement the existing single
137         character options.  Added the freebsd "m" command to chose
138         alternate display modes.  On freebsd this gives a process i/o
139         display.  Added the freebsd "H" command to select the display of
140         individual threads.  Added "-a" option ("all") to set number of
141         displays and number of processes to infinity (equivalent to
142         "-d all all").  Added dual architecture compilation for Solaris
143         to generate both a 32-bit and a 64-bit binary.  This is on by
144         default when compiling on a 64-bit system and can be explicitly
145         set via "configure --enable-dualarch".  Added uniform hashing
146         functions that use bucket hash for uint, pid, and string.  Changed
147         username.c and the sunos and freebsd modules to use these functions.
148         Added the "kernel" information line to the display to show
149         statistics on what the kernel is doing (context switches, forks, 
150         traps, etc.).  This requires explicit support by the platform
151         module, currently only freebsd, linux, and sunos.
152
153 Wed Apr 18 2007 - wnl (3.6.1)
154         Fixed a few bugs in sigconv.awk that were causing incorrect
155         results on FreeBSD.  Changed configure.ac to fix a few linux
156         problems: signal include file and /proc/1/stat.
157
158 Fri Apr 13 2007 - wnl (3.6.1)
159         Removed the use of VPATH for compiling the system module and used
160         an explicit dependency in the Makefile instead.  VPATH is now set
161         to just srcdir to ensure that top will compile correctly when
162         configured from a different directory.  On systems without VPATH
163         support, top will still configure and compile, but only
164         from within the source directory.  This fixes bug 1699526.
165
166 Fri Feb  2 2007 - wnl (3.6.1)
167         Revised the way that configure figures out owner, group, and mode.
168         For systems that don't use the kernel, it tries to match install
169         settings to allow access to stuff in /proc.  More importantly, if
170         mode is 755 then neither owner nor group are set.  This fixes bug
171         1631136.  Added patch from haanjdj@xs4all.nl to fix an occasional
172         core dump in m_decosf1.c.  This checks return code from task_threads.
173         Made sure all get_system_info functions are declared void.  Fixed
174         string termination bug.  Cleaned up documetation for sunos5.
175
176 Tue Aug  8 2006 - wnl (3.6.1)
177         For Solaris, changed the tag "swap" to "total swap" to clarify
178         what is beign displayed.  Note that the calculations are still the
179         same: the display is just showing total rather than total - free.
180
181 Thu Apr 27 2006 - wnl (3.6)
182         Added patches for linux-style sort shortcuts and for Unixware
183         support in configure (patch 1474427).  Fixed sunos5 to do slow start
184         and to ensure cpucount is set (patch 1477386).  Added pagination
185         routines to display.c and modified show_help to use it, since the
186         help screen is now longer than 24 lines.  Applied patch for unixware
187         support that adds check for mas library (patch #1474423).  Solaris
188         cpu percent now reflects a percentage of the entire server, rather
189         than a single cpu (bug 1478138).
190
191 Mon Mar 27 2006 - wnl (3.6)
192         The production release of version 3.6.  Fixed a minor scaling
193         bug in the decosf1 module.  Support for MacOS X is officially
194         withdrawn although the macosx module is still part of the
195         distribution.  Hopefully this is a temporary situation.
196         Documentation updated.
197
198
199 Wed Feb 15 2006 - wnl (3.6beta5)
200         Minor changes to eliminate warnings from the Sun Studio compiler.
201         These were mostly sloppy argument declarations.  I also added
202         message.h to provide an interface file for just the message
203         related functions of display.c.
204
205 Mon Dec 26 2005 - wnl (3.6beta4)
206         Added new netbsd module, courtesy of Simon Burge.
207         Fixed a few bugs in SVR4 module and added its use to
208         configure.ac, thanks to Sanchet Dighe.  Also ensured that the
209         novpath Makefile was in the distribution.
210         Fixed portability problem in display.c
211
212
213 Mon Oct 24 2005 - wnl (3.6beta3)
214         Set up a color tagging mechanism in color.c to allow for the
215         dynamic creation of tag names to contol color highlighting.
216         These names are partially derived from the tags used to label
217         memory and swap information on the screen, thus are driven by
218         the machine module itself.  Added -T option to list color 
219         highlighting information.  Help screen now includes the actual
220         list of sort order names.  Incorporated some minor fixes to
221         the main code from the Freebsd source tree.  Fixed bug #1324582.
222         Freebsd 5: removed WCPU column and added THR column.  Display
223         for freebsd 4 and earlier unchanged since they don't track
224         threads in the kernel.  Added LICENSE file to distribution.
225
226 Wed Oct 12 2005 - wnl (3.6beta2)
227         Major overhaul to display.c.  All lines of the display are
228         directly tracked and controlled via display_write and its
229         companion display_fmt.  Added support for complete control
230         of ANSI color on the screen: this will be used in the future
231         to allow for full use of color everywhere on the screen.
232         Signal handling code now uses sigaction on all systems that
233         support it.  Restored the freebsd module and did away with
234         freebsd4, and upgraded freebsd module to support 5.x.
235         Fix bug #1306099 (wio(wait) timer ignored on OSF1).
236
237 Fri Sep 23 2005 - wnl (3.6beta1)
238         Fixed bugs #1266341 (compilation errors with gcc 4.x),
239         #1156464 (cpu% field for sunos), #1156243 (compilation
240         errors on AIX).  Applied patches #1217855 (Solaris 10
241         xarch flag).  Overhaul of sunos5 module, making code more
242         efficient and easier to follow.  Got rid of need for MEMTYPE
243         type in utils.h.  Changed all memory statistics data in the
244         module specification from an int to a long to better support
245         64-bit systems with lots of memory. Moved all unused modules
246         out of the distribution (I will add them back in as needed).
247         Moved freebsd module to freebsd4 as it won't work with 5.x
248         (a new module will be necessary). Added support to configure
249         for makes that don't understand VPATH. Updated documentation:
250         man page, FAQ, README, INSTALL.
251
252 Mon Jan 24 2005 - wnl (3.6alpha10)
253         Updated aix43 module with ANSI function declarations and fixed
254         declaration of get_system_info.  Configure now uses irixsgi
255         module for irix6* systems.  Updates to the following modules:
256         irixsgi, sunos5.  Fixed null pointer bug in color.c. Removed
257         some useless code and definitions in display.c
258
259
260 Sun Nov 28 2004 - wnl (3.6alpha9)
261         Replace AIX 5 module with alternate (bug 1056565).
262         Fixed vulnerability in use of snprintf.
263
264 Fri Oct 22 2004 - wnl (3.6alpha8)
265         Support for linux 2.6, added more stuff to memory and swap lines.
266         Updated linuxthr module, which is only useful on 2.4 and earlier.
267         Added some color support back in (feature request 930588), but
268         still need to add it back to the per-process display.  Added
269         OSF 5 support (untested).
270         Fixed bug 1017951 (invalid process count argument not caught)
271
272 Tue Apr 20 2004 - wnl (3.6alpha7)
273         Added 64 bit support for AIX.
274
275 Thu Apr 15 2004 - wnl (3.6alpha6)
276         Included fixes for decosf1 pid size and updated module.  Also
277         added osf1 to list of recognized operating systems in configure.ac.
278
279 Tue Mar 30 2004 - wnl (3.6alpha5)
280         Minor bug fixes and some code rearrangement.  Changes to install
281         rule.  Added several more platforms including: aix 4.2 thru 5,
282         MacOS 10, Dec OSF, HPUX 7 thru 11.  Fixed the core dumping bug
283         in linux.  Code cleanup, including sigdesc.h (by changing
284         sigconv.awk).  Startup error messages are displayed on the
285         first screen rather than beforehand (no more pause).  Cleaned
286         up interrupt handling to avoid a race condition.  Eliminated
287         top.local.h.  REMOVED Configure!!!
288
289 Mon Mar 22 2004 - wnl (3.6alpha1)
290         Now using gnu autoconf.  Eliminated the need for CFLAGS and LIBS
291         tags in the module source files.  Autoconf tries to figure all
292         that out now.  Machine module interface now uses flags to determine
293         if module supports sorting, selective display of idle processes,
294         viewing full commands.  Added display of uptime for modules that
295         support it.  Added display of full command lines for modules that
296         support it.  3.5 modules must be changed a bit to work for 3.6:
297         ORDER is no longer defined, and the module must fill in the
298         appropriate fields in struct statics to get the extra features.
299         Added a extenstion interface to allow for putting extra stuff
300         on the screen -- this is still half baked and not documented.
301
302 Mon Feb 23 2004 - wnl (3.5)
303         Turned rc1 in to version 3.5.  Only changes were to the FAQ.
304
305 Mon Feb  2 2004 - wnl (3.5rc1)
306         Changed format_k (utils.c) to use MEMTYPE for its parameter.
307         On most systems this is a long, but if the module defines 
308         USE_SIZE_T, this is set to be a size_t.  The sunos5 module
309         now defines it, so that it will work correctly on 64-bit
310         machines.  New "linuxthr" module for rolling up processes
311         that are really threads.  Configure autodetects when running
312         on a 64-bit Solaris machine.
313
314 Tue Dec 16 2003 - wnl (3.5beta13)
315         Improved linux module.  For Solaris, changed "THR" column
316         heading to "LWP" since that's what they really are.
317
318 Thu Mar 30 2000 - wnl (3.5beta12)
319         Updated modules: m_aix41.c, m_aix43.c, m_mtxinu.c, m_sco5.c,
320         and m_ultrix4.c.
321         Included m_irixsgi.c from some source that's been floating around
322         SGI.  Don't yet know how it compares to m_irix62.
323
324 Fri Mar 10 2000 - wnl (3.5beta11)
325         top.c: avoid potential loop if stdout gets closed, use macro
326         for p_active to avoid collision with system macros.
327         m_sunos5: widened some fields to accomodate 5.8.
328         m_decosf1: added ordering support
329         m_irix62_64: provides 64-bit module based on m_irix62.
330         m_irix62: skip bogus files in /proc directory
331         m_svr42MP and m_svr5: complete replacement with updated copies
332         m_mtxinu: complete replacement with updated copies
333         m_aix43: new module for 4.3
334         getans: replaced with a Bourne shell script
335
336 Mon Mar  6 2000 - wnl (3.5beta10)
337         m_sunos5.c: workaround for curses bug: ensure that TERMINFO has
338         a value.
339
340 Fri Jan 15 1999 - wnl (3.5beta10)
341         top.c: now check return code from read to avoid looping on eof.
342         top.c: delay of 0 now only valid for root.
343         decosf1.c: patches from Rainer Orth should fix most of the
344         problems with this module (including the display of certain
345         processes and runtime errors).
346         sunos5.c: Rainer insisted on putting the slash back in the
347         state field ("run/4") and widened the field to accomodate it.
348         aix.c: widened PID field for 6-digit pids (shortened NICE field)
349         module macosx added, thanks to Andrew Townley.
350
351 Fri Dec 18 1998 - wnl (3.5beta9)
352         Configure checks status of "make" and complains if it fails.
353
354 Thu Dec 17 1998 - wnl (3.5beta9)
355         Added module sco5 from Mike Hopkirk.
356         Added module netbsd132 from moto kawasaki.
357
358 Sun Oct 25 1998 - wnl (3.5beta9)
359         Added Casper's patches for sunos5 for the following:
360         produce same results as swap -s (5.5 and higher),
361         don't use system_pages kstat when /dev/kmem can be opened,
362         skip . and .. when reading /proc, replace use of SOLARIS24
363         with OSREV.
364
365 Fri Sep 11 1998 - wnl (3.5beta9)
366         Added workaround to getans for the absence of $< in SCO Unix.
367
368 Wed Jul  1 1998 - wnl (3.5beta9)
369         Changed structure member "errno" to "errnum" in commands.c.
370         Replaced hpux10 module with one from John Haxby.
371
372 Fri Apr 17 1998 - wnl (3.5beta8)
373         Moved definition of _KMEMUSER earlier in m_sunos5.c.  This should
374         fix the compilation problem with gnu 2.7.2.3, obviating the need
375         for the fixinc.svr4 patch, but hopefully will not affect anything
376         else.
377         Added -DORDER to m_sunos4mp.c
378
379 Tue Nov 18 1997 - wnl (3.5beta7)
380         Added gcc 2.7.2.3 patch for fixinc.svr4 and changed INSTALL and
381         FAQ to refer to it.
382         Added NetBSD HP9000 fix.  Hopefully it doesn't break other 
383         NetBSD platforms.
384
385 Fri Oct 24 1997 - wnl (3.5beta7)
386         Modified m_dcosx.c to change uses of procdir to xprocdir, avoiding
387         a name clash with an include file (Bryn Parrott)
388
389 Sat Oct 11 1997 - wnl (3.5beta6)
390         Incorporated Casper's patches for Solaris 2.6 and for the multi-
391         processor bug ("kstat finds too many cpus").
392
393 Sun Jan 20 1996 - wnl (3.5beta5)
394         Fixed Casper's m_sunos5 module: there was a poor interaction with 
395         his use of OSREV and SunOS 5.5.1.
396
397 Fri Dec 20 1996 - wnl (3.5beta4)
398         Replaced m_sunos5 with a reworked version by Casper Dik.  This one
399         should work under 2.6 and may not require that top be run setuid
400         to root under 2.5 or 2.6.  This also fixed a bug in m_sunos5 that
401         was introduced in beta3.
402         Fixed calculation of OSREV in Configure.
403
404 Wed Nov 20 1996 - wnl (3.5beta3)
405         Incorporated contributed fixes to:  bsdos2, irix62, freebsd20,
406         ultrix4, sunos5.  Changed calculation of swap area in sunos5 (now
407         uses swapctl).  sunos5 now understands idled processors.  Changed
408         Configure to determine os revision using uname (when available)
409         and adding it to machine.c compiliation in Makefile as -DOSREV.
410         Changed calls to "exit" in modules to use "quit" instead.
411
412 Oct 20 1996 - wnl (3.5beta3)
413         Removed "time" from list of ordering choices:  there's no easy way
414         to get cpu time for all processes (it's in the u area).
415
416 Fri Oct 18 1996 - wnl (3.5beta3)
417         hpux10 and hpux9: using a better means for determining when a
418         process is idle.
419         decosf1 now includes utils.h.
420
421 Fri Sep 13 1996 - wnl (3.5beta2)
422         Fixed Configure to build Make.desc in such a way that doesn't
423         require a long argument to sed.
424
425 Thu Sep 12 1996 - wnl (3.5beta2)
426         Fixed bug in display.c that affected empty cpustate names.
427         Created hpux1010 module - a variant of hpux10 that does not use
428         struct proc or struct user (suitable for HP/UX 10.10).
429
430 Wed Sep 11 1996 - wnl (3.5beta2)
431         Changes to sunos5 module:  Removed WCPU column since it is meaningless
432         on a SVR4-based system.  Added THR column to show number of threads
433         for each process.  This was not straightforward: the information is
434         not stored in prpsinfo but rather in prstatus.
435
436 Tue Sep 10 1996 - wnl (3.5beta1)
437         Added patches for sunos4mp to provide order support.
438         Added irix62 module.
439         Changed prime.c to include stdio.h for printf prototype.
440         Added conditional code to os.h and utils.c to handle systems
441         where sys_errlist is defined in stdio.h (such as NetBSD).
442
443 Mon Sep 09 1996 - wnl (3.5beta1)
444         Removed tar and shar rules from Makefile.X -- don't need them anymore.
445         Added -v option to display version number.  Updated man page.
446
447 Thu Aug 29 1996 - wnl (3.4)
448         Replaced modules (from Tim Pugh): next 32, next40.
449         Fixed bug in username.c: hashing negative uids.
450
451 Thu Aug 22 1996 - wnl (3.4beta3)
452         Patched modules:  ultrix4, sunos4, sunos5, utek, decosf1, irix5.
453         Added modules: next40, next32.
454         Fixed procstates update bug in display.c.
455         Fixed divide by zero bug in utils.c.
456         Fixed bad number in layout.h
457         Minor fixes to Configure.
458         Complete overhaul of FAQ.
459
460 Tue Feb 13 1996 - wnl (3.4beta3)
461         Added convex module from Warren Vosper (originally written by
462         William Jones).
463
464 Tue Feb 13 1996 - wnl (3.4beta2)
465         Fixed format_k in utils.c to calculate K and M values correctly.
466         Added check for gigabyte values ('G').  Changed sumamry_format
467         in display.c to use format_k where appropriate.
468         Changed creation of distribution tar file to place everything in
469         a top level directory.
470
471 Tue Jan 30 1996 - wnl (3.4beta2)
472         Added m_aix41 module.  Added new tag type to module comments:
473         TERMCAP, which defined the library to use for a termcap library.
474         If no TERMCAP tag is found in the module's initial comment, then
475         Configure will default to "-ltermcap".  AIX needs this since it
476         put all the termcap routines in libcurses(!)
477
478         Added m_bsdos2 (found lingering in my mailbox).
479         Updated m_svr4 to include support for NCR multiprocessors.
480         Fixed small bug in utils.c
481
482 Thu Jan 25 1996 - wnl (3.4beta1)
483         Fixed m_sunos5 invocation of gettimeofday to include "NULL" as
484         second argument.  This provides compatability with the Posix-
485         compliant template provided with SunOS 5.5, but doesn't hurt
486         previous versions since they do bother with a template for that
487         function.
488
489         Made changes (recommended by net users) to hpux10, ultrix4,
490         netbsd10, aux3 (replaced aux31).  Added module for linux.
491
492 Fri Oct 10 1995 - wnl (3.4beta1)
493         Added user-contributed modules for SCO Unix, IRIX 5, HP/UX 10,
494         Pyramid DC/OSX.  Changed Configure so that it runs in environments
495         whose c-shells have no 'eval'(!).  Added support for multiple sort
496         ordering methods via the -o switch.  This option requires support
497         from the machine dependent module: such support was added to
498         sunos5 (thus sunos54) and sunos4.
499
500         display.c:  Changed CPU states display line to shorten the leading
501         tag if the data won't fit in the current width.  Fixed a divide-by-
502         zero bug that affected ultrasparc servers (and potentially other
503         systems).
504
505         m_sunos5.c: Now asks the system for the correct pagesize rather than
506         assuming it is 4K.
507
508 Thu Mar  2 1995 - wnl (3.3 RELEASE)
509         Added module netbsd10 and renamed netbsd to netbsd08.  Changed
510         Configure so that it does not use an initial default module name.
511         Made other compatability fixes to Configure.  Added comments to
512         decosf1 concerning optimizer bug.  Other documentation changes.
513         Added use of "prime.c" to Configure script.
514
515 Tue Feb  7 1995 - wnl (3.3beta6)
516         Still one more beta....
517         Fixes for sunos5 2.4 gcc core dump (it was an alignment problem).
518         Fixed and improvements for decosf1 (including use of format_k
519         for proper SIZE column formatting).  Added modules freebsd20 and
520         ncr3000.
521
522 Thu Feb  2 1995 - wnl (3.3beta5)
523         One more beta....
524         Fixed a few bugs in the sunos5 port pertaining to casting and
525         very large memory counts.  Added "ifndef HAVE_GETOPT" to getopt.c
526         to provide for conditional compilation of the getopt function.
527         Those systems that have getopt in libc can add -DHAVE_GETOPT to
528         the CFLAGS line in the module to prevent the function from being
529         compiled.  Added sunos54 module to accomodate SunOS 5.4
530         peculiarities.  Added module for aux3.1.
531
532 Wed Jan  4 1995 - wnl (3.3beta4)
533         This is really taking too long......sigh.
534         Fixed SIGWINCH handling once and for all.  It now remembers the
535         number of processes you want displayed even thru window resizes.
536         Fixed buffer conflict in utils.c (itoa and itoa7).
537         Lots of small improvements to the various modules were made over
538         the past month: too numberous to list here.  SunOS 5 module made
539         more secure thru use of seteuid calls (other SVR4 modules should
540         be modified similarly).  One final MP fix to sunos5, too.  Module
541         for decosf1 was modified to accomodate V3.0.
542
543 Mon Apr 18 1994 - wnl (3.3beta3)
544         I think I finally got a sunos5 module that will work on MP
545         machines.  Fixed cpu states figure in osmp41a so that 
546         percentages never exceed 100%.  Added shell script "install"
547         since Unix vendors can't seem to make up their minds on what
548         options they want to use for the one that comes with the OS.
549         Added netbsd modules from Christos.  Fixed lots of other little
550         things over the past few months that I have long since forgotten.
551
552 Wed Dec 15 1993 - wnl (3.3beta2)
553         Added module patches from various users:  hpux9, sunos5.
554         Fixed bug with batch mode (screen_width wasn't getting set).
555         Changes to accomodate 64 bit machines.
556         Fixed some bugs in command parsing ("renice 19 " did something
557         unexpected).
558
559 Mon Aug 30 1993 - wnl (3.3beta)
560         Added lots of little patches from various users.
561         Added routines to utils.c for intelligent formatting of kilobytes
562         and time.  These are intended to be used in the modules when
563         formatting a process line.  Added code to "summary_format" in
564         display.c to do intelligent formatting of memory quantities.
565         Redid display.c to allow for varying line widths and dynamic
566         reallocation of the screen buffer.
567         Added a SIGWINCH handler to top.c!
568         Added a constant, MAX_COLS, to top.h which defines the absolute
569         widest line we will ever allow.  Changed allocations of "char fmt"
570         in all machine modules to use this constant rather than an abitrary
571         number.
572
573 Fri Aug 13 1993 - wnl (3.3)
574         Changed return value definition of time-related functions in top.c,
575         display.c, and m_ultrix4.c to time_t (stuart@coral.cs.jcu.edu.au).
576         Fixed bug in display.c: line_update when start != 0.
577
578 Wed Aug  4 1993 - wnl (3.2 release)
579         Changes to Configure from Paul Vixie.  Added modules for hpux9 and
580         bsd386.
581
582 Tue Jul 13 1993 - wnl (3.1 release)
583         More small changes and minor bug fixes.  Brought bsd44 up to date
584         and added a module for svr4.2.  Changed shar packaging to use Rich
585         Salz's cshar stuff.
586
587 Wed Jul  7 1993 - wnl (3.1BETA)
588         More changes and bug fixes to Configure.  Applied some other
589         minor bug fixes and suggestions from the beta testers.  Added
590         the "metatop" shell script and the "installmeta" rule to the
591         Makefile to make handling multiple machine models and OS versions
592         easier.  Added INSTALL and FAQ files.
593
594 Tue May 18 1993 - wnl (3.1BETA)
595         Changed Configure to be compatible with most SVR4 environments
596         (differing output from "ls -lg").  Also changed Configure,
597         Makefile.X, etc., to look for module files in the subdirectory
598         "machine" (thanks to Christos Zoulas).
599
600 Tue Apr 20 1993 - wnl (3.1BETA)
601         Changed both occurences of "ls -1" in Configure to "ls".  This
602         SHOULD produce the same result, and has the advantage that it
603         doesn't produce an error on a system 5 machine.  Integrated other
604         changes recommended in the first round of beta testing.
605
606 Wed Mar 10 1993 - wnl (3.1BETA)
607         MAJOR CHANGE:  I have added a required function to all machine
608         dependent modules, called proc_owner.  It takes a pid as an argument
609         and returns the uid of the process's owner.  Such capability is 
610         necessary for top to run securely as a set-uid program, something
611         that is needed for SVR4 implementations to read /proc.  I have
612         retrofitted all modules except dgux with this function, but was
613         not able to test most of them.  Top should now run securely as
614         a setuid program.  Added 386bsd and sunos5 modules.  Added sunos4mp
615         module for MP Suns.
616
617 Sat Feb 20 1993 - wnl (3.1ALPHA)
618         Modified top.c and commands.c to compile correctly on System V
619         derived Unixes (especially SVR4), but in a way that doesn't rely
620         on an oracle-like declaration (that is, I don't use "ifdef SYSV").
621         Fixed some bugs in "Configure" and "getans".  Added inspection of
622         env variable "TOP" for options, and made -I default to showing
623         idle processes.  Added "u" command to change username restriction
624         on the fly.  Created shell script "suntop" for poor multi-version
625         SunOS folks (like myself).
626
627 Wed Jun  3 1992 - wnl (3.0)
628         "max_topn" wasn't being used everywhere it was supposed to be
629         in top.c.  Many cosmetic changes, including copyright notices in
630         all the .c files.  Version number is now handled by version.c and
631         reflects the current patchlevel (which is initially set to 0).
632         Changed Configure and Makefile to allow configurable variables for
633         certain commands:  shell, cc, awk, install.  Updated README and
634         Porting.  Ready to release to the world!
635
636 Mon May 18 1992 - wnl (2.9BETA)
637         Added modules provided by Christos Zoulas.  Replaced screen.c
638         with one modified by Christos and that will appropriately select
639         and handle the sgtty, termio, or termios system.  Integrated many
640         other changes recommended by Christos.  Fixed (I hope) the "-b"
641         batch mode display bug.  Had to change loadavg to load_avg to avoid
642         a conflict with 4.4BSD.  
643
644 Mon Apr 27 1992 - wnl (2.8BETA)
645         Added modules provided by Daniel Trinkle.  Added patchlevel.h,
646         but the patch level is not yet reflected in the version number.
647         Cleaned up m_sunos4.c a little.
648
649 Wed Apr 22 1992 - wnl (2.8BETA)
650         Major internal reorganization.  All of the system dependent stuff
651         is now really and truly separated from everything else.  The
652         system dependent functions are contained in a separate .c file
653         called a "module".  The Configure script knows how to find and
654         set up these modules, but the human installer still needs to tell
655         Configure which module to use (no automagic determination of 
656         machine type---sorry).  Added -U option to specify one user's
657         processes, but there is no corresponding command...yet.  Other
658         changes and improvements too numerous to mention here.  Currently
659         there are only two modules:  sunos4 and umax.  But after this beta
660         release is sent around, I expect more to be written.  I just hope
661         that the machine-dependent abstractions don't need to change in
662         the process.
663
664 Thu Mar 26 1992 - wnl (2.7BETA)
665         Beta release with minimal architecture support.  Updated README
666         and added a first cut at a Porting guide.  Added ioctl TIOCGWINSZ
667         code from top2.5+ (courtesy of David MacKenzie).  I didn't even
668         try porting the Ultrix support since I don't have access to an
669         Ultrix machine.
670
671 Fri Oct 11 1991 - wnl (2.6)
672         This version was not widely released.  It contained many changes.
673         Here are the major ones:
674
675         Put in Vixie's idle process hack.
676
677         Enhanced type field in new_message to handle delayed messages.
678
679         Changed u_process to automatically adjust for varying lines of
680         output.  Management of screenbuf should now be completely contained
681         in display.c.  Removed now extraneous code from CMD_number[12]
682         portion of command switch in top.c.  This was the stuff that dealt
683         with zeroing out lines in screenbuf.
684
685         Finally made it all work correctly on a 386i.  Problems I had to
686         overcome: kvm_nlist doesn't return 0 on success as advertised (it
687         returns 1 instead); the results of a kvm_nlist are different
688         (n_type can be zero even for a symbol that exists).
689
690         Serious rearrangement for processor dependent stuff.  All nlists
691         are now in separate files with the suffix ".nlist".  Most machine
692         specific code is in "machine.c" surrounded by appropriate ifdefs---
693         the goal is to eventually have all machine specific code in this
694         file.  Managed to find a way to detect SunOS 4.x at compile-time:
695         this is contained in the include file "sun.h".  Completely changed
696         the memory display line for SunOS 4.x---it now displays a far
697         more appropriate report.
698
699         Created the shell script "Configure" to aid in the configuration
700         step.
701
702         Fixed a bug in init_termcap:  it will now tolerate an environment
703         which does not have TERM defined (thanks to Sam Horrocks for
704         pointing this out).
705
706 Tue Aug  9 1988 - wnl (2.5)
707         Added changes to make top work under version 4.0 of the Sun
708         operating system.  Changes were provided by Scott Alexander of the
709         University of Pennsylvania.  Thanks!  Compile with "-Dsunos4" to
710         get them.  Virtual memory statistics are not readily accessible
711         under 4.0, so they don't show up in the output.
712
713 Thu Jul 31 1987 - wnl (2.4)
714         Fixed a problem with the 4.0 Pyramid code.  The label "cp_time"
715         doesn't exist in the 4.0 kernel anymore.  I think the code Carl
716         sent me wants "percpu" instead.  That is what I am using and it
717         appears to work.  375 code is still untested (at least by me).
718         Also picked a great deal of lint out of the source.  Lint now only
719         complains about a very few nitpicky things (there are far too many
720         calls to "printf" to put a "(void)" in front of!), at least under
721         SunOS.
722
723 Tue Jul 28 1987 - wnl (2.4a)
724         Added changes for a Symmetrics Computer Systems s/375 machine.
725         Changes were provided by Paul Vixie.  Thanks!  According to Mr.
726         Vixie:  "These changes were not made at, by, or for SCS proper.
727         SCS would probably be interested in them, but so far only the
728         users' group has them.  They were made in February, 1987, to
729         version 2.1 of the program, by Paul Vixie
730         (dual!ptsfa!vixie!paul@ucbvax.Berkeley.EDU)."  His changes were
731         integrated into version 2.3 to make version 2.4.
732
733         The SCS peculiarities are summarized in Changes.scs.
734
735 Tue Jun  9 1987 - wnl (2.3 for real)
736         Changed the includes for the extra code Carl sent me to only
737         compile on Version 4.0 Pyramid machines.  This makes top still
738         compilable on pre-4.0 Pyramids.  Specifically, this code is only
739         compiled when both "pyr" and "CPUFOUND" are defined.
740
741 Wed Jun  3 1987 - wnl (2.3 with Pyramid additions)
742         It's been a month and I still haven't done anything about
743         distributing this version.  However, Carl Gutekunst from Pyramid
744         has sent me some extra patches for some of the Pyramid code.  I
745         just added those and will make them part of 2.3.  This fixes the
746         following Pyramid problems:  adds the inclusion of <sys/systm.h>,
747         uses the correct size for getting the kernel value _ccpu (this bug
748         affected the Vax version as well), sums the elements of the percpu
749         array to calculate a cp_time value (for OSx 4.0).
750
751 Fri May  1 1987 - wnl (2.3)
752         I have finally finished all the changes for better support of
753         oddbal terminals.  Added the low-level routine "clear_eol" which
754         makes handling terminals without "ce" easy:  it uses spaces
755         instead.  All direct uses of "clear_line" outside of screen.c have
756         been changed to use this primitive.  A terminal with "os" is now
757         handled in such that all situations that need overwriting are
758         completely avoided (including several commands).  This required
759         some changes to the way commands are translated into action (in
760         "top.c").  Made several important changes to display.c to prevent
761         overflowing of any of the fields.  Specifically, more than 99
762         total processes and a cpu state that reaches 100%.  Had to make a
763         small change to two casts in top.c, because the Sun 3.2 compiler
764         was giving warnings on them.  Added the "-q" option which lets
765         root run top at a nice of -20 (in case he thinks he really needs it).
766
767 Tue Dec 30 1986 - wnl (2.2)
768         I think I fixed a bug reported by Julian Onions at Nottingham.
769         Occasionally, top will core dump when the sprintf in either
770         i_process or u_process overflows due to an exceptionally
771         unrealistic time value.  I think it highly unlikely that top can
772         get a bad proc structure (although I suppose it is possible), but
773         the process time is read from the user structure, and that can
774         sometimes be part garbage.  So, "get_ucpu" checks the value it
775         returns to make sure its formatted form will not overflow the
776         sprintf.  If this doesn't fix the bug, then more drastic measures
777         will be necessary.  I plan to make this version the official
778         "top 2.2".  [[ This version was never distributed very widely. ]]
779
780 Tue Dec  2 1986 - wnl (2.2c)
781         Added to top.c the notion of a "failed command".  When a command
782         produces a message (on the message line), an update does not
783         follow it.  Before, the message was written and a new display was
784         shown---purposefully not overwriting the message.  But the
785         improvements to handle overstriking terminals and terminals
786         without "ce" clear the screen before every display, which would
787         erase the message.  Now, the message is displayed and top waits
788         another full time interval before updating the display.  This
789         works much better all around.
790
791 Mon Nov 24 1986 - wnl (2.2b)
792         Created a new file, utils.c, and made appropriate changes to
793         Makefile.  This new file holds all utility functions that can and
794         may be used by more than one "module".  Improved i_memory and
795         u_memory (display.c) so that screen updates for the values
796         displayed are only changed when necessary.  Also made the line
797         look better:  the last fixes made for a rather ugly display.
798         Added the locally defined constant "LoadMax" and added code to
799         top.c to send the cursor home after a space command is entered if
800         the load average is higher than "LoadMax".  This provides visual
801         feedback on loaded systems.
802
803 Mon Nov  3 1986 - wnl (2.2a)
804         Widened the format for memory usage so that it can display 5
805         digits.  This makes that line look a little ugly---maybe I'll fix
806         that later.  Screen handling now understands "os" and a missing
807         "ce".  It treats them identically:  clear the screen between each
808         display.  Screen handling code now uses "cd" when appropriate
809         (i.e.:  when user has shortened the screen).  Made i_loadave clear
810         then screen and took out most of the explicit calls to "clear" in
811         top.c.  This method is cleaner, especially in conjunction with
812         "os" handling.  Added preprocessor variable "RANDOM_PW" for
813         systems that access the passwd file randomly (Sun's yp and 4.3).
814         With "RANDOM_PW" set, "getpwuid" is used instead of "getpwnam",
815         but uid->username mappings are still hashed internally (because
816         that is still faster than going to disk).
817
818 Mon Oct  6 1986 - wnl (2.1)
819         A bug with the kill command was pointed out by "dciem!tim"---
820         specifying a signal by name did not work correctly.  This bug has
821         been fixed with a simple change to commands.c.  Another bug made
822         the cpu state percentages incorrect the first time they were
823         displayed.  This bug has also been fixed (changed top.c).
824
825 Thu Sep  4 1986 - wnl (2.0, at last)
826         This is the version that will (hopefully) get released to the
827         world as top 2.0.
828         Added the "r" and "k" commands for renice and kill, respectively.
829         This required adding a way to handle system call errors, and the
830         addition of the "e" command.  Help screen and manual page were
831         changed to reflect this change.  Changed all "#ifdef SUN" directives
832         to "#ifdef sun", and changed all "#ifdef PYRAMID" directives to
833         "#ifdef pyr".  As much as I hate those choices of preprocessor
834         names (they too easily conflict with real variable names), it does
835         make automatic compilation possible---people don't have to change
836         the Makefile anymore for specific machines.  The manual page was
837         changed to automatically incorporate the defaults as set in the
838         Makefile (including an infinite value for TOPN) and the way the
839         manual page is generated by the Makefile was changed to make
840         maintenance of this information automatic.
841
842 Mon Jul 28 1986 - wnl (still pre 2.0)
843         Real close now.  I put in a new definition for the macro "pagetok"
844         that does an explicit shift of a constant expression involving
845         PGSHIFT.  Appropriate checks are made if PGSHIFT is to small.
846         "pagetok" is now used exclusively everywhere to convert kernel
847         clicks to kilobytes.  I added a full blown interactive mode with
848         the ability to change some of the runtime parameters (how many to
849         display, time delay, etc.) while top is running.  I also
850         incorporated a few ideas from the net:  control characters in the
851         command name are replaced with '?'; the '-S' option makes the
852         swapper and pager visible; options have been added to control the
853         number of displays produced (this makes it easier to make
854         performance snapshots with top).  I have also added the notion of
855         "infinite" values for number of processes and number of displays.
856         I fixed a long-standing bug in the uid to username mapping code
857         that was only aggravated on the pyramids:  it was an ill-defined
858         expression (akin to i = i++).  I tweaked the proc_compar routine
859         for qsort slightly so that stopped processes were more likely to
860         show up.  Manual page was updated to reflect all changes
861         noticeable to the user.
862
863 Tue Jul  1 1986 - wnl (pre 2.0 -- 1.9999?)
864         In the process of major revamping on the way to version 2.0.
865         I have completely done away with curses by adding my own screen
866         management routines in a separate file (screen.c).  The rationale
867         for this is that top knows a whole lot more about what is and is
868         not redundant on the screen and can compare simple integer values
869         where curses would have to compare strings.  This has turned out
870         to be a very big win speed-wise.  The proc_compar routine for
871         sorting has been rewritten to include several more keys.  I
872         decided this was necessary when I noticed that the "top" process
873         itself kept disappearing off the top 10 list on a Sun-3.  All the
874         processes had the same percentage (0%) and the sort wasn't really
875         doing anything worthwhile.  I changed the expression that computes
876         memory usage to use the ctob macro instead of just assuming that
877         pages were 512 bytes.  More work still needs to be done before
878         this version is usable.  I changed options-processing to use
879         getopt and added appropriate incantations to the Makefile.
880
881 Wed Feb 20 1985 - wnl (still 1.8)
882         Put in the ifdef FOUR_ONE statements to make top still compilable
883         on a 4.1 system.  Apparently, there are some users out there that
884         need this functionality.  Oh well.  I don't guarantee any of it,
885         since I can't test it.  Made appropriate changes to README and
886         final installation related changes to Makefile.
887
888 Sat Feb  2 1985 - wnl (1.8)
889         Removed all the ifdef FOUR_TWO statements and made "top" into a
890         4.2 only program.  If someone really wants to still run it on 4.1,
891         then they can do all the work.  We don't have a 4.1 machine
892         anymore, so I don't even know if the thing still works under 4.1.
893         Cleaned up the Makefile and the README.  Added installation rules
894         to the Makefile, as requested by several sites.  Fixed a very
895         obscure divide-by-zero bug.  Added a second "key" to the qsort
896         comparison function (proc_compar) so that comparisons are based on
897         cpu ticks if the percentages are equal (provided by Jonathon
898         Feiber at Sun).
899
900 Tue Dec 11 1984 - wnl (1.7)
901         Added the virtual and real memory status line to the header area
902         (provided by Jonathon Feiber at Sun)
903
904 Tue Nov 20 1984 - wnl (1.6)
905         Added an "exit" if sbrk's fail.  Added changes from Jonathon
906         Feiber at Sun:  ifdef SUN to make top work on Suns (they don't use
907         doubles in the proc structure), register declarations, check for
908         getting a user structure that has disappeared since the proc array
909         was read (it used to die, now it just shows the process as swapped).
910
911 Tue Nov 13 1984 - wnl (1.5)
912         If the number of displayable processes ("active_procs") was less
913         than the number of requested processes ("topn"), top would
914         segmentation fault.  This bug has been fixed.  Thanks to Prentiss
915         Riddle at ut-sally for pointing out the existence of this bug.
916
917 Tue Oct 23 1984 - wnl (1.4)
918         Finally fixed the hash table bug that caused processes owned by
919         root to sometimes appear with either no name or a different name
920         that had UID 0 (such as "operator").  Removed all the ifdef DEBUG
921         blocks to make top ready for distribution to the real world.
922
923 Sun Apr  8 1984 - wnl (still 1.3)
924         Made some slight changes to the display format.  It now looks more
925         aesthetically pleasing.  Added some preprocessor constants so that
926         the two defaults (number of processes and seconds of delay) easier
927         to change.
928
929 Thu Apr  5 1984 - wnl (1.3)
930         Changed the order in which things are done at initialization time.
931         This way, if an error occurs before starting the main loop, curses
932         will never get started.  Also changed other error handlers so that
933         endwin() is called before any flavor of exit.  Specifying a number
934         of processes that is more than the screen can handle is no longer
935         fatal.  It displays a warning message and pretends the user
936         specified the maximum for the screen.  Finally cured all the TSTP
937         blues (well, almost all).  I removed my TSTP handler and convinced
938         the system to always use the one that curses sets up.  Turns out
939         that "sleep" was stepping all over it during a pause.  So, I don't
940         use sleep anymore.  The only problem that remains with it now is
941         redrawing the old display before updating it after a pause.
942
943 Tue Apr  3 1984 - wnl (from 1.0 to 1.2)
944         I changed the format of the TIME column from just "seconds" to
945         "minutes:seconds".  I also made pausing work correctly.  Screen
946         redraws with an up to date display.  For compatibility with 4.2, I
947         changed the name of the "zero" function to "bzero".  The makefile
948         has been altered to handle versions for 4.1 and 4.2, and README
949         has been updated to reflect these recent changes.