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