home *** CD-ROM | disk | FTP | other *** search
- #define MAXUSERS 300 /* set this to (length of /etc/passwd * 2) */
- #define MAXACTIVE 50 /* max cpu-positive processes per interval */
- #define MAXOUT 10 /* output is limitted to this many processes */
- #define COMMAND_SIZE 51 /* set this to (width of your window - 29) */
- #define UNAMELEN 8 /* max length for username */
-
- /*
- cputt attempts to truncate unused slots at the end of the process
- table. This usually reduces its runtime size considerably. If the
- process table grows or shrinks by a significant amount, cputt will
- restart itself and resize its internal data structures accordingly.
- */
-
- #define GROWTH_BUF 40 /* growth buffer, use 0 to disable truncation */
- #define MAX_GROW 20 /* restart after proc table grows this much */
- #define MAX_SHRINK 10 /* restart after proc table shrinks this much */
-
- /* Symbol table entry and value */
-
- struct symbol
- {
- char *s_kname; /* kernel symbol name */
- caddr_t *s_info; /* kernel symbol value */
- };
-
- /* Single hash table entry for mapping uid's to usernames */
-
- struct hashtab
- {
- short h_uid; /* uid of user entry */
- char h_uname[UNAMELEN]; /* corresponding name */
- };
-
- /* Critical system info */
-
- struct info
- {
- struct proc *i_proc0; /* address of process table */
- int i_nproc; /* length of process table */
- int i_sproc; /* size of process table */
- int i_ecmx; /* max physical memory address*/
- struct hashtab i_hnames[MAXUSERS]; /* hash table for usernames */
- };
-
- /* For reading process upages from kernel memory */
-
- union userstate
- {
- struct user u_us;
- char u_pg[UPAGES][NBPG];
- };
-
- /* Summary info for processes with positive cpu utilization */
-
- struct sortdata
- {
- struct proc *proc; /* proc structure */
- long pctcpu; /* cpu usage */
- int pr_cmd; /* command string index */
- };
-
- extern kvm_t *Flkvm;
- extern union userstate User;
- extern struct symbol Symbollist[];
- extern struct info Info;
-