top.local.hs revision 284484
1147476Sdumbbell/* 2147476Sdumbbell * Top - a top users display for Berkeley Unix 3147476Sdumbbell * 4147476Sdumbbell * Definitions for things that might vary between installations. 5147476Sdumbbell */ 6147476Sdumbbell 7147476Sdumbbell/* 8147476Sdumbbell * The space command forces an immediate update. Sometimes, on loaded 9147476Sdumbbell * systems, this update will take a significant period of time (because all 10147476Sdumbbell * the output is buffered). So, if the short-term load average is above 11147476Sdumbbell * "LoadMax", then top will put the cursor home immediately after the space 12147476Sdumbbell * is pressed before the next update is attempted. This serves as a visual 13147476Sdumbbell * acknowledgement of the command. On Suns, "LoadMax" will get multiplied by 14147476Sdumbbell * "FSCALE" before being compared to avenrun[0]. Therefore, "LoadMax" 15147476Sdumbbell * should always be specified as a floating point number. 16147476Sdumbbell */ 17147476Sdumbbell#ifndef LoadMax 18147476Sdumbbell#define LoadMax %LoadMax% 19147476Sdumbbell#endif 20147476Sdumbbell 21147476Sdumbbell/* 22147476Sdumbbell * "Table_size" defines the size of the hash tables used to map uid to 23147476Sdumbbell * username. The number of users in /etc/passwd CANNOT be greater than 24147476Sdumbbell * this number. If the error message "table overflow: too many users" 25147476Sdumbbell * is printed by top, then "Table_size" needs to be increased. Things will 26147476Sdumbbell * work best if the number is a prime number that is about twice the number 27147476Sdumbbell * of lines in /etc/passwd. 28147476Sdumbbell */ 29147476Sdumbbell#ifndef Table_size 30147476Sdumbbell#define Table_size %TableSize% 31147476Sdumbbell#endif 32147476Sdumbbell 33147476Sdumbbell/* 34147476Sdumbbell * "Nominal_TOPN" is used as the default TOPN when Default_TOPN is Infinity 35147476Sdumbbell * and the output is a dumb terminal. If we didn't do this, then 36147476Sdumbbell * installations who use a default TOPN of Infinity will get every 37147476Sdumbbell * process in the system when running top on a dumb terminal (or redirected 38147476Sdumbbell * to a file). Note that Nominal_TOPN is a default: it can still be 39147476Sdumbbell * overridden on the command line, even with the value "infinity". 40147476Sdumbbell */ 41147476Sdumbbell#ifndef Nominal_TOPN 42147476Sdumbbell#define Nominal_TOPN %NominalTopn% 43147476Sdumbbell#endif 44147476Sdumbbell 45147476Sdumbbell#ifndef Default_TOPN 46147476Sdumbbell#define Default_TOPN %topn% 47147476Sdumbbell#endif 48147476Sdumbbell 49147476Sdumbbell#ifndef Default_DELAY 50147476Sdumbbell#define Default_DELAY %delay% 51147476Sdumbbell#endif 52147476Sdumbbell 53147476Sdumbbell/* 54147476Sdumbbell * If the local system's getpwnam interface uses random access to retrieve 55147476Sdumbbell * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining 56147476Sdumbbell * RANDOM_PW will take advantage of that fact. If RANDOM_PW is defined, 57147476Sdumbbell * then getpwnam is used and the result is cached. If not, then getpwent 58147476Sdumbbell * is used to read and cache the password entries sequentially until the 59147476Sdumbbell * desired one is found. 60147476Sdumbbell * 61147476Sdumbbell * We initially set RANDOM_PW to something which is controllable by the 62147476Sdumbbell * Configure script. Then if its value is 0, we undef it. 63147476Sdumbbell */ 64147476Sdumbbell 65147476Sdumbbell#define RANDOM_PW %random% 66147476Sdumbbell#if RANDOM_PW == 0 67147476Sdumbbell#undef RANDOM_PW 68147476Sdumbbell#endif 69147476Sdumbbell