124139Sjoerg/* 224139Sjoerg * Top - a top users display for Berkeley Unix 324139Sjoerg * 424139Sjoerg * Definitions for things that might vary between installations. 524139Sjoerg */ 624139Sjoerg 724139Sjoerg/* 824139Sjoerg * The space command forces an immediate update. Sometimes, on loaded 924139Sjoerg * systems, this update will take a significant period of time (because all 1024139Sjoerg * the output is buffered). So, if the short-term load average is above 1124139Sjoerg * "LoadMax", then top will put the cursor home immediately after the space 1224139Sjoerg * is pressed before the next update is attempted. This serves as a visual 1324139Sjoerg * acknowledgement of the command. On Suns, "LoadMax" will get multiplied by 1424139Sjoerg * "FSCALE" before being compared to avenrun[0]. Therefore, "LoadMax" 1524139Sjoerg * should always be specified as a floating point number. 1624139Sjoerg */ 1724139Sjoerg#ifndef LoadMax 1824139Sjoerg#define LoadMax %LoadMax% 1924139Sjoerg#endif 2024139Sjoerg 2124139Sjoerg/* 2224139Sjoerg * "Table_size" defines the size of the hash tables used to map uid to 2324139Sjoerg * username. The number of users in /etc/passwd CANNOT be greater than 2424139Sjoerg * this number. If the error message "table overflow: too many users" 2524139Sjoerg * is printed by top, then "Table_size" needs to be increased. Things will 2624139Sjoerg * work best if the number is a prime number that is about twice the number 2724139Sjoerg * of lines in /etc/passwd. 2824139Sjoerg */ 2924139Sjoerg#ifndef Table_size 3024139Sjoerg#define Table_size %TableSize% 3124139Sjoerg#endif 3224139Sjoerg 3324139Sjoerg/* 3424139Sjoerg * "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity 3524139Sjoerg * and the output is a dumb terminal. If we didn't do this, then 3624139Sjoerg * installations who use a default TOPN of Infinity will get every 3724139Sjoerg * process in the system when running top on a dumb terminal (or redirected 3824139Sjoerg * to a file). Note that Nominal_TOPN is a default: it can still be 3924139Sjoerg * overridden on the command line, even with the value "infinity". 4024139Sjoerg */ 4124139Sjoerg#ifndef Nominal_TOPN 4224139Sjoerg#define Nominal_TOPN %NominalTopn% 4324139Sjoerg#endif 4424139Sjoerg 4524139Sjoerg#ifndef Default_TOPN 4624139Sjoerg#define Default_TOPN %topn% 4724139Sjoerg#endif 4824139Sjoerg 4924139Sjoerg#ifndef Default_DELAY 5024139Sjoerg#define Default_DELAY %delay% 5124139Sjoerg#endif 5224139Sjoerg 5324139Sjoerg/* 5424139Sjoerg * If the local system's getpwnam interface uses random access to retrieve 5524139Sjoerg * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining 5624139Sjoerg * RANDOM_PW will take advantage of that fact. If RANDOM_PW is defined, 5724139Sjoerg * then getpwnam is used and the result is cached. If not, then getpwent 5824139Sjoerg * is used to read and cache the password entries sequentially until the 5924139Sjoerg * desired one is found. 6024139Sjoerg * 6124139Sjoerg * We initially set RANDOM_PW to something which is controllable by the 6224139Sjoerg * Configure script. Then if its value is 0, we undef it. 6324139Sjoerg */ 6424139Sjoerg 6524139Sjoerg#define RANDOM_PW %random% 6624139Sjoerg#if RANDOM_PW == 0 6724139Sjoerg#undef RANDOM_PW 6824139Sjoerg#endif 69