README revision 1.1 1 1.1 christos TOP
2 1.1 christos Version 3.8beta1
3 1.1 christos
4 1.1 christos William LeFebvre
5 1.1 christos and a cast of dozens
6 1.1 christos
7 1.1 christos
8 1.1 christos If you do not want to read this entire file, then at least read
9 1.1 christos the section at the end entitled "KNOWN PROBLEMS".
10 1.1 christos
11 1.1 christos If you are having any problems getting top to work, please read the
12 1.1 christos file "FAQ" *before* contacting me. Thank you.
13 1.1 christos
14 1.1 christos "top" is a program that will give continual reports about the state of
15 1.1 christos the system, including a list of the top cpu using processes. Version 3
16 1.1 christos of "top" has three primary design goals: provide an accurate snapshot of
17 1.1 christos the system and process state, not be one of the top processes itself, be
18 1.1 christos as portable as possible.
19 1.1 christos
20 1.1 christos Version 3 has many bug fixes from version 2.5, and it has also been
21 1.1 christos reorganized in a major way to make it easy to port to other platforms.
22 1.1 christos All system dependent code is now contained in one file.
23 1.1 christos
24 1.1 christos Starting with version 3.6, top includes a "configure" script generated
25 1.1 christos by Gnu's autoconf. This script MUST be run before attempting to
26 1.1 christos compile top. It will explore the system and generate approriate
27 1.1 christos contents for Makefile, config.h, and top.1.
28 1.1 christos
29 1.1 christos On some systems, top requires read access to the memory files
30 1.1 christos "/dev/kmem" and "/dev/mem" as well as the system's kernel image. Most
31 1.1 christos installations have these files protected from general access. These
32 1.1 christos sites would have to install this program in the same way that programs
33 1.1 christos such as "ps" are installed. On most systems with a /proc file system,
34 1.1 christos top will try to read everything it can from /proc, but may need extra
35 1.1 christos permissions to do so. The configure script will determine the
36 1.1 christos permissions needed by the top binary, and a "make install" as root
37 1.1 christos will get the binary installed correctly. Sometimes this requires that
38 1.1 christos the binary be installed with set-group-id privileges and, in rare
39 1.1 christos cases, set-user-id to root.
40 1.1 christos
41 1.1 christos CAVEAT: version 3 of top has internal commands that kill and renice
42 1.1 christos processes. Although I have taken steps to insure that top makes
43 1.1 christos appropriate checks with these commands, I cannot guarantee that these
44 1.1 christos internal commands are totally secure. IF YOU INSTALL top SET-USER-ID
45 1.1 christos TO ROOT, YOU DO SO AT YOUR OWN RISK! I realize that some operating
46 1.1 christos systems will require top to run setuid root, and I will do everything
47 1.1 christos I can to make sure that top is a secure setuid program.
48 1.1 christos
49 1.1 christos System support now takes the form of "modules". Adding support for a
50 1.1 christos different architecture requires only adding a module. These modules
51 1.1 christos are contained in the subdirectory "machine". The "configure" script
52 1.1 christos automatically determines which module is approproate. However, it may
53 1.1 christos not be able to determine what the correct module is. This can happen
54 1.1 christos either because it doesn't know about the system or there is no module
55 1.1 christos to support the system. In the former case, if you know which module
56 1.1 christos to use, you can force "configure" to choose a particular module with
57 1.1 christos the option "--with-module". For example, if you want to force the use
58 1.1 christos of the svr4 module (which appears as "machine/m_svr4.c") then use
59 1.1 christos "configure --with-module=svr4" to generate the correct Makefile. See
60 1.1 christos the file "Porting" for a description of how to write your own module.
61 1.1 christos
62 1.1 christos To compile and install "top", read the file "INSTALL" and follow the
63 1.1 christos directions and advice contained therein.
64 1.1 christos
65 1.1 christos If you make any kind of change to "top" that you feel would be
66 1.1 christos beneficial to others who use this program, or if you find and fix a bug,
67 1.1 christos please send me the change.
68 1.1 christos
69 1.1 christos Be sure to read the FAQ enclosed with the distrubution. It contains
70 1.1 christos answers to the most commonly asked questions about the configuration,
71 1.1 christos installation, and operation of top.
72 1.1 christos
73 1.1 christos COLOR
74 1.1 christos
75 1.1 christos Version 3.6 incorporated the idea of using ANSI color sequences to
76 1.1 christos enhance information on the screen. By default, no color is used. But
77 1.1 christos you can configure the use of color through the environment variable
78 1.1 christos TOPCOLORS (or, for compatibility, TOPCOLOURS). The interface is
79 1.1 christos identical to the one first implemented by chris (a] spang.uk.eu.org, but
80 1.1 christos the implementation is entirely different. The option -C can be used
81 1.1 christos to diable the feature entirely.
82 1.1 christos
83 1.1 christos Any information at the top of the screen can be enhanced with color.
84 1.1 christos However, due to implementation difficulties, the per-process area
85 1.1 christos cannot be color-enhanced. A complete description of color support can
86 1.1 christos be found in the man page. References for ANSI color codes can be
87 1.1 christos found all over the Internet, but if you want a handy reference, look
88 1.1 christos in color.h.
89 1.1 christos
90 1.1 christos
91 1.1 christos AVAILABILITY
92 1.1 christos
93 1.1 christos Note that top is now a sourceforge project! Its project name is
94 1.1 christos "unixtop" and you can access its project page here:
95 1.1 christos
96 1.1 christos http://sourceforge.net/projects/unixtop
97 1.1 christos
98 1.1 christos On the project page you can find more information and access the
99 1.1 christos official bug and feature request trackers. If you find a bug,
100 1.1 christos want to request a feature, or need help, please submit a request
101 1.1 christos to the appropriate tracker on sourceforge. Thank you.
102 1.1 christos
103 1.1 christos Subversion access is also provided by Sourceforge. If Subversion is
104 1.1 christos installed on your system you can check out the project with the
105 1.1 christos following command:
106 1.1 christos
107 1.1 christos svn co https://svn.sourceforge.net/svnroot/unixtop unixtop
108 1.1 christos
109 1.1 christos There is also a web site dedicated to the project, and it is here:
110 1.1 christos
111 1.1 christos http://www.unixtop.org
112 1.1 christos
113 1.1 christos The latest version of "top" is available as a download through
114 1.1 christos sourceforge. Start here to access the downloadable files:
115 1.1 christos
116 1.1 christos http://sourceforge.net/project/showfiles.php?group_id=72892
117 1.1 christos
118 1.1 christos
119 1.1 christos KNOWN PROBLEMS:
120 1.1 christos
121 1.1 christos Gnu CC
122 1.1 christos
123 1.1 christos Compiling via Gnu CC continued to be the source of most of the
124 1.1 christos questions I receive. By far the most common mistake made by those
125 1.1 christos attempting to compile top with Gnu CC is out of date include files.
126 1.1 christos When the operating system is upgraded, the include files that are part
127 1.1 christos of the gcc package MUST also be updated. Gcc maintains its own
128 1.1 christos include files. Even a minor OS upgrade can involve changes to some of
129 1.1 christos the kernel's internal data structures, which are defined in include
130 1.1 christos files in "sys". Top is very sensitive to these changes. If you are
131 1.1 christos compiling with gcc and experience any sort of strange problems, please
132 1.1 christos make sure the include files you are using are up to date BEFORE
133 1.1 christos sending me a bug report. Look in the gcc source distribution for the
134 1.1 christos shell script "fixincludes".
135 1.1 christos
136 1.1 christos MacOS X
137 1.1 christos
138 1.1 christos Since I don't have full time root access to a MacOS X system I cannot
139 1.1 christos provide effective support for the platform. MacOS X uses Mach, and it
140 1.1 christos is very difficult to extract accurate system and process information
141 1.1 christos from the system. It takes a lot of trial and error, along with root
142 1.1 christos access. I have included the most up-to-date version of the macosx module
143 1.1 christos in the distribution, but I do not claim that it works. If you want to
144 1.1 christos try to use it, you can configure with "./configure --with-module=macosx".
145 1.1 christos
146 1.1 christos HP/UX 10.10
147 1.1 christos
148 1.1 christos In their infinite wisdom, the folks at HP have decided that mere mortals
149 1.1 christos such as you and I don't need to know what the kernel's proc structure looks
150 1.1 christos like. To that end, they have removed all useful content from the include
151 1.1 christos file <sys/proc.h> in version 10.10. As a result, top will not compile
152 1.1 christos under 10.10. What HP is trying to accomplish with this move is to force
153 1.1 christos iconoclasts such as myself to use "pstat" for collecting all process
154 1.1 christos information. I have no immediate solution for this problem, but hope to
155 1.1 christos obtain a sufficiently complete definition of "struct proc" at some point in
156 1.1 christos the near future. Stay tuned.
157 1.1 christos
158 1.1 christos
159 1.1 christos GRATITUDE
160 1.1 christos
161 1.1 christos My perpetual thanks to all the people who have helped me support top
162 1.1 christos on so many platforms. Without these people, top would not be what it
163 1.1 christos is. Here is a partial list of contributors and other individuals.
164 1.1 christos
165 1.1 christos Robert Boucher, Marc Cohen, David Cutter, Casper Dik,
166 1.1 christos Charles Hedrick, Andrew Herbert, Jeff Janvrin, Torsten Kasch,
167 1.1 christos Petri Kutvonen, William L. Jones, Tim Pugh, Steve Scherf,
168 1.1 christos Phillip Wu
169 1.1 christos
170 1.1 christos (My apologies if I missed anyone.)
171 1.1 christos
172 1.1 christos
173 1.1 christos LICENSE
174 1.1 christos
175 1.1 christos Top is distributed free of charge under the same terms as the BSD
176 1.1 christos license. For an official statement, please refer to the file "LICENSE"
177 1.1 christos which should be included with the source distribution.
178 1.1 christos
179 1.1 christos
180 1.1 christos AUTHOR
181 1.1 christos
182 1.1 christos If you wish to contact me, please send a message to the sourceforge
183 1.1 christos username "wnl".
184 1.1 christos
185 1.1 christos William LeFebvre
186 1.1 christos
187 1.1 christos U.S. Mail address:
188 1.1 christos William LeFebvre
189 1.1 christos 11585 Jones Bridge Road
190 1.1 christos Suite 420 PMB 139
191 1.1 christos Alpharetta, GA 30202
192