5 * Top - a top users display for Berkeley Unix
7 * General (global) definitions
15 #define Default_DELAY 2
17 /* Number of lines of header information on the standard screen */
18 extern int Header_lines; /* 7 */
20 /* Maximum number of columns allowed for display */
23 /* Special atoi routine returns either a non-negative number or one of: */
27 /* maximum number we can have */
28 #define Largest 0x7fffffff
31 * The entire display is based on these next numbers being defined as is.
34 /* Exit code for system errors */
35 #define TOP_EX_SYS_ERROR 23
37 enum displaymodes { DISP_CPU = 0, DISP_IO, DISP_MAX };
42 #define FMT_SHOWARGS 0x00000001
44 extern enum displaymodes displaymode;
46 extern int pcpu_stats;
47 extern int overstrike;
51 extern const char * myname;
53 extern int (*compares[])(const void*, const void*);
55 char* kill_procs(char *);
56 char* renice_procs(char *);
58 extern char copyright[];
63 * The space command forces an immediate update. Sometimes, on loaded
64 * systems, this update will take a significant period of time (because all
65 * the output is buffered). So, if the short-term load average is above
66 * "LoadMax", then top will put the cursor home immediately after the space
67 * is pressed before the next update is attempted. This serves as a visual
68 * acknowledgement of the command.
73 * "Nominal_TOPN" is used as the default TOPN when
74 * the output is a dumb terminal. If we didn't do this, then
76 * process in the system when running top on a dumb terminal (or redirected
77 * to a file). Note that Nominal_TOPN is a default: it can still be
78 * overridden on the command line, even with the value "infinity".
80 #define Nominal_TOPN 18
83 * If the local system's getpwnam interface uses random access to retrieve
84 * a record (i.e.: 4.3 systems, Sun "yellow pages"), then defining
85 * RANDOM_PW will take advantage of that fact.