[BACK]Return to top.local.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / top

Annotation of src/usr.bin/top/top.local.h, Revision 1.1

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