Remove files not used during configure or build
This commit is contained in:
parent
fd9002550c
commit
a9e4dff97f
@ -1,28 +0,0 @@
|
||||
William LeFebvre
|
||||
Group sys Consulting
|
||||
wnl@groupsys.com
|
||||
+1-770-813-3224
|
||||
|
||||
|
||||
William LeFebvre is available for consulting and teaching engagements
|
||||
through the company Group sys Consulting. William's specialties are:
|
||||
|
||||
Unix system administration issues
|
||||
Local area network design
|
||||
Design of safe connections to the Internet
|
||||
Domain Name Service
|
||||
Unix and Internet security
|
||||
INN news server configuration
|
||||
SunOS to Solaris migration
|
||||
Troubleshooting
|
||||
|
||||
|
||||
Although located in the Atlanta metropolitan area, William can easily
|
||||
travel to any location in the United States and Canada. Trips to
|
||||
other countries can be arranged as well.
|
||||
|
||||
If you are interested in having William work for your organization,
|
||||
contact him at +1-770-813-3224 or via the address "wnl@groupsys.com".
|
||||
You may also wish to visit the Group sys web page at www.groupsys.com.
|
||||
|
||||
|
@ -1,599 +0,0 @@
|
||||
Fri Dec 18 1998 - wnl (3.5beta9)
|
||||
Configure checks status of "make" and complains if it fails.
|
||||
|
||||
Thu Dec 17 1998 - wnl (3.5beta9)
|
||||
Added module sco5 from Mike Hopkirk.
|
||||
Added module netbsd132 from moto kawasaki.
|
||||
|
||||
Sun Oct 25 1998 - wnl (3.5beta9)
|
||||
Added Casper's patches for sunos5 for the following:
|
||||
produce same results as swap -s (5.5 and higher),
|
||||
don't use system_pages kstat when /dev/kmem can be opened,
|
||||
skip . and .. when reading /proc, replace use of SOLARIS24
|
||||
with OSREV.
|
||||
|
||||
Fri Sep 11 1998 - wnl (3.5beta9)
|
||||
Added workaround to getans for the absence of $< in SCO Unix.
|
||||
|
||||
Wed Jul 1 1998 - wnl (3.5beta9)
|
||||
Changed structure member "errno" to "errnum" in commands.c.
|
||||
Replaced hpux10 module with one from John Haxby.
|
||||
|
||||
Fri Apr 17 1998 - wnl (3.5beta8)
|
||||
Moved definition of _KMEMUSER earlier in m_sunos5.c. This should
|
||||
fix the compilation problem with gnu 2.7.2.3, obviating the need
|
||||
for the fixinc.svr4 patch, but hopefully will not affect anything
|
||||
else.
|
||||
Added -DORDER to m_sunos4mp.c
|
||||
|
||||
Tue Nov 18 1997 - wnl (3.5beta7)
|
||||
Added gcc 2.7.2.3 patch for fixinc.svr4 and changed INSTALL and
|
||||
FAQ to refer to it.
|
||||
Added NetBSD HP9000 fix. Hopefully it doesn't break other
|
||||
NetBSD platforms.
|
||||
|
||||
Fri Oct 24 1997 - wnl (3.5beta7)
|
||||
Modified m_dcosx.c to change uses of procdir to xprocdir, avoiding
|
||||
a name clash with an include file (Bryn Parrott)
|
||||
|
||||
Sat Oct 11 1997 - wnl (3.5beta6)
|
||||
Incorporated Casper's patches for Solaris 2.6 and for the multi-
|
||||
processor bug ("kstat finds too many cpus").
|
||||
|
||||
Sun Jan 20 1996 - wnl (3.5beta5)
|
||||
Fixed Casper's m_sunos5 module: there was a poor interaction with
|
||||
his use of OSREV and SunOS 5.5.1.
|
||||
|
||||
Fri Dec 20 1996 - wnl (3.5beta4)
|
||||
Replaced m_sunos5 with a reworked version by Casper Dik. This one
|
||||
should work under 2.6 and may not require that top be run setuid
|
||||
to root under 2.5 or 2.6. This also fixed a bug in m_sunos5 that
|
||||
was introduced in beta3.
|
||||
Fixed calculation of OSREV in Configure.
|
||||
|
||||
Wed Nov 20 1996 - wnl (3.5beta3)
|
||||
Incorporated contributed fixes to: bsdos2, irix62, freebsd20,
|
||||
ultrix4, sunos5. Changed calculation of swap area in sunos5 (now
|
||||
uses swapctl). sunos5 now understands idled processors. Changed
|
||||
Configure to determine os revision using uname (when available)
|
||||
and adding it to machine.c compiliation in Makefile as -DOSREV.
|
||||
Changed calls to "exit" in modules to use "quit" instead.
|
||||
|
||||
Oct 20 1996 - wnl (3.5beta3)
|
||||
Removed "time" from list of ordering choices: there's no easy way
|
||||
to get cpu time for all processes (it's in the u area).
|
||||
|
||||
Fri Oct 18 1996 - wnl (3.5beta3)
|
||||
hpux10 and hpux9: using a better means for determining when a
|
||||
process is idle.
|
||||
decosf1 now includes utils.h.
|
||||
|
||||
Fri Sep 13 1996 - wnl (3.5beta2)
|
||||
Fixed Configure to build Make.desc in such a way that doesn't
|
||||
require a long argument to sed.
|
||||
|
||||
Thu Sep 12 1996 - wnl (3.5beta2)
|
||||
Fixed bug in display.c that affected empty cpustate names.
|
||||
Created hpux1010 module - a variant of hpux10 that does not use
|
||||
struct proc or struct user (suitable for HP/UX 10.10).
|
||||
|
||||
Wed Sep 11 1996 - wnl (3.5beta2)
|
||||
Changes to sunos5 module: Removed WCPU column since it is meaningless
|
||||
on a SVR4-based system. Added THR column to show number of threads
|
||||
for each process. This was not straightforward: the information is
|
||||
not stored in prpsinfo but rather in prstatus.
|
||||
|
||||
Tue Sep 10 1996 - wnl (3.5beta1)
|
||||
Added patches for sunos4mp to provide order support.
|
||||
Added irix62 module.
|
||||
Changed prime.c to include stdio.h for printf prototype.
|
||||
Added conditional code to os.h and utils.c to handle systems
|
||||
where sys_errlist is defined in stdio.h (such as NetBSD).
|
||||
|
||||
Mon Sep 09 1996 - wnl (3.5beta1)
|
||||
Removed tar and shar rules from Makefile.X -- don't need them anymore.
|
||||
Added -v option to display version number. Updated man page.
|
||||
|
||||
Thu Aug 29 1996 - wnl (3.4)
|
||||
Replaced modules (from Tim Pugh): next 32, next40.
|
||||
Fixed bug in username.c: hashing negative uids.
|
||||
|
||||
Thu Aug 22 1996 - wnl (3.4beta3)
|
||||
Patched modules: ultrix4, sunos4, sunos5, utek, decosf1, irix5.
|
||||
Added modules: next40, next32.
|
||||
Fixed procstates update bug in display.c.
|
||||
Fixed divide by zero bug in utils.c.
|
||||
Fixed bad number in layout.h
|
||||
Minor fixes to Configure.
|
||||
Complete overhaul of FAQ.
|
||||
|
||||
Tue Feb 13 1996 - wnl (3.4beta3)
|
||||
Added convex module from Warren Vosper (originally written by
|
||||
William Jones).
|
||||
|
||||
Tue Feb 13 1996 - wnl (3.4beta2)
|
||||
Fixed format_k in utils.c to calculate K and M values correctly.
|
||||
Added check for gigabyte values ('G'). Changed sumamry_format
|
||||
in display.c to use format_k where appropriate.
|
||||
Changed creation of distribution tar file to place everything in
|
||||
a top level directory.
|
||||
|
||||
Tue Jan 30 1996 - wnl (3.4beta2)
|
||||
Added m_aix41 module. Added new tag type to module comments:
|
||||
TERMCAP, which defined the library to use for a termcap library.
|
||||
If no TERMCAP tag is found in the module's initial comment, then
|
||||
Configure will default to "-ltermcap". AIX needs this since it
|
||||
put all the termcap routines in libcurses(!)
|
||||
|
||||
Added m_bsdos2 (found lingering in my mailbox).
|
||||
Updated m_svr4 to include support for NCR multiprocessors.
|
||||
Fixed small bug in utils.c
|
||||
|
||||
Thu Jan 25 1996 - wnl (3.4beta1)
|
||||
Fixed m_sunos5 invocation of gettimeofday to include "NULL" as
|
||||
second argument. This provides compatability with the Posix-
|
||||
compliant template provided with SunOS 5.5, but doesn't hurt
|
||||
previous versions since they do bother with a template for that
|
||||
function.
|
||||
|
||||
Made changes (recommended by net users) to hpux10, ultrix4,
|
||||
netbsd10, aux3 (replaced aux31). Added module for linux.
|
||||
|
||||
Fri Oct 10 1995 - wnl (3.4beta1)
|
||||
Added user-contributed modules for SCO Unix, IRIX 5, HP/UX 10,
|
||||
Pyramid DC/OSX. Changed Configure so that it runs in environments
|
||||
whose c-shells have no 'eval'(!). Added support for multiple sort
|
||||
ordering methods via the -o switch. This option requires support
|
||||
from the machine dependent module: such support was added to
|
||||
sunos5 (thus sunos54) and sunos4.
|
||||
|
||||
display.c: Changed CPU states display line to shorten the leading
|
||||
tag if the data won't fit in the current width. Fixed a divide-by-
|
||||
zero bug that affected ultrasparc servers (and potentially other
|
||||
systems).
|
||||
|
||||
m_sunos5.c: Now asks the system for the correct pagesize rather than
|
||||
assuming it is 4K.
|
||||
|
||||
Thu Mar 2 1995 - wnl (3.3 RELEASE)
|
||||
Added module netbsd10 and renamed netbsd to netbsd08. Changed
|
||||
Configure so that it does not use an initial default module name.
|
||||
Made other compatability fixes to Configure. Added comments to
|
||||
decosf1 concerning optimizer bug. Other documentation changes.
|
||||
Added use of "prime.c" to Configure script.
|
||||
|
||||
Tue Feb 7 1995 - wnl (3.3beta6)
|
||||
Still one more beta....
|
||||
Fixes for sunos5 2.4 gcc core dump (it was an alignment problem).
|
||||
Fixed and improvements for decosf1 (including use of format_k
|
||||
for proper SIZE column formatting). Added modules freebsd20 and
|
||||
ncr3000.
|
||||
|
||||
Thu Feb 2 1995 - wnl (3.3beta5)
|
||||
One more beta....
|
||||
Fixed a few bugs in the sunos5 port pertaining to casting and
|
||||
very large memory counts. Added "ifndef HAVE_GETOPT" to getopt.c
|
||||
to provide for conditional compilation of the getopt function.
|
||||
Those systems that have getopt in libc can add -DHAVE_GETOPT to
|
||||
the CFLAGS line in the module to prevent the function from being
|
||||
compiled. Added sunos54 module to accomodate SunOS 5.4
|
||||
peculiarities. Added module for aux3.1.
|
||||
|
||||
Wed Jan 4 1995 - wnl (3.3beta4)
|
||||
This is really taking too long......sigh.
|
||||
Fixed SIGWINCH handling once and for all. It now remembers the
|
||||
number of processes you want displayed even thru window resizes.
|
||||
Fixed buffer conflict in utils.c (itoa and itoa7).
|
||||
Lots of small improvements to the various modules were made over
|
||||
the past month: too numberous to list here. SunOS 5 module made
|
||||
more secure thru use of seteuid calls (other SVR4 modules should
|
||||
be modified similarly). One final MP fix to sunos5, too. Module
|
||||
for decosf1 was modified to accomodate V3.0.
|
||||
|
||||
Mon Apr 18 1994 - wnl (3.3beta3)
|
||||
I think I finally got a sunos5 module that will work on MP
|
||||
machines. Fixed cpu states figure in osmp41a so that
|
||||
percentages never exceed 100%. Added shell script "install"
|
||||
since Unix vendors can't seem to make up their minds on what
|
||||
options they want to use for the one that comes with the OS.
|
||||
Added netbsd modules from Christos. Fixed lots of other little
|
||||
things over the past few months that I have long since forgotten.
|
||||
|
||||
Wed Dec 15 1993 - wnl (3.3beta2)
|
||||
Added module patches from various users: hpux9, sunos5.
|
||||
Fixed bug with batch mode (screen_width wasn't getting set).
|
||||
Changes to accomodate 64 bit machines.
|
||||
Fixed some bugs in command parsing ("renice 19 " did something
|
||||
unexpected).
|
||||
|
||||
Mon Aug 30 1993 - wnl (3.3beta)
|
||||
Added lots of little patches from various users.
|
||||
Added routines to utils.c for intelligent formatting of kilobytes
|
||||
and time. These are intended to be used in the modules when
|
||||
formatting a process line. Added code to "summary_format" in
|
||||
display.c to do intelligent formatting of memory quantities.
|
||||
Redid display.c to allow for varying line widths and dynamic
|
||||
reallocation of the screen buffer.
|
||||
Added a SIGWINCH handler to top.c!
|
||||
Added a constant, MAX_COLS, to top.h which defines the absolute
|
||||
widest line we will ever allow. Changed allocations of "char fmt"
|
||||
in all machine modules to use this constant rather than an abitrary
|
||||
number.
|
||||
|
||||
Fri Aug 13 1993 - wnl (3.3)
|
||||
Changed return value definition of time-related functions in top.c,
|
||||
display.c, and m_ultrix4.c to time_t (stuart@coral.cs.jcu.edu.au).
|
||||
Fixed bug in display.c: line_update when start != 0.
|
||||
|
||||
Wed Aug 4 1993 - wnl (3.2 release)
|
||||
Changes to Configure from Paul Vixie. Added modules for hpux9 and
|
||||
bsd386.
|
||||
|
||||
Tue Jul 13 1993 - wnl (3.1 release)
|
||||
More small changes and minor bug fixes. Brought bsd44 up to date
|
||||
and added a module for svr4.2. Changed shar packaging to use Rich
|
||||
Salz's cshar stuff.
|
||||
|
||||
Wed Jul 7 1993 - wnl (3.1BETA)
|
||||
More changes and bug fixes to Configure. Applied some other
|
||||
minor bug fixes and suggestions from the beta testers. Added
|
||||
the "metatop" shell script and the "installmeta" rule to the
|
||||
Makefile to make handling multiple machine models and OS versions
|
||||
easier. Added INSTALL and FAQ files.
|
||||
|
||||
Tue May 18 1993 - wnl (3.1BETA)
|
||||
Changed Configure to be compatible with most SVR4 environments
|
||||
(differing output from "ls -lg"). Also changed Configure,
|
||||
Makefile.X, etc., to look for module files in the subdirectory
|
||||
"machine" (thanks to Christos Zoulas).
|
||||
|
||||
Tue Apr 20 1993 - wnl (3.1BETA)
|
||||
Changed both occurences of "ls -1" in Configure to "ls". This
|
||||
SHOULD produce the same result, and has the advantage that it
|
||||
doesn't produce an error on a system 5 machine. Integrated other
|
||||
changes recommended in the first round of beta testing.
|
||||
|
||||
Wed Mar 10 1993 - wnl (3.1BETA)
|
||||
MAJOR CHANGE: I have added a required function to all machine
|
||||
dependent modules, called proc_owner. It takes a pid as an argument
|
||||
and returns the uid of the process's owner. Such capability is
|
||||
necessary for top to run securely as a set-uid program, something
|
||||
that is needed for SVR4 implementations to read /proc. I have
|
||||
retrofitted all modules except dgux with this function, but was
|
||||
not able to test most of them. Top should now run securely as
|
||||
a setuid program. Added 386bsd and sunos5 modules. Added sunos4mp
|
||||
module for MP Suns.
|
||||
|
||||
Sat Feb 20 1993 - wnl (3.1ALPHA)
|
||||
Modified top.c and commands.c to compile correctly on System V
|
||||
derived Unixes (especially SVR4), but in a way that doesn't rely
|
||||
on an oracle-like declaration (that is, I don't use "ifdef SYSV").
|
||||
Fixed some bugs in "Configure" and "getans". Added inspection of
|
||||
env variable "TOP" for options, and made -I default to showing
|
||||
idle processes. Added "u" command to change username restriction
|
||||
on the fly. Created shell script "suntop" for poor multi-version
|
||||
SunOS folks (like myself).
|
||||
|
||||
Wed Jun 3 1992 - wnl (3.0)
|
||||
"max_topn" wasn't being used everywhere it was supposed to be
|
||||
in top.c. Many cosmetic changes, including copyright notices in
|
||||
all the .c files. Version number is now handled by version.c and
|
||||
reflects the current patchlevel (which is initially set to 0).
|
||||
Changed Configure and Makefile to allow configurable variables for
|
||||
certain commands: shell, cc, awk, install. Updated README and
|
||||
Porting. Ready to release to the world!
|
||||
|
||||
Mon May 18 1992 - wnl (2.9BETA)
|
||||
Added modules provided by Christos Zoulas. Replaced screen.c
|
||||
with one modified by Christos and that will appropriately select
|
||||
and handle the sgtty, termio, or termios system. Integrated many
|
||||
other changes recommended by Christos. Fixed (I hope) the "-b"
|
||||
batch mode display bug. Had to change loadavg to load_avg to avoid
|
||||
a conflict with 4.4BSD.
|
||||
|
||||
Mon Apr 27 1992 - wnl (2.8BETA)
|
||||
Added modules provided by Daniel Trinkle. Added patchlevel.h,
|
||||
but the patch level is not yet reflected in the version number.
|
||||
Cleaned up m_sunos4.c a little.
|
||||
|
||||
Wed Apr 22 1992 - wnl (2.8BETA)
|
||||
Major internal reorganization. All of the system dependent stuff
|
||||
is now really and truly separated from everything else. The
|
||||
system dependent functions are contained in a separate .c file
|
||||
called a "module". The Configure script knows how to find and
|
||||
set up these modules, but the human installer still needs to tell
|
||||
Configure which module to use (no automagic determination of
|
||||
machine type---sorry). Added -U option to specify one user's
|
||||
processes, but there is no corresponding command...yet. Other
|
||||
changes and improvements too numerous to mention here. Currently
|
||||
there are only two modules: sunos4 and umax. But after this beta
|
||||
release is sent around, I expect more to be written. I just hope
|
||||
that the machine-dependent abstractions don't need to change in
|
||||
the process.
|
||||
|
||||
Thu Mar 26 1992 - wnl (2.7BETA)
|
||||
Beta release with minimal architecture support. Updated README
|
||||
and added a first cut at a Porting guide. Added ioctl TIOCGWINSZ
|
||||
code from top2.5+ (courtesy of David MacKenzie). I didn't even
|
||||
try porting the Ultrix support since I don't have access to an
|
||||
Ultrix machine.
|
||||
|
||||
Fri Oct 11 1991 - wnl (2.6)
|
||||
This version was not widely released. It contained many changes.
|
||||
Here are the major ones:
|
||||
|
||||
Put in Vixie's idle process hack.
|
||||
|
||||
Enhanced type field in new_message to handle delayed messages.
|
||||
|
||||
Changed u_process to automatically adjust for varying lines of
|
||||
output. Management of screenbuf should now be completely contained
|
||||
in display.c. Removed now extraneous code from CMD_number[12]
|
||||
portion of command switch in top.c. This was the stuff that dealt
|
||||
with zeroing out lines in screenbuf.
|
||||
|
||||
Finally made it all work correctly on a 386i. Problems I had to
|
||||
overcome: kvm_nlist doesn't return 0 on success as advertised (it
|
||||
returns 1 instead); the results of a kvm_nlist are different
|
||||
(n_type can be zero even for a symbol that exists).
|
||||
|
||||
Serious rearrangement for processor dependent stuff. All nlists
|
||||
are now in separate files with the suffix ".nlist". Most machine
|
||||
specific code is in "machine.c" surrounded by appropriate ifdefs---
|
||||
the goal is to eventually have all machine specific code in this
|
||||
file. Managed to find a way to detect SunOS 4.x at compile-time:
|
||||
this is contained in the include file "sun.h". Completely changed
|
||||
the memory display line for SunOS 4.x---it now displays a far
|
||||
more appropriate report.
|
||||
|
||||
Created the shell script "Configure" to aid in the configuration
|
||||
step.
|
||||
|
||||
Fixed a bug in init_termcap: it will now tolerate an environment
|
||||
which does not have TERM defined (thanks to Sam Horrocks for
|
||||
pointing this out).
|
||||
|
||||
Tue Aug 9 1988 - wnl (2.5)
|
||||
Added changes to make top work under version 4.0 of the Sun
|
||||
operating system. Changes were provided by Scott Alexander of the
|
||||
University of Pennsylvania. Thanks! Compile with "-Dsunos4" to
|
||||
get them. Virtual memory statistics are not readily accessible
|
||||
under 4.0, so they don't show up in the output.
|
||||
|
||||
Thu Jul 31 1987 - wnl (2.4)
|
||||
Fixed a problem with the 4.0 Pyramid code. The label "cp_time"
|
||||
doesn't exist in the 4.0 kernel anymore. I think the code Carl
|
||||
sent me wants "percpu" instead. That is what I am using and it
|
||||
appears to work. 375 code is still untested (at least by me).
|
||||
Also picked a great deal of lint out of the source. Lint now only
|
||||
complains about a very few nitpicky things (there are far too many
|
||||
calls to "printf" to put a "(void)" in front of!), at least under
|
||||
SunOS.
|
||||
|
||||
Tue Jul 28 1987 - wnl (2.4a)
|
||||
Added changes for a Symmetrics Computer Systems s/375 machine.
|
||||
Changes were provided by Paul Vixie. Thanks! According to Mr.
|
||||
Vixie: "These changes were not made at, by, or for SCS proper.
|
||||
SCS would probably be interested in them, but so far only the
|
||||
users' group has them. They were made in February, 1987, to
|
||||
version 2.1 of the program, by Paul Vixie
|
||||
(dual!ptsfa!vixie!paul@ucbvax.Berkeley.EDU)." His changes were
|
||||
integrated into version 2.3 to make version 2.4.
|
||||
|
||||
The SCS peculiarities are summarized in Changes.scs.
|
||||
|
||||
Tue Jun 9 1987 - wnl (2.3 for real)
|
||||
Changed the includes for the extra code Carl sent me to only
|
||||
compile on Version 4.0 Pyramid machines. This makes top still
|
||||
compilable on pre-4.0 Pyramids. Specifically, this code is only
|
||||
compiled when both "pyr" and "CPUFOUND" are defined.
|
||||
|
||||
Wed Jun 3 1987 - wnl (2.3 with Pyramid additions)
|
||||
It's been a month and I still haven't done anything about
|
||||
distributing this version. However, Carl Gutekunst from Pyramid
|
||||
has sent me some extra patches for some of the Pyramid code. I
|
||||
just added those and will make them part of 2.3. This fixes the
|
||||
following Pyramid problems: adds the inclusion of <sys/systm.h>,
|
||||
uses the correct size for getting the kernel value _ccpu (this bug
|
||||
affected the Vax version as well), sums the elements of the percpu
|
||||
array to calculate a cp_time value (for OSx 4.0).
|
||||
|
||||
Fri May 1 1987 - wnl (2.3)
|
||||
I have finally finished all the changes for better support of
|
||||
oddbal terminals. Added the low-level routine "clear_eol" which
|
||||
makes handling terminals without "ce" easy: it uses spaces
|
||||
instead. All direct uses of "clear_line" outside of screen.c have
|
||||
been changed to use this primitive. A terminal with "os" is now
|
||||
handled in such that all situations that need overwriting are
|
||||
completely avoided (including several commands). This required
|
||||
some changes to the way commands are translated into action (in
|
||||
"top.c"). Made several important changes to display.c to prevent
|
||||
overflowing of any of the fields. Specifically, more than 99
|
||||
total processes and a cpu state that reaches 100%. Had to make a
|
||||
small change to two casts in top.c, because the Sun 3.2 compiler
|
||||
was giving warnings on them. Added the "-q" option which lets
|
||||
root run top at a nice of -20 (in case he thinks he really needs it).
|
||||
|
||||
Tue Dec 30 1986 - wnl (2.2)
|
||||
I think I fixed a bug reported by Julian Onions at Nottingham.
|
||||
Occasionally, top will core dump when the sprintf in either
|
||||
i_process or u_process overflows due to an exceptionally
|
||||
unrealistic time value. I think it highly unlikely that top can
|
||||
get a bad proc structure (although I suppose it is possible), but
|
||||
the process time is read from the user structure, and that can
|
||||
sometimes be part garbage. So, "get_ucpu" checks the value it
|
||||
returns to make sure its formatted form will not overflow the
|
||||
sprintf. If this doesn't fix the bug, then more drastic measures
|
||||
will be necessary. I plan to make this version the official
|
||||
"top 2.2". [[ This version was never distributed very widely. ]]
|
||||
|
||||
Tue Dec 2 1986 - wnl (2.2c)
|
||||
Added to top.c the notion of a "failed command". When a command
|
||||
produces a message (on the message line), an update does not
|
||||
follow it. Before, the message was written and a new display was
|
||||
shown---purposefully not overwriting the message. But the
|
||||
improvements to handle overstriking terminals and terminals
|
||||
without "ce" clear the screen before every display, which would
|
||||
erase the message. Now, the message is displayed and top waits
|
||||
another full time interval before updating the display. This
|
||||
works much better all around.
|
||||
|
||||
Mon Nov 24 1986 - wnl (2.2b)
|
||||
Created a new file, utils.c, and made appropriate changes to
|
||||
Makefile. This new file holds all utility functions that can and
|
||||
may be used by more than one "module". Improved i_memory and
|
||||
u_memory (display.c) so that screen updates for the values
|
||||
displayed are only changed when necessary. Also made the line
|
||||
look better: the last fixes made for a rather ugly display.
|
||||
Added the locally defined constant "LoadMax" and added code to
|
||||
top.c to send the cursor home after a space command is entered if
|
||||
the load average is higher than "LoadMax". This provides visual
|
||||
feedback on loaded systems.
|
||||
|
||||
Mon Nov 3 1986 - wnl (2.2a)
|
||||
Widened the format for memory usage so that it can display 5
|
||||
digits. This makes that line look a little ugly---maybe I'll fix
|
||||
that later. Screen handling now understands "os" and a missing
|
||||
"ce". It treats them identically: clear the screen between each
|
||||
display. Screen handling code now uses "cd" when appropriate
|
||||
(i.e.: when user has shortened the screen). Made i_loadave clear
|
||||
then screen and took out most of the explicit calls to "clear" in
|
||||
top.c. This method is cleaner, especially in conjunction with
|
||||
"os" handling. Added preprocessor variable "RANDOM_PW" for
|
||||
systems that access the passwd file randomly (Sun's yp and 4.3).
|
||||
With "RANDOM_PW" set, "getpwuid" is used instead of "getpwnam",
|
||||
but uid->username mappings are still hashed internally (because
|
||||
that is still faster than going to disk).
|
||||
|
||||
Mon Oct 6 1986 - wnl (2.1)
|
||||
A bug with the kill command was pointed out by "dciem!tim"---
|
||||
specifying a signal by name did not work correctly. This bug has
|
||||
been fixed with a simple change to commands.c. Another bug made
|
||||
the cpu state percentages incorrect the first time they were
|
||||
displayed. This bug has also been fixed (changed top.c).
|
||||
|
||||
Thu Sep 4 1986 - wnl (2.0, at last)
|
||||
This is the version that will (hopefully) get released to the
|
||||
world as top 2.0.
|
||||
Added the "r" and "k" commands for renice and kill, respectively.
|
||||
This required adding a way to handle system call errors, and the
|
||||
addition of the "e" command. Help screen and manual page were
|
||||
changed to reflect this change. Changed all "#ifdef SUN" directives
|
||||
to "#ifdef sun", and changed all "#ifdef PYRAMID" directives to
|
||||
"#ifdef pyr". As much as I hate those choices of preprocessor
|
||||
names (they too easily conflict with real variable names), it does
|
||||
make automatic compilation possible---people don't have to change
|
||||
the Makefile anymore for specific machines. The manual page was
|
||||
changed to automatically incorporate the defaults as set in the
|
||||
Makefile (including an infinite value for TOPN) and the way the
|
||||
manual page is generated by the Makefile was changed to make
|
||||
maintenance of this information automatic.
|
||||
|
||||
Mon Jul 28 1986 - wnl (still pre 2.0)
|
||||
Real close now. I put in a new definition for the macro "pagetok"
|
||||
that does an explicit shift of a constant expression involving
|
||||
PGSHIFT. Appropriate checks are made if PGSHIFT is to small.
|
||||
"pagetok" is now used exclusively everywhere to convert kernel
|
||||
clicks to kilobytes. I added a full blown interactive mode with
|
||||
the ability to change some of the runtime parameters (how many to
|
||||
display, time delay, etc.) while top is running. I also
|
||||
incorporated a few ideas from the net: control characters in the
|
||||
command name are replaced with '?'; the '-S' option makes the
|
||||
swapper and pager visible; options have been added to control the
|
||||
number of displays produced (this makes it easier to make
|
||||
performance snapshots with top). I have also added the notion of
|
||||
"infinite" values for number of processes and number of displays.
|
||||
I fixed a long-standing bug in the uid to username mapping code
|
||||
that was only aggravated on the pyramids: it was an ill-defined
|
||||
expression (akin to i = i++). I tweaked the proc_compar routine
|
||||
for qsort slightly so that stopped processes were more likely to
|
||||
show up. Manual page was updated to reflect all changes
|
||||
noticeable to the user.
|
||||
|
||||
Tue Jul 1 1986 - wnl (pre 2.0 -- 1.9999?)
|
||||
In the process of major revamping on the way to version 2.0.
|
||||
I have completely done away with curses by adding my own screen
|
||||
management routines in a separate file (screen.c). The rationale
|
||||
for this is that top knows a whole lot more about what is and is
|
||||
not redundant on the screen and can compare simple integer values
|
||||
where curses would have to compare strings. This has turned out
|
||||
to be a very big win speed-wise. The proc_compar routine for
|
||||
sorting has been rewritten to include several more keys. I
|
||||
decided this was necessary when I noticed that the "top" process
|
||||
itself kept disappearing off the top 10 list on a Sun-3. All the
|
||||
processes had the same percentage (0%) and the sort wasn't really
|
||||
doing anything worthwhile. I changed the expression that computes
|
||||
memory usage to use the ctob macro instead of just assuming that
|
||||
pages were 512 bytes. More work still needs to be done before
|
||||
this version is usable. I changed options-processing to use
|
||||
getopt and added appropriate incantations to the Makefile.
|
||||
|
||||
Wed Feb 20 1985 - wnl (still 1.8)
|
||||
Put in the ifdef FOUR_ONE statements to make top still compilable
|
||||
on a 4.1 system. Apparently, there are some users out there that
|
||||
need this functionality. Oh well. I don't guarantee any of it,
|
||||
since I can't test it. Made appropriate changes to README and
|
||||
final installation related changes to Makefile.
|
||||
|
||||
Sat Feb 2 1985 - wnl (1.8)
|
||||
Removed all the ifdef FOUR_TWO statements and made "top" into a
|
||||
4.2 only program. If someone really wants to still run it on 4.1,
|
||||
then they can do all the work. We don't have a 4.1 machine
|
||||
anymore, so I don't even know if the thing still works under 4.1.
|
||||
Cleaned up the Makefile and the README. Added installation rules
|
||||
to the Makefile, as requested by several sites. Fixed a very
|
||||
obscure divide-by-zero bug. Added a second "key" to the qsort
|
||||
comparison function (proc_compar) so that comparisons are based on
|
||||
cpu ticks if the percentages are equal (provided by Jonathon
|
||||
Feiber at Sun).
|
||||
|
||||
Tue Dec 11 1984 - wnl (1.7)
|
||||
Added the virtual and real memory status line to the header area
|
||||
(provided by Jonathon Feiber at Sun)
|
||||
|
||||
Tue Nov 20 1984 - wnl (1.6)
|
||||
Added an "exit" if sbrk's fail. Added changes from Jonathon
|
||||
Feiber at Sun: ifdef SUN to make top work on Suns (they don't use
|
||||
doubles in the proc structure), register declarations, check for
|
||||
getting a user structure that has disappeared since the proc array
|
||||
was read (it used to die, now it just shows the process as swapped).
|
||||
|
||||
Tue Nov 13 1984 - wnl (1.5)
|
||||
If the number of displayable processes ("active_procs") was less
|
||||
than the number of requested processes ("topn"), top would
|
||||
segmentation fault. This bug has been fixed. Thanks to Prentiss
|
||||
Riddle at ut-sally for pointing out the existence of this bug.
|
||||
|
||||
Tue Oct 23 1984 - wnl (1.4)
|
||||
Finally fixed the hash table bug that caused processes owned by
|
||||
root to sometimes appear with either no name or a different name
|
||||
that had UID 0 (such as "operator"). Removed all the ifdef DEBUG
|
||||
blocks to make top ready for distribution to the real world.
|
||||
|
||||
Sun Apr 8 1984 - wnl (still 1.3)
|
||||
Made some slight changes to the display format. It now looks more
|
||||
aesthetically pleasing. Added some preprocessor constants so that
|
||||
the two defaults (number of processes and seconds of delay) easier
|
||||
to change.
|
||||
|
||||
Thu Apr 5 1984 - wnl (1.3)
|
||||
Changed the order in which things are done at initialization time.
|
||||
This way, if an error occurs before starting the main loop, curses
|
||||
will never get started. Also changed other error handlers so that
|
||||
endwin() is called before any flavor of exit. Specifying a number
|
||||
of processes that is more than the screen can handle is no longer
|
||||
fatal. It displays a warning message and pretends the user
|
||||
specified the maximum for the screen. Finally cured all the TSTP
|
||||
blues (well, almost all). I removed my TSTP handler and convinced
|
||||
the system to always use the one that curses sets up. Turns out
|
||||
that "sleep" was stepping all over it during a pause. So, I don't
|
||||
use sleep anymore. The only problem that remains with it now is
|
||||
redrawing the old display before updating it after a pause.
|
||||
|
||||
Tue Apr 3 1984 - wnl (from 1.0 to 1.2)
|
||||
I changed the format of the TIME column from just "seconds" to
|
||||
"minutes:seconds". I also made pausing work correctly. Screen
|
||||
redraws with an up to date display. For compatibility with 4.2, I
|
||||
changed the name of the "zero" function to "bzero". The makefile
|
||||
has been altered to handle versions for 4.1 and 4.2, and README
|
||||
has been updated to reflect these recent changes.
|
@ -1,31 +0,0 @@
|
||||
DISCLAIMER
|
||||
|
||||
"top" is distributed free of charge. It should not be considered an
|
||||
official product of Group sys Consulting. William LeFebvre supports
|
||||
"top" in his spare time and as time permits.
|
||||
|
||||
NO WARRANTY:
|
||||
|
||||
BECAUSE "top" IS DISTRIBUTED FREE OF CHARGE, THERE IS ABSOLUTELY NO
|
||||
WARRANTY PROVIDED, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING, GROUP SYS CONSULTING, ARGONNE
|
||||
NATIONAL LABORATORY, NORTHWESTERN UNIVERSITY, WILLIAM N. LeFEBVRE
|
||||
AND/OR OTHER PARTIES PROVIDE "top" "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
PROGRAM IS WITH YOU. SHOULD THE "top" PROGRAM PROVE DEFECTIVE, YOU
|
||||
ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
IN NO EVENT WILL GROUP SYS CONSULTING, ARGONNE NATIONAL LABORATORY,
|
||||
NORTHWESTERN UNIVERSITY, WILLIAM N. LeFEBVRE, AND/OR ANY OTHER PARTY
|
||||
WHO MAY MODIFY AND REDISTRIBUTE "top", BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL
|
||||
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
|
||||
(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
|
||||
INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE
|
||||
PROGRAM TO OPERATE WITH OTHER PROGRAMS) THE PROGRAM, EVEN IF YOU HAVE
|
||||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY
|
||||
ANY OTHER PARTY.
|
||||
|
||||
So there!
|
256
usr.bin/top/FAQ
256
usr.bin/top/FAQ
@ -1,256 +0,0 @@
|
||||
TOP
|
||||
Version 3.5
|
||||
Beta Release 9
|
||||
|
||||
William LeFebvre
|
||||
with much help from others
|
||||
|
||||
|
||||
FREQUENTLY ASKED QUESTIONS AND THEIR ANSWERS
|
||||
|
||||
This FAQ is broken out in to several topics.
|
||||
|
||||
|
||||
GENERAL
|
||||
|
||||
1. "Where do I get the latest version of top?"
|
||||
|
||||
The latest version of top is now available at the site "ftp.groupsys.com" in
|
||||
the directory "/pub/top". It is also available at "eecs.nwu.edu" in the
|
||||
directory "/pub/top".
|
||||
|
||||
2. "Is there a web page for top?"
|
||||
|
||||
Not at this time, but I am planning one. When it is finally available, you
|
||||
will be able to find it at "www.groupsys.com."
|
||||
|
||||
3. "Is there a mailing list for top?"
|
||||
|
||||
The official list for announcements is "top-announce@groupsys.com".
|
||||
This list is managed by "majordomo@groupsys.com". Announcements of
|
||||
importance to all top users will be sent to this list, including new
|
||||
releases, availability of beta test versions, emergency revisions and
|
||||
patches, etc. Anyone is welcome to join top-announce. This is a
|
||||
read-only list. The list of subscribers will not (intentionally) be
|
||||
made available, and postings to the list are limited.
|
||||
|
||||
In addition, there is a top developers mailing list that is used by
|
||||
beta testers and other people who help me port the program to various
|
||||
machines. Membership to this list is solely at my discretion. If you
|
||||
feel qualified to act as a beta tester, or if you are doing development
|
||||
work on top (such as porting to a new platform), you may submit a
|
||||
request by sending a message to "top-spinners-request@groupsys.com"
|
||||
containing the word "subscribe". I will contact you within a few days,
|
||||
as my schedule permits.
|
||||
|
||||
4. "Why does it take so long for a new version of top to go through the
|
||||
beta test process?"
|
||||
|
||||
This is completely my fault. I have just not had the time recently to give
|
||||
top the attention it deserves. I thank everyone for their patience, and I
|
||||
hope that with the recent changes in the direction of my career that I can
|
||||
spend more time on this.
|
||||
|
||||
5. "Top is not written in ANSI C. Do you ever plan to change that?"
|
||||
|
||||
Top predates ANSI C by about 5 years. Yeah, it'll get "fixed" eventually.
|
||||
Probably in 3.6.
|
||||
|
||||
6. "What about Year 2000 compliance"?
|
||||
|
||||
Top should not experience any problems with the transition to the year
|
||||
2000. A full statement concerning top and the year 2000 can be found
|
||||
in the file "Y2K" included with the distribution.
|
||||
|
||||
|
||||
CONFIGURING
|
||||
|
||||
7. "Configure said that it saw /proc and is recommending that I install top
|
||||
setuid root. Is there any way around this? Is it safe?"
|
||||
|
||||
There is no way around it. Complain to POSIX. Every effort has been made
|
||||
to make top a secure setuid program. However, we cannot guarantee that
|
||||
there are no security problems associated with this configuration. The
|
||||
places where top is most vulnerable are the builtin kill and renice
|
||||
commands. There is no internal top command that causes top to start a shell
|
||||
as a subprocess. Some SVR4 systems may contain a bug that enables a user to
|
||||
renice his own processes downward (to lower nice values that are more
|
||||
favorable for the process). This problem has been fixed for the Solaris 2.x
|
||||
modules, but may still exist in others. We will hopefully fix this up in
|
||||
the next release.
|
||||
|
||||
8. "Why is Configure a c-shell script? I thought c-shell scripts were
|
||||
evil?"
|
||||
|
||||
They are. :-) I'll probably be rewriting the Configure script for the
|
||||
next release, or switching to something like Gnu configure.
|
||||
|
||||
|
||||
COMPILING
|
||||
|
||||
9. "We just upgraded our operating system to a new version and top broke.
|
||||
What should we do?"
|
||||
|
||||
Recompile it. Top is very sensitive to changes in internal kernel data
|
||||
structures. It is not uncommon for a new version of the operating system to
|
||||
include changes to kernel data structures.
|
||||
|
||||
|
||||
RUNNING
|
||||
|
||||
10. "I just finished compiling top and it works fine for root, but when
|
||||
I try to run it as a regular user it either complains about files
|
||||
it can't open or it doesn't display all the information it should.
|
||||
Did I do something wrong?"
|
||||
|
||||
Well, you're just not done. On many operating systems today, access to
|
||||
many of the kernel memory devices and other system files is restricted to
|
||||
either root or a particular group. The Configure script figures this out
|
||||
(usually) and makes sure that the "intsall" rule in the Makefile will
|
||||
install top so that anyone can run it successfully. However, you have to
|
||||
*install* it first. Do this with the command "make install".
|
||||
|
||||
11. "Top is (not) displaying idle processes and I don't (do) want it to."
|
||||
|
||||
This default has only changed about a dozen times, and I finally got tired
|
||||
of people whining about it. Go read the manual page for the current version
|
||||
and pay special attention to the description of the "TOP" environment
|
||||
variable.
|
||||
|
||||
12. "We have so much memory in our machine that the memory status display
|
||||
(the fourth line) ends up being longer than 80 characters. This
|
||||
completely messes up top's output. Is there a patch?"
|
||||
|
||||
Most modules have been changed to use new memory formatting functions which
|
||||
will display large values in terms of megabytes instead of kilobytes. This
|
||||
should fix all occurences of this problem. If you encounter a system where
|
||||
this large memory display overflow is still occurring, please let me know
|
||||
(send mail to <wnl@groupsys.com>). Also note that newer versions of top can
|
||||
use columns beyond 79, and understand window resizes. So you can always
|
||||
make your window bigger.
|
||||
|
||||
13. "I tried to compile top with gcc and it doesn't work. I get
|
||||
compilation errors in the include files, or I get an executable that
|
||||
dumps core, or top displays incorrect numbers in some of the displays.
|
||||
What's wrong?"
|
||||
|
||||
Gnu CC likes very much to use its own include files. Not being a gcc
|
||||
expert, I can't explain why it does this. But I can tell you that if
|
||||
you upgrade your operating system (say from Solaris 2.4 to Solaris
|
||||
2.5) after installing gcc, then the include files that gcc uses will
|
||||
be incorrect, especially those found in the "sys" directory. Your
|
||||
choices are: (1) rebuild and reinstall the "standard" include files
|
||||
for gcc (look for scripts in the distribution called "fixincludes" and
|
||||
"fixing.svr4"), (2) compile machine.c with "CFLAGS=-I/usr/include"
|
||||
then make the rest of the object files normally, or (3) use "cc".
|
||||
Solaris 2.6 users should also consult FAQ #20.
|
||||
|
||||
14. "The cpu state percentages are all wrong, indicating that my machine is
|
||||
using 95% system time when it is clearly idle. What's wrong?"
|
||||
|
||||
This can happen if you compiled with gcc using the wrong include files.
|
||||
See the previous question.
|
||||
|
||||
|
||||
SUNOS PROBLEMS
|
||||
|
||||
15. "I tried compiling top under SunOS version 4.1.x and it got compile time
|
||||
errors. Is there a patch?"
|
||||
|
||||
If you try compiling top in a "System V environment" under SunOS (that is,
|
||||
/usr/5bin is before /usr/bin on your path) then the compilation may fail.
|
||||
This is mostly due to the fact that top thinks its being compiled on a
|
||||
System V machine when it really isn't. The only solution is to put /usr/bin
|
||||
and /usr/ucb before /usr/5bin on your path and try again.
|
||||
|
||||
|
||||
SVR4-derived PROBLEMS
|
||||
|
||||
16. "When I run top on my SVR4-derived operating system, it displays all
|
||||
the system information at the top but does not display any process
|
||||
information (or only displayes process information for my own
|
||||
processes). Yet when I run it as root, everything works fine."
|
||||
|
||||
Your system probably uses the pseudo file system "/proc", which is by
|
||||
default only accessible by root. Top needs to be installed setuid root on
|
||||
such systems if it is going to function correctly for normal users.
|
||||
|
||||
|
||||
SOLARIS PROBLEMS
|
||||
|
||||
17. "Under Solaris 2, when I run top as root it only shows root processes,
|
||||
or it only shows processes with a PID less than 1000. It refuses to
|
||||
show anything else. What do I do?"
|
||||
|
||||
You probably compiled it with /usr/ucb/cc instead of the real C compiler.
|
||||
/usr/ucb/cc is a cc front end that compiles programs in BSD source-level
|
||||
compatability mode. You do not want that. Make sure that /usr/ucb is not
|
||||
on your path and try compiling top again.
|
||||
|
||||
18. "Under Solaris 2, I compiled top using what I am sure is the correct
|
||||
compiler but when I try to run it it complains about missing dynamic
|
||||
libraries. What is wrong?"
|
||||
|
||||
Check to see if you have LD_LIBRARY_PATH defined in your shell. If you do,
|
||||
make sure that /usr/ucblib is not on the path anywhere. Then try compiling
|
||||
top again.
|
||||
|
||||
19. "Under Solaris 2, when I try to run top it complains that it can't open
|
||||
the library "libucb.so.1". So I changed the LIBS line in m_sunos5.c
|
||||
to include -R/usr/ucblib to make sure that the dynamic linker will look
|
||||
there when top runs. I figured this was just an oversight. Was I
|
||||
right?"
|
||||
|
||||
No, you were not right. As distributed, top requires NO alterations
|
||||
for successful compilation and operations under any release of Solaris
|
||||
2. You probably compiled top with /usr/ucb/cc instead of the real C
|
||||
compiler. See FAQ #10 for more details.
|
||||
|
||||
20. "When I try to compile top under Solaris 2.6 using gcc I get compile
|
||||
time errors. There appear to be problems with the include files,
|
||||
such as 'u_rlimit has incomplete type' and/or 'u_saved_rlimit has
|
||||
incomplete type'. I've already run fixinc.svr4 as per FAQ #13.
|
||||
Why didn't that fix it?"
|
||||
|
||||
Only top versions 3.5 and later are compatible with Solaris 2.6. Make
|
||||
sure you are using the most up-to-date version.
|
||||
|
||||
|
||||
SCO PROBLEMS
|
||||
|
||||
21. "When I try to run Configure, it complains about a syntax error."
|
||||
|
||||
Some versions of SCO's csh do not understand the syntax "$<". Earlier
|
||||
releases of top depended on this syntax to read input from the installer's
|
||||
terminal during the installation process. Version 3.5 fixes this.
|
||||
|
||||
|
||||
SVR42 PROBLEMS
|
||||
|
||||
22. "The load average and memory displays don't work right. Why?"
|
||||
|
||||
This is a known bug with the svr42 module. The problem has been traced down
|
||||
to a potential bug in the "mem" driver. The author of the svr42 module is
|
||||
working on a fix.
|
||||
|
||||
|
||||
STILL STUCK
|
||||
|
||||
23. I'm still stuck. To whom do I report problems with top?"
|
||||
|
||||
The most common problems are caused by top's sensitivity to internal kernel
|
||||
data structures. So make sure that you are using the right include files,
|
||||
and make sure that you test out top on the same machine where you compiled
|
||||
it. Sun's BSD Source Compatability Mode is also a common culprit. Make
|
||||
sure you aren't using either /usr/ucb/cc or any of the libraries in
|
||||
/usr/ucblib. Finally, make sure you are using the correct module. If there
|
||||
does not appear to be one appropriate for your computer, then top probably
|
||||
will not work on your system.
|
||||
|
||||
If after reading all of this file and checking everything you can you are
|
||||
still stuck, then send mail to "wnl@groupsys.com". I will answer your mail
|
||||
when I have time. Please bear with me in that regard! If it looks like the
|
||||
problem is machine-specific, I will forward the report along to the module's
|
||||
author. If you would like to converse directly with the module author, the
|
||||
authors' names are listed at the beginning of the module .c file in the
|
||||
"machine" directory.
|
@ -1,166 +0,0 @@
|
||||
TOP
|
||||
Version 3.4
|
||||
|
||||
William LeFebvre
|
||||
and a cast of dozens
|
||||
|
||||
INSTALLATION
|
||||
|
||||
Configuration and installation of top is very straightforward. After
|
||||
unpacking the sources, run the script "Configure". It will present you
|
||||
with a series of questions, all of which should be explained in the
|
||||
presentation. After you have answered all the questions, "Configure" will
|
||||
perform all the necessary configuration. Once this is finished, type
|
||||
"make install". Make will compile the sources then install the resulting
|
||||
executable and manual page in the appropriate places.
|
||||
|
||||
The most difficult step in the configuration is the choice of an
|
||||
appropriate machine-specific module. The Configure script gives you a
|
||||
list of choices complete with brief descriptions of when each choice is
|
||||
appropriate. Each module is contained in a separate c file in the
|
||||
directory "machine". The module contains all of the machine-specific code
|
||||
that makes top work correctly on the architecture in question. All of the
|
||||
code in the top-level directory is machine-independent (or at least
|
||||
strives to be). Hints for some module choices that are not obvious are
|
||||
given at the end of this file.
|
||||
|
||||
The first comment in each c file in that directory contains the synopsis
|
||||
AND a detailed description of the machines for which that module is
|
||||
appropriate. It also contains a list of authors for that module. If you
|
||||
are really stumped in this choice, use grep to find your machine
|
||||
manufacturer's name or operating system name in machine/*.c. If you still
|
||||
can't find one that is appropriate, then chances are very good that one
|
||||
hasn't been written yet. If that is the case, then you are out of luck.
|
||||
|
||||
HANDLING MULTIPLE ARCHITECTURES
|
||||
|
||||
If you need to recompile top for a different architecture (that is, using
|
||||
a different module) you need to reconfigure top. A short cut is available
|
||||
to make this a little easier. If all of your previous answers to the
|
||||
configuration questions (except for the module name of course) are
|
||||
adequate for the new architecture, then you can just use the command
|
||||
"Configure <modulename>". The configuration script will reconfigure top
|
||||
using the new module and all the answers you gave last time. It will
|
||||
finish with a "make clean". Once that completes, type "make install"
|
||||
and make will compile the sources and do the installation.
|
||||
|
||||
HANDLING MULTIPLE OS VERSIONS
|
||||
|
||||
By far the most frequently received bug report for top is something like
|
||||
this: "We just upgraded our operating system to version 99.9.9.9 and top
|
||||
broke. What should we do?" The simple answer is "recompile".
|
||||
|
||||
Top is very sensitive to changes in internal kernel data structures
|
||||
(especially the proc and user structures). Some operating systems
|
||||
(especially SunOS) are notorious for changing these structure in every
|
||||
minor release of the OS. This means that a top executable made under one
|
||||
version of the OS will not always work correctly (if even at all) under
|
||||
another version. This is just one of those tough facts of life. There is
|
||||
really no way around it.
|
||||
|
||||
To make life even worse, some operating systems (SunOS again) will use
|
||||
slightly different proc and user structures on different models. For
|
||||
example, "top" built on a SparcStation 2 will not run correctly on a
|
||||
SparcStation 10, even if they are both running SunOS 4.1.3. These
|
||||
unfortunate circumstances make maintaining top very difficult, especially
|
||||
in an environment that runs several different versions of the same
|
||||
operating system.
|
||||
|
||||
But there is hope. If your operating system has a properly functioning
|
||||
"uname" command then you can handle this problem rather gracefully.
|
||||
Included in the distribution is a shell file called "metatop". All this
|
||||
shell file does is:
|
||||
|
||||
exec top-`uname -m`-`uname -r` "$@"
|
||||
|
||||
So when you run this script, it execs a filename that is unique to your
|
||||
specific machine architecture and your OS revision number.
|
||||
|
||||
To use "metatop", do the following:
|
||||
|
||||
. on any machine, run Configure and choose the module that is
|
||||
appropriate for the machine
|
||||
. for all machines which use the same module:
|
||||
. group machines according to machine architecture AND OS
|
||||
revision number (i.e.: sun4-4.1.1, sun4c-4.1.1, sun4c-4.1.2,
|
||||
sun4-4.1.3, sun4c-4.1.3, sun4m-4.1.3, ...)
|
||||
. for each group, choose one machine from that group and on it
|
||||
run "make clean; make installmeta".
|
||||
|
||||
|
||||
The "installmeta" rule in the makefile will insure that top is compiled,
|
||||
install the shell file "metatop" as "top", then install the executable
|
||||
"top" with a name appropriate to the machine architecture and OS revision.
|
||||
|
||||
|
||||
HINTS FOR CHOOSING THE CORRECT MODULE:
|
||||
|
||||
SOLARIS 2.x
|
||||
|
||||
All versions of Solaris will now work with the module sunos5. Version
|
||||
specific modules (such as sunos54) no longer exist.
|
||||
|
||||
|
||||
SUNOS 4.x AND MULTIPROCESSOR ARCHITECTURES
|
||||
|
||||
First, we need to be speaking the same language:
|
||||
|
||||
sun4 a regular sparc sun 4 architecture machine (sparc station 1,
|
||||
sparc station 2, IPC, SLC, etc.)
|
||||
|
||||
sun4m a multiprocessor sparc (Sparc 10, 4/670, 4/690)
|
||||
|
||||
I intended to write the sunos4 module so that an executable compiled on a
|
||||
sun4m machine would work correctly on a sun4 machine. Unfortunately my
|
||||
experiments indicate that this cannot be done. It turns out that the user
|
||||
structure is so different between these two architectures that nothing
|
||||
short of a serious hack will make the same executable work correctly on
|
||||
both machines. I recommend that you use the separate module "sunos4mp"
|
||||
when making an executable for a sun4m architecture, and use "sunos4" when
|
||||
making an executable for sun4 or sun4c architectures.
|
||||
|
||||
DIGITAL UNIX V4.0
|
||||
|
||||
This is the successor to DECOSF/1. Use the module decosf1.
|
||||
|
||||
SOLBOURNE OPERATING SYSTEM (OS/MP)
|
||||
|
||||
If you are running OS/MP version 4.1A, then use the module "osmp4.1a".
|
||||
|
||||
If you are running a version of OS/MP OLDER than 4.1A (that is, one
|
||||
of its predecessors), use the module "sunos4".
|
||||
|
||||
If you are running OS/MP 4.1B or LATER, use the module "sunos4mp".
|
||||
|
||||
HP/UX OPERATING SYSTEM
|
||||
|
||||
The module hpux8 works on all version 8 systems. Some say that it works
|
||||
with version 9 as well, but one user did send me a separate module for
|
||||
version 9. This module has only been tested on series 800 machines. I
|
||||
would recommend the following for those running version 9: try hpux9 and
|
||||
if it doesn't work then try hpux8. If neither work, then send mail to me
|
||||
and/or the modules' authors. Another note: we have a model 730 supposedly
|
||||
running version 9.01. The module hpux9 did not compile successfully, but
|
||||
the module hpux8 worked fine. The module hpux10 works on all revisions of
|
||||
HP/UX 10 except 10.10, where HP removed the definition of the proc structure
|
||||
from the system include files.
|
||||
|
||||
NET/2 386BSD SYSTEMS
|
||||
|
||||
If your version of the operating system has patchkit 2.4 installed,
|
||||
then you will need to modify machine/m_386bsd.c and uncomment the
|
||||
definition of PATCHED_KVM. This patchkit makes what more than a few
|
||||
people believe to be a wholly unnecessary patch to the way the kvm
|
||||
routines work.
|
||||
|
||||
A/UX SYSTEMS
|
||||
|
||||
There is a module for A/UX 3.0 and 3.1. Whether or not it works for
|
||||
any other version is not known. Proceed at your own risk.
|
||||
|
||||
Although AUX does not generally have a renice systemcall, it can be
|
||||
implemented by tweeking kernel memory. The flag IMPLEMENT_SETPRIORITY
|
||||
controls the inclusion of this code. It is off be default. While
|
||||
such a simple hack should not be difficult to get right, USE THIS
|
||||
FEATURE AT YOUR OWN RISK!
|
||||
|
@ -1,165 +0,0 @@
|
||||
Instructions for porting top to other architectures.
|
||||
|
||||
This is still a preliminary document. Suggestions for improvement are
|
||||
most welcome.
|
||||
|
||||
My address is now "wnl@groupsys.com".
|
||||
|
||||
Before you embark on a port, please send me a mail message telling me
|
||||
what platform you are porting top to. There are three reasons for
|
||||
this: (1) I may already have a port, (2) module naming needs to be
|
||||
centralized, (3) I want to loosely track the various porting efforts.
|
||||
You do not need to wait for an "okay", but I do want to know that you
|
||||
are working on it. And of course, once it is finished, please send me
|
||||
the module files so that I can add them to the main distribution!
|
||||
|
||||
----------
|
||||
|
||||
There is one set of functions which extract all the information that
|
||||
top needs for display. These functions are collected in to one file.
|
||||
To make top work on a different architecture simply requires a
|
||||
different implementation of these functions. The functions for a
|
||||
given architecture "foo" are stored in a file called "m_foo.c". The
|
||||
Configure script looks for these files and lets the configurer choose
|
||||
one of them. This file is called a "module". The idea is that making
|
||||
top work on a different machine only requires one additional file and
|
||||
does not require changes to any existing files.
|
||||
|
||||
A module template is included in the distribution, called "m-template".
|
||||
To write your own module, it is a good idea to start with this template.
|
||||
If you architecture is similar to one for which a module already
|
||||
exists, then you can start with that module instead. If you do so,
|
||||
remember to change the "AUTHOR" section at the top!
|
||||
|
||||
The first comment in a module contains information which is extracted
|
||||
and used by Configure. This information is marked with words in all
|
||||
capitals (such as "SYNOPSIS:" and "LIBS:"). Go look at m-template: it
|
||||
is fairly self-explanatory. The text after "LIBS:" (on the same line)
|
||||
is extracted and included in the LIBS definition of the Makefile so
|
||||
that extra libraries which may be necessary on some machines (such as
|
||||
"-lkvm") can be specified in the module. The text after "CFLAGS:"
|
||||
(on the same line) is extracted and included as flags in the "CFLAGS"
|
||||
definition of the Makefile (thus in every compilation step). This is
|
||||
used for rare circumstances only: please don't abuse this hook.
|
||||
|
||||
Some operating systems have idiosyncrasies which will affect the form
|
||||
and/or content of the information top displays. You may wish to
|
||||
document such anomalies in the top man page. This can be done by adding
|
||||
a file called m_{modulename}.man (where {modulename} is replaced with
|
||||
the name of the module). Configure will automatically add this file to
|
||||
the end of the man page. See m_sunos4.man for an example.
|
||||
|
||||
A module is concerned with two structures:
|
||||
|
||||
The statics struct is filled in by machine_init. Each item is a
|
||||
pointer to a list of character pointers. The list is terminated
|
||||
with a null pointer.
|
||||
|
||||
struct statics
|
||||
{
|
||||
char **procstate_names; /* process state names */
|
||||
char **cpustate_names; /* cpu state names */
|
||||
char **memory_names; /* memory information names */
|
||||
};
|
||||
|
||||
The system_info struct is filled in by get_system_info and
|
||||
get_process_info.
|
||||
|
||||
struct system_info
|
||||
{
|
||||
int last_pid; /* last pid assigned (0 means non-sequential assignment) */
|
||||
double load_avg[NUM_AVERAGES]; /* see below */
|
||||
int p_total; /* total number of processes */
|
||||
int p_active; /* number of procs considered "active" */
|
||||
int *procstates; /* array of process state counters */
|
||||
int *cpustates; /* array of cpustate counters */
|
||||
int *memory; /* memory information */
|
||||
};
|
||||
|
||||
The last three pointers each point to an array of integers. The
|
||||
length of the array is determined by the length of the corresponding
|
||||
_names array in the statics structure. Furthermore, if an entry in a
|
||||
_names array is the empty string ("") then the corresponding value in
|
||||
the value array will be skipped over. The display routine displays,
|
||||
for example, the string procstate_names[0] then the number
|
||||
procstates[0], then procstate_names[1], procstates[1], etc. until
|
||||
procstate_names[N] == NULL. This allows for a tremendous amount of
|
||||
flexibility in labeling the displayed values.
|
||||
|
||||
"procstates" and "memory" are displayed as straight integer values.
|
||||
Values in "cpustates" are displayed as a percentage * 10. For
|
||||
example, the (integer) value 105 is displayed as 10.5%.
|
||||
|
||||
These routines must be defined by the machine dependent module.
|
||||
|
||||
int machine_init(struct statics *)
|
||||
|
||||
returns 0 on success and -1 on failure,
|
||||
prints error messages
|
||||
|
||||
char *format_header(char *)
|
||||
|
||||
Returns a string which should be used as the header for the
|
||||
process display area. The argument is a string used to label
|
||||
the username column (either "USERNAME" or "UID") and is always
|
||||
8 characters in length.
|
||||
|
||||
void get_system_info(struct system_info *)
|
||||
|
||||
caddr_t get_process_info(struct system_info *, int, int, int (*func)())
|
||||
|
||||
returns a handle to use with format_next_process
|
||||
|
||||
char *format_next_process(caddr_t, char *(*func)())
|
||||
|
||||
returns string which describes next process
|
||||
|
||||
int proc_compare(caddr_t, caddr_t)
|
||||
|
||||
qsort comparison function
|
||||
|
||||
uid_t proc_owner(pid_t)
|
||||
|
||||
Returns the uid owner of the process specified by the pid argument.
|
||||
This function is VERY IMPORTANT. If it fails to do its job, then
|
||||
top may pose a security risk.
|
||||
|
||||
|
||||
get_process_info is called immediately after get_system_info. In
|
||||
fact, the two functions could be rolled in to one. The reason they
|
||||
are not is mostly historical.
|
||||
|
||||
Top relies on the existence of a function called "setpriority" to
|
||||
change a process's priority. This exists as a kernel call on most 4.3
|
||||
BSD derived Unixes. If neither your operating system nor your C
|
||||
library supplies such a function, then you will need to add one to the
|
||||
module. It is defined as follows:
|
||||
|
||||
int setpriority (int dummy, int who, int niceval)
|
||||
|
||||
For the purposes of top, the first argument is meaningless.
|
||||
The second is the pid and the third is the new nice value.
|
||||
This function should behave just like a kernel call, setting
|
||||
errno and returning -1 in case of an error. This function MUST
|
||||
check to make sure that a non-root user does not specify a nice
|
||||
value less than the process's current value. If it detects such
|
||||
a condition, it should set errno to EACCES and return -1.
|
||||
Other possible ERRNO values: ESRCH when pid "who" does not exist,
|
||||
EPERM when the invoker is not root and not the same as the
|
||||
process owner.
|
||||
|
||||
Note that top checks process ownership and should never call setpriority
|
||||
when the invoker's uid is not root and not the same as the process's owner
|
||||
uid.
|
||||
|
||||
|
||||
The file "machine.h" contains definitions which are useful to modules
|
||||
and to top.c (such as the structure definitions). You SHOULD NOT need
|
||||
to change it when porting to a new platform.
|
||||
|
||||
Porting to a new platform should NOT require any changes to existing
|
||||
files. You should only need to add m_ files. If you feel you need a
|
||||
change in one of the existing files, please contact me so that we can
|
||||
discuss the details. I want to keep such changes as general as
|
||||
possible.
|
||||
|
@ -1,192 +0,0 @@
|
||||
TOP
|
||||
Version 3.5
|
||||
|
||||
William LeFebvre
|
||||
and a cast of dozens
|
||||
|
||||
|
||||
If you do not want to read this entire file, then at least read
|
||||
the section at the end entitled "KNOWN PROBLEMS".
|
||||
|
||||
If you are having any problems getting top to work, please read the
|
||||
file "FAQ" *before* contacting me. Thank you.
|
||||
|
||||
"top" is a program that will give continual reports about the state of
|
||||
the system, including a list of the top cpu using processes. Version 3
|
||||
of "top" has three primary design goals: provide an accurate snapshot of
|
||||
the system and process state, not be one of the top processes itself, be
|
||||
as portable as possible.
|
||||
|
||||
Version 3 has many bug fixes from version 2.5, and it has also been
|
||||
reorganized in a major way to make it easy to port to other platforms.
|
||||
All system dependent code is now contained in one file.
|
||||
|
||||
Top now includes a configuration script called "Configure". It helps
|
||||
the installer choose the correct parameters for this particular
|
||||
installation. This script MUST be run before attempting to compile top.
|
||||
|
||||
Top requires read access to the memory files "/dev/kmem" and "/dev/mem"
|
||||
as well as the system image "/vmunix". Some installations have these
|
||||
files protected from general access. These sites would have to install
|
||||
this program in the same way that programs such as "ps" are installed.
|
||||
In addition, on those Unix variants that support the proc filesystem
|
||||
(such as SVR4 and Solaris 2), top requires read access to all the files
|
||||
in /proc: typically dictating that top be installed setuid to root.
|
||||
|
||||
CAVEAT: version 3 of top has internal commands that kill and renice
|
||||
processes. Although I have taken steps to insure that top makes
|
||||
appropriate checks with these commands, I cannot guarantee that these
|
||||
internal commands are totally secure. IF YOU INSTALL top as a SETUID
|
||||
program, you do so AT YOUR OWN RISK! I realize that some operating
|
||||
systems will require top to run setuid, and I will do everything I can
|
||||
to make sure that top is a secure setuid program.
|
||||
|
||||
Configure will ask you to input values for certain parameters. Before
|
||||
each parameter, Configure will display a description of what the
|
||||
parameter does. Read the description and choose an appropriate value.
|
||||
Sometimes a default will appear in brackets. Typing just return will
|
||||
choose the default.
|
||||
|
||||
System support now takes the form of "modules". Adding support for
|
||||
a different architecture requires only adding a module. Configure
|
||||
asks which module to use when it is configuring top. See the file
|
||||
"Porting" for a description of how to write your own module.
|
||||
|
||||
To compile and install "top", read the file "INSTALL" and follow the
|
||||
directions and advice contained therein.
|
||||
|
||||
Once you have created a binary for one particular type of machine, you
|
||||
can reconfigure for another type with "./Configure modulename" where
|
||||
"modulename" is replaced with the appropriate module name. All other
|
||||
parameter values are kept the same. Note that in some cases this may
|
||||
not be appropriate.
|
||||
|
||||
If you make any kind of change to "top" that you feel would be
|
||||
beneficial to others who use this program, or if you find and fix a bug,
|
||||
please send me the change.
|
||||
|
||||
Be sure to read the FAQ enclosed with the distrubution. It contains
|
||||
answers to the most commonly asked questions about the configuration,
|
||||
installation, and operation of top.
|
||||
|
||||
|
||||
AVAILABILITY
|
||||
|
||||
The latest version of "top" is now being made available via anonymous
|
||||
FTP from the host "ftp.groupsys.com" in the directory "/pub/top".
|
||||
Additional modules will be made available in the directory
|
||||
"/pub/top/m". The site "eecs.nwu.edu" will continue to house copies
|
||||
of the distribution as well.
|
||||
|
||||
Here are HTML links for the four best "top" archive sites:
|
||||
|
||||
<A HREF="ftp://ftp.groupsys.com/pub/top">Top archive (groupsys.com)</A>
|
||||
<A HREF="ftp://eecs.nwu.edu/pub/top">Top archive (eecs.nwu.edu)</A>
|
||||
<A HREF="ftp://pharos.dgim.doc.ca/packages/top"> Top mirror (dgim.doc.ca)</A>
|
||||
<A HREF="ftp://uiarchive.uiuc.edu/pub/packages/top/">Top mirror (uiuc.edu)</A>
|
||||
|
||||
New releases will be posted to comp.sources.unix as they become
|
||||
available. Sites which arhive that newsgroup will also contain copies
|
||||
of the distribution.
|
||||
|
||||
Announcements about availability will be made to the mailing list
|
||||
"top-announce@groupsys.com". This is an open list maintained by
|
||||
majordomo. To join the list, send a message containing the word
|
||||
"subscribe" to "top-announce-request@groupsys.com". Addresses of
|
||||
subscribers to this list are kept confidential and will never be used
|
||||
for any purpose other than as recipients of announements concerning
|
||||
this software.
|
||||
|
||||
|
||||
KNOWN PROBLEMS:
|
||||
|
||||
Gnu CC
|
||||
|
||||
Compiling via Gnu CC continued to be the source of most of the
|
||||
questions I receive. By far the most common mistake made by those
|
||||
attempting to compile top with Gnu CC is out of date include files.
|
||||
When the operating system is upgraded, the include files that are part
|
||||
of the gcc package MUST also be updated. Gcc maintains its own
|
||||
include files. Even a minor OS upgrade can involve changes to some of
|
||||
the kernel's internal data structures, which are defined in include
|
||||
files in "sys". Top is very sensitive to these changes. If you are
|
||||
compiling with gcc and experience any sort of strange problems, please
|
||||
make sure the include files you are using are up to date BEFORE
|
||||
sending me a bug report. Look in the gcc source distribution for the
|
||||
shell script "fixincludes".
|
||||
|
||||
HP/UX 10.10
|
||||
|
||||
In their infinite wisdom, the folks at HP have decided that mere mortals
|
||||
such as you and I don't need to know what the kernel's proc structure looks
|
||||
like. To that end, they have removed all useful content from the include
|
||||
file <sys/proc.h> in version 10.10. As a result, top will not compile
|
||||
under 10.10. What HP is trying to accomplish with this move is to force
|
||||
iconoclasts such as myself to use "pstat" for collecting all process
|
||||
information. I have no immediate solution for this problem, but hope to
|
||||
obtain a sufficiently complete definition of "struct proc" at some point in
|
||||
the near future. Stay tuned.
|
||||
|
||||
DIGITAL UNIX 4.0 (DECOSF/1 V4.0)
|
||||
|
||||
A user has reported that idle processes are not displayed regardless
|
||||
of the flags used when invoking top. We have not had time to track
|
||||
this problem down.
|
||||
|
||||
DECOSF/1 V3.0
|
||||
|
||||
There is a bug either in the module, in utils.c, or in DEC's optimizer that
|
||||
is tickled by the decosf1 module when compiled under V3.0 (and perhaps
|
||||
earlier versions). Top compiled using DEC's compiler with optimization
|
||||
will consistently produce a segmentation fault (in format_next_process
|
||||
while calling sprintf). To work around this problem, either compile top
|
||||
with gcc or turn off optimization (compile without -O). We think that
|
||||
one of the bugs fixed in utils.c fixed this problem as well, but we are
|
||||
not certain.
|
||||
|
||||
|
||||
System V R 4.2
|
||||
|
||||
Load average and memory displays do not work. The problem has been
|
||||
traced down to a potential bug in the "mem" driver. The author
|
||||
of the svr42 module is working on a fix.
|
||||
|
||||
|
||||
|
||||
GRATITUDE
|
||||
|
||||
My perpetual thanks to all the people who have helped me support top
|
||||
on so many platforms. Without these people, top would not be what it
|
||||
is. Here is a partial list of contributors and other individuals.
|
||||
|
||||
Robert Boucher <boucher@sofkin.ca>
|
||||
Marc Cohen <marc@aai.com>
|
||||
David Cutter <dpc@grail.com>
|
||||
Casper Dik <Casper.Dik@Sun.COM>
|
||||
Charles Hedrick <hedrick@geneva.rutgers.edu>
|
||||
Andrew Herbert <andrew@werple.apana.org.au>
|
||||
Jeff Janvrin <jeff.janvrin@columbiasc.ncr.com>
|
||||
Torsten Kasch <torsten@techfak.uni-bielefeld.de>
|
||||
Petri Kutvonen <kutvonen@cs.helsinki.fi>
|
||||
William L. Jones <jones@chpc>
|
||||
Tim Pugh <tpugh@oce.orst.edu>
|
||||
Steve Scherf <scherf@swdc.stratus.com>
|
||||
Phillip Wu <pwu01@qantek.com.au>
|
||||
|
||||
(My apologies if I missed anyone.)
|
||||
|
||||
|
||||
AUTHOR
|
||||
|
||||
William LeFebvre
|
||||
Group sys Consulting
|
||||
wnl@groupsys.com
|
||||
|
||||
|
||||
U.S. Mail address:
|
||||
William LeFebvre
|
||||
Group sys Consulting
|
||||
11585 Jones Bridge Road
|
||||
Suite 420-139
|
||||
Alpharetta, GA 30022
|
||||
(770) 813-3224
|
@ -1,26 +0,0 @@
|
||||
Top and the Year 2000
|
||||
|
||||
The software package top will not be affected by years numbering
|
||||
between 2000 and 2037. No portion of the top code stores dates on
|
||||
disk. All date processing in top is performed with functions from the
|
||||
Unix C library and Unix kernel. The specific functions are: time(2)
|
||||
and ctime(3S). These functions deal exclusively with conventional
|
||||
Unix time values (number of seconds since Midnight January 1, 1970
|
||||
GMT) and produce strings with a 4-digit year. At no point in the code
|
||||
for top are the last two digits used to represent a year.
|
||||
|
||||
Top and the Year 2038
|
||||
|
||||
In the year 2038 top will fail to represent the time of day correctly
|
||||
on 32-bit Unix operating systems. This is due to a limitation in the
|
||||
way Unix represents time. Top will only work on systems whose kernel
|
||||
call "time" and C library call "ctime" have been adjusted to represent
|
||||
time with a value greater than 32 bits. The exact date and time of
|
||||
this failure is 3:14:08 January 19, 2038 GMT. Note that this failure
|
||||
will only affect the display of the current time in the output from
|
||||
top.
|
||||
|
||||
|
||||
THERE IS ABSOLUTELY NO WARRANTY PROVIDED WITH THIS SOFTWARE.
|
||||
Please see the contents of the file "DISCLAIMER" for further
|
||||
information.
|
@ -1,90 +0,0 @@
|
||||
/*
|
||||
* "getopt" routine customized for top.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Many modern-day Unix implementations already have this function
|
||||
* in libc. The standard "getopt" is perfectly sufficient for top's
|
||||
* needs. If such a function exists in libc then you certainly don't
|
||||
* need to compile this one in. To prevent this function from being
|
||||
* compiled, define "HAVE_GETOPT". This is usually done in the "CFLAGS"
|
||||
* line of the corresponding machine module.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This empty declaration exists solely to placate overexhuberant C
|
||||
* compilers that like to warn you about content-free files.
|
||||
*/
|
||||
static void __empty();
|
||||
|
||||
#ifndef HAVE_GETOPT
|
||||
|
||||
/*LINTLIBRARY*/
|
||||
|
||||
#include "os.h"
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
#ifndef EOF
|
||||
#define EOF (-1)
|
||||
#endif
|
||||
#define ERR(s, c) if(opterr){\
|
||||
extern int write();\
|
||||
char errbuf[2];\
|
||||
errbuf[0] = c; errbuf[1] = '\n';\
|
||||
(void) write(2, argv[0], strlen(argv[0]));\
|
||||
(void) write(2, s, strlen(s));\
|
||||
(void) write(2, errbuf, 2);}
|
||||
|
||||
|
||||
int opterr = 1;
|
||||
int optind = 1;
|
||||
int optopt;
|
||||
char *optarg;
|
||||
|
||||
int
|
||||
getopt(argc, argv, opts)
|
||||
int argc;
|
||||
char **argv, *opts;
|
||||
{
|
||||
static int sp = 1;
|
||||
register int c;
|
||||
register char *cp;
|
||||
|
||||
if(sp == 1)
|
||||
if(optind >= argc ||
|
||||
argv[optind][0] != '-' || argv[optind][1] == '\0')
|
||||
return(EOF);
|
||||
else if(strcmp(argv[optind], "--") == 0) {
|
||||
optind++;
|
||||
return(EOF);
|
||||
}
|
||||
optopt = c = argv[optind][sp];
|
||||
if(c == ':' || (cp=strchr(opts, c)) == NULL) {
|
||||
ERR(": unknown option, -", c);
|
||||
if(argv[optind][++sp] == '\0') {
|
||||
optind++;
|
||||
sp = 1;
|
||||
}
|
||||
return('?');
|
||||
}
|
||||
if(*++cp == ':') {
|
||||
if(argv[optind][sp+1] != '\0')
|
||||
optarg = &argv[optind++][sp+1];
|
||||
else if(++optind >= argc) {
|
||||
ERR(": argument missing for -", c);
|
||||
sp = 1;
|
||||
return('?');
|
||||
} else
|
||||
optarg = argv[optind++];
|
||||
sp = 1;
|
||||
} else {
|
||||
if(argv[optind][++sp] == '\0') {
|
||||
sp = 1;
|
||||
optind++;
|
||||
}
|
||||
optarg = NULL;
|
||||
}
|
||||
return(c);
|
||||
}
|
||||
#endif /* HAVE_GETOPT */
|
@ -1,69 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# this shell script is amazingly similar to the old and lamented
|
||||
# BSD "install" command. It recognized the following options:
|
||||
#
|
||||
# -o target file owner
|
||||
# -m target file mode
|
||||
# -g target file group owner
|
||||
#
|
||||
#
|
||||
# scan the options
|
||||
#
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
-o)
|
||||
owner=$2
|
||||
shift ; shift
|
||||
;;
|
||||
|
||||
-m)
|
||||
mode=$2
|
||||
shift; shift
|
||||
;;
|
||||
|
||||
-g)
|
||||
group=$2
|
||||
shift ; shift
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo "install: unknown option $1"
|
||||
exit
|
||||
;;
|
||||
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
#
|
||||
# we need two more: filename and destination
|
||||
#
|
||||
if [ $# -ne 2 ]; then
|
||||
echo "Usage: install [ -o owner ] [ -m mode ] [ -g group ] file destination"
|
||||
exit
|
||||
fi
|
||||
#
|
||||
# first, copy
|
||||
#
|
||||
cp $1 $2
|
||||
#
|
||||
# normalize the name
|
||||
#
|
||||
dest=$2
|
||||
if [ -d $2 ]; then
|
||||
dest=$2/`basename $1`
|
||||
fi
|
||||
#
|
||||
# do optional things
|
||||
#
|
||||
if [ "$owner" ]; then
|
||||
chown $owner $dest
|
||||
fi
|
||||
if [ "$group" ]; then
|
||||
chgrp $group $dest
|
||||
fi
|
||||
if [ "$mode" ]; then
|
||||
chmod $mode $dest
|
||||
fi
|
@ -1,241 +0,0 @@
|
||||
/*
|
||||
* top - a top users display for Unix
|
||||
*
|
||||
* THIS IS A TEMPLATE FILE FOR A MACHINE DEPENDENT (m_...c) FILE
|
||||
*
|
||||
* SYNOPSIS: one line description of machine this module works with
|
||||
*
|
||||
* DESCRIPTION:
|
||||
* Detailed description of this machine dependent module.
|
||||
* It can be multiple lines, but a blank comment line (one with only an
|
||||
* asterisk) is considered to end it. Place here a complete list of
|
||||
* the machines and OS versions that this module works on.
|
||||
*
|
||||
* LIBS: list of special libraries to include at link step (REMOVE THIS LINE IF NOT NEEDED)
|
||||
*
|
||||
* AUTHOR: your name and <your@internet.address>
|
||||
*/
|
||||
|
||||
#include "top.h"
|
||||
#include "machine.h"
|
||||
|
||||
|
||||
/*
|
||||
* These definitions control the format of the per-process area
|
||||
*/
|
||||
|
||||
static char header[] =
|
||||
" PID X PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND";
|
||||
/* 0123456 -- field to fill in starts at header+6 */
|
||||
#define UNAME_START 6
|
||||
|
||||
#define Proc_format \
|
||||
"%5d %-8.8s %3d %4d%6dK %4dK %-5s%4d:%02d %5.2f%% %5.2f%% %.14s"
|
||||
|
||||
/* these are for detailing the process states */
|
||||
|
||||
int process_states[?];
|
||||
char *procstatenames[] = {
|
||||
"", " sleeping, ", " ABANDONED, ", " running, ", " starting, ",
|
||||
" zombie, ", " stopped, ",
|
||||
NULL
|
||||
};
|
||||
|
||||
/* these are for detailing the cpu states */
|
||||
|
||||
int cpu_states[?];
|
||||
char *cpustatenames[] = {
|
||||
"user", "nice", "system", "idle",
|
||||
NULL
|
||||
};
|
||||
|
||||
/* these are for detailing the memory statistics */
|
||||
|
||||
int memory_stats[?];
|
||||
char *memorynames[] = {
|
||||
"K available, ", "K in use, ", "K free, ", "K locked", NULL
|
||||
};
|
||||
|
||||
/* useful externals */
|
||||
extern int errno;
|
||||
extern char *sys_errlist[];
|
||||
|
||||
long lseek();
|
||||
long time();
|
||||
long percentages();
|
||||
|
||||
machine_init(statics)
|
||||
|
||||
struct statics *statics;
|
||||
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
char *format_header(uname_field)
|
||||
|
||||
register char *uname_field;
|
||||
|
||||
{
|
||||
register char *ptr;
|
||||
|
||||
ptr = header + UNAME_START;
|
||||
while (*uname_field != '\0')
|
||||
{
|
||||
*ptr++ = *uname_field++;
|
||||
}
|
||||
|
||||
return(header);
|
||||
}
|
||||
|
||||
get_system_info(si)
|
||||
|
||||
struct system_info *si;
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
static struct handle handle;
|
||||
|
||||
caddr_t get_process_info(si, sel, compare)
|
||||
|
||||
struct system_info *si;
|
||||
struct process_select *sel;
|
||||
int (*compare)();
|
||||
|
||||
{
|
||||
return((caddr_t)&handle);
|
||||
}
|
||||
|
||||
char fmt[128]; /* static area where result is built */
|
||||
|
||||
/* define what weighted cpu is. */
|
||||
#define weighted_cpu(pct, pp) ((pp)->p_time == 0 ? 0.0 : \
|
||||
((pct) / (1.0 - exp((pp)->p_time * logcpu))))
|
||||
|
||||
char *format_next_process(handle, get_userid)
|
||||
|
||||
caddr_t handle;
|
||||
char *(*get_userid)();
|
||||
|
||||
{
|
||||
return(fmt);
|
||||
}
|
||||
|
||||
/*
|
||||
* getkval(offset, ptr, size, refstr) - get a value out of the kernel.
|
||||
* "offset" is the byte offset into the kernel for the desired value,
|
||||
* "ptr" points to a buffer into which the value is retrieved,
|
||||
* "size" is the size of the buffer (and the object to retrieve),
|
||||
* "refstr" is a reference string used when printing error meessages,
|
||||
* if "refstr" starts with a '!', then a failure on read will not
|
||||
* be fatal (this may seem like a silly way to do things, but I
|
||||
* really didn't want the overhead of another argument).
|
||||
*
|
||||
*/
|
||||
|
||||
getkval(offset, ptr, size, refstr)
|
||||
|
||||
unsigned long offset;
|
||||
int *ptr;
|
||||
int size;
|
||||
char *refstr;
|
||||
|
||||
{
|
||||
if (kvm_read(kd, offset, ptr, size) != size)
|
||||
{
|
||||
if (*refstr == '!')
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "top: kvm_read for %s: %s\n",
|
||||
refstr, sys_errlist[errno]);
|
||||
quit(23);
|
||||
}
|
||||
}
|
||||
return(1);
|
||||
}
|
||||
|
||||
/* comparison routine for qsort */
|
||||
/* NOTE: this is specific to the BSD proc structure, but it should
|
||||
give you a good place to start. */
|
||||
|
||||
/*
|
||||
* proc_compare - comparison function for "qsort"
|
||||
* Compares the resource consumption of two processes using five
|
||||
* distinct keys. The keys (in descending order of importance) are:
|
||||
* percent cpu, cpu ticks, state, resident set size, total virtual
|
||||
* memory usage. The process states are ordered as follows (from least
|
||||
* to most important): WAIT, zombie, sleep, stop, start, run. The
|
||||
* array declaration below maps a process state index into a number
|
||||
* that reflects this ordering.
|
||||
*/
|
||||
|
||||
static unsigned char sorted_state[] =
|
||||
{
|
||||
0, /* not used */
|
||||
3, /* sleep */
|
||||
1, /* ABANDONED (WAIT) */
|
||||
6, /* run */
|
||||
5, /* start */
|
||||
2, /* zombie */
|
||||
4 /* stop */
|
||||
};
|
||||
|
||||
proc_compare(pp1, pp2)
|
||||
|
||||
struct proc **pp1;
|
||||
struct proc **pp2;
|
||||
|
||||
{
|
||||
register struct proc *p1;
|
||||
register struct proc *p2;
|
||||
register int result;
|
||||
register pctcpu lresult;
|
||||
|
||||
/* remove one level of indirection */
|
||||
p1 = *pp1;
|
||||
p2 = *pp2;
|
||||
|
||||
/* compare percent cpu (pctcpu) */
|
||||
if ((lresult = p2->p_pctcpu - p1->p_pctcpu) == 0)
|
||||
{
|
||||
/* use cpticks to break the tie */
|
||||
if ((result = p2->p_cpticks - p1->p_cpticks) == 0)
|
||||
{
|
||||
/* use process state to break the tie */
|
||||
if ((result = sorted_state[p2->p_stat] -
|
||||
sorted_state[p1->p_stat]) == 0)
|
||||
{
|
||||
/* use priority to break the tie */
|
||||
if ((result = p2->p_pri - p1->p_pri) == 0)
|
||||
{
|
||||
/* use resident set size (rssize) to break the tie */
|
||||
if ((result = p2->p_rssize - p1->p_rssize) == 0)
|
||||
{
|
||||
/* use total memory to break the tie */
|
||||
result = PROCSIZE(p2) - PROCSIZE(p1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result = lresult < 0 ? -1 : 1;
|
||||
}
|
||||
|
||||
return(result);
|
||||
}
|
||||
|
||||
proc_owner(pid)
|
||||
|
||||
int pid;
|
||||
|
||||
{
|
||||
/* returns uid of owner of process pid */
|
||||
return(uid);
|
||||
}
|
||||
|
@ -1,25 +0,0 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Top is very sensitive to differences in the kernel, so much so that an
|
||||
# executable created on one sub-architecture may not work on others. It
|
||||
# is also quite common for a minor OS revision to require recompilation of
|
||||
# top. Both of these problems are especially prevalent on Suns. For
|
||||
# example, a top executable made under SunOS 4.1.1 will not run correctly
|
||||
# under SunOS 4.1.2, and vice versa. "metatop" attempts to solve this
|
||||
# problem by choosing one of several possible top executables to run then
|
||||
# executing it.
|
||||
#
|
||||
# To use metatop your operating system needs to have the command "uname"
|
||||
# as part of the standard OS release. MAKE SURE IT DOES before proceeding.
|
||||
# It will try to execute the command "top-`uname -m`-`uname -r`" For
|
||||
# example, on a sparcstation 1 running SunOS 4.1.1, it will try to run
|
||||
# "top-sun4c-4.1.1".
|
||||
#
|
||||
# INSTALLATION is easy. Just compile top as normal. Then use the command
|
||||
# "make metainstall" (on the same machine!) instead of the usual. "make"
|
||||
# will insure that this shell script is installed correctly then will install
|
||||
# the most recently made top executable with the correct name. Remember:
|
||||
# you will need to "make clean" and "make metainstall" on every different
|
||||
# combination of sub-architecture and OS version that you have.
|
||||
#
|
||||
exec $0-`uname -m`-`uname -r` "$@"
|
Loading…
Reference in New Issue
Block a user