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