1/*
2 *  Top - a top users display for Berkeley Unix
3 *
4 *  Definitions for things that might vary between installations.
5 */
6
7/*
8 *  The space command forces an immediate update.  Sometimes, on loaded
9 *  systems, this update will take a significant period of time (because all
10 *  the output is buffered).  So, if the short-term load average is above
11 *  "LoadMax", then top will put the cursor home immediately after the space
12 *  is pressed before the next update is attempted.  This serves as a visual
13 *  acknowledgement of the command.  On Suns, "LoadMax" will get multiplied by
14 *  "FSCALE" before being compared to avenrun[0].  Therefore, "LoadMax"
15 *  should always be specified as a floating point number.
16 */
17#ifndef LoadMax
18#define LoadMax  %LoadMax%
19#endif
20
21/*
22 *  "Table_size" defines the size of the hash tables used to map uid to
23 *  username.  The number of users in /etc/passwd CANNOT be greater than
24 *  this number.  If the error message "table overflow: too many users"
25 *  is printed by top, then "Table_size" needs to be increased.  Things will
26 *  work best if the number is a prime number that is about twice the number
27 *  of lines in /etc/passwd.
28 */
29#ifndef Table_size
30#define Table_size	%TableSize%
31#endif
32
33/*
34 *  "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity
35 *  and the output is a dumb terminal.  If we didn't do this, then
36 *  installations who use a default TOPN of Infinity will get every
37 *  process in the system when running top on a dumb terminal (or redirected
38 *  to a file).  Note that Nominal_TOPN is a default:  it can still be
39 *  overridden on the command line, even with the value "infinity".
40 */
41#ifndef Nominal_TOPN
42#define Nominal_TOPN	%NominalTopn%
43#endif
44
45#ifndef Default_TOPN
46#define Default_TOPN	%topn%
47#endif
48
49#ifndef Default_DELAY
50#define Default_DELAY	%delay%
51#endif
52
53/*
54 *  If the local system's getpwnam interface uses random access to retrieve
55 *  a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining
56 *  RANDOM_PW will take advantage of that fact.  If RANDOM_PW is defined,
57 *  then getpwnam is used and the result is cached.  If not, then getpwent
58 *  is used to read and cache the password entries sequentially until the
59 *  desired one is found.
60 *
61 *  We initially set RANDOM_PW to something which is controllable by the
62 *  Configure script.  Then if its value is 0, we undef it.
63 */
64
65#define RANDOM_PW	%random%
66#if RANDOM_PW == 0
67#undef RANDOM_PW
68#endif
69