6 * This file defines the interface between top and the machine-dependent
7 * module. It is NOT machine dependent and should not need to be changed
8 * for any specific machine.
16 * the statics struct is filled in by machine_init
20 char **procstate_names;
21 char **cpustate_names;
31 * the system_info struct is filled in by a machine dependent routine.
34 #ifdef p_active /* uw7 define macro p_active */
35 #define P_ACTIVE p_pactive
37 #define P_ACTIVE p_active
43 double load_avg[NUM_AVERAGES];
45 int P_ACTIVE; /* number of procs considered "active" */
52 struct timeval boottime;
56 /* cpu_states is an array of percentages * 10. For example,
57 the (integer) value 105 is 10.5% (or .105).
61 * the process_select struct tells get_process_info what processes we
62 * are interested in seeing
67 int idle; /* show idle processes */
68 int self; /* show self */
69 int system; /* show system processes */
70 int thread; /* show threads */
71 #define TOP_MAX_UIDS 8
72 int uid[TOP_MAX_UIDS]; /* only these uids (unless uid[0] == -1) */
73 int wcpu; /* show weighted cpu */
74 int jid; /* only this jid (unless jid == -1) */
75 int jail; /* show jail ID */
76 int swap; /* show swap usage */
77 int kidle; /* show per-CPU idle threads */
78 char *command; /* only this command (unless == NULL) */
81 /* routines defined by the machine dependent module */
83 char *format_header(char *uname_field);
84 char *format_next_process(caddr_t handle, char *(*get_userid)(int),
86 void toggle_pcpustats(void);
87 void get_system_info(struct system_info *si);
88 int machine_init(struct statics *statics, char do_unames);
89 int proc_owner(int pid);
91 /* non-int routines typically used by the machine dependent module */
92 char *printable(char *string);
94 #endif /* MACHINE_H */