2018-06-10 00:02:56 +00:00
|
|
|
/*-
|
|
|
|
* Top - a top users display for Berkeley Unix
|
1997-03-23 18:51:21 +00:00
|
|
|
*
|
2018-06-10 00:02:56 +00:00
|
|
|
* $FreeBSD$
|
1997-03-23 18:51:21 +00:00
|
|
|
*/
|
|
|
|
|
2016-05-22 04:17:00 +00:00
|
|
|
#ifndef TOP_H
|
|
|
|
#define TOP_H
|
|
|
|
|
2018-06-09 02:14:33 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
|
1997-03-23 18:51:21 +00:00
|
|
|
/* Number of lines of header information on the standard screen */
|
2018-06-12 07:14:12 +00:00
|
|
|
extern int Header_lines;
|
1997-03-23 18:51:21 +00:00
|
|
|
|
|
|
|
/* Special atoi routine returns either a non-negative number or one of: */
|
|
|
|
#define Infinity -1
|
|
|
|
#define Invalid -2
|
|
|
|
|
|
|
|
/* maximum number we can have */
|
|
|
|
#define Largest 0x7fffffff
|
|
|
|
|
2018-06-02 15:52:18 +00:00
|
|
|
/* Exit code for system errors */
|
|
|
|
#define TOP_EX_SYS_ERROR 23
|
|
|
|
|
2004-07-01 09:12:38 +00:00
|
|
|
enum displaymodes { DISP_CPU = 0, DISP_IO, DISP_MAX };
|
|
|
|
|
2007-04-14 10:16:52 +00:00
|
|
|
/*
|
|
|
|
* Format modifiers
|
|
|
|
*/
|
|
|
|
#define FMT_SHOWARGS 0x00000001
|
|
|
|
|
2004-07-01 09:12:38 +00:00
|
|
|
extern enum displaymodes displaymode;
|
2008-01-18 01:43:14 +00:00
|
|
|
|
|
|
|
extern int pcpu_stats;
|
2018-06-09 02:14:33 +00:00
|
|
|
extern int overstrike;
|
|
|
|
extern pid_t mypid;
|
|
|
|
|
2018-05-21 01:16:26 +00:00
|
|
|
extern int (*compares[])(const void*, const void*);
|
2016-05-22 04:17:00 +00:00
|
|
|
|
2018-06-10 08:59:57 +00:00
|
|
|
const char* kill_procs(char *);
|
|
|
|
const char* renice_procs(char *);
|
top(1): Quiesce several warnings
This is all warnings at level six (6) that are not
char-subscripts, incompatible-pointer-types,
sign-compare, switch, int-conversion,
missing-variable-declarations, cast-qual, cast-align
Some warnings that are fixed by this commit are:
shadow, strict-prototypes, missing-prototypes, pointer-arith,
unused-parameter, unused-const-variable, and several others
2018-05-20 02:14:27 +00:00
|
|
|
|
2018-05-21 09:25:21 +00:00
|
|
|
extern char copyright[];
|
2018-05-21 01:16:26 +00:00
|
|
|
|
2018-06-09 02:14:33 +00:00
|
|
|
void quit(int);
|
2018-05-21 01:16:26 +00:00
|
|
|
|
2018-05-20 23:37:30 +00:00
|
|
|
/*
|
|
|
|
* The space command forces an immediate update. Sometimes, on loaded
|
|
|
|
* systems, this update will take a significant period of time (because all
|
|
|
|
* the output is buffered). So, if the short-term load average is above
|
|
|
|
* "LoadMax", then top will put the cursor home immediately after the space
|
|
|
|
* is pressed before the next update is attempted. This serves as a visual
|
|
|
|
* acknowledgement of the command.
|
|
|
|
*/
|
|
|
|
#define LoadMax 5.0
|
|
|
|
|
|
|
|
/*
|
2018-06-12 07:31:59 +00:00
|
|
|
* "Nominal_TOPN" is used as the default TOPN when
|
2018-05-20 23:37:30 +00:00
|
|
|
* the output is a dumb terminal. If we didn't do this, then
|
|
|
|
* we will get every
|
|
|
|
* process in the system when running top on a dumb terminal (or redirected
|
|
|
|
* to a file). Note that Nominal_TOPN is a default: it can still be
|
|
|
|
* overridden on the command line, even with the value "infinity".
|
|
|
|
*/
|
|
|
|
#define Nominal_TOPN 18
|
|
|
|
|
2016-05-22 04:17:00 +00:00
|
|
|
#endif /* TOP_H */
|