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;
33 * the system_info struct is filled in by a machine dependent routine.
36 #ifdef p_active /* uw7 define macro p_active */
37 #define P_ACTIVE p_pactive
39 #define P_ACTIVE p_active
45 double load_avg[NUM_AVERAGES];
47 int P_ACTIVE; /* number of procs considered "active" */
54 struct timeval boottime;
58 /* cpu_states is an array of percentages * 10. For example,
59 the (integer) value 105 is 10.5% (or .105).
63 * the process_select struct tells get_process_info what processes we
64 * are interested in seeing
69 int idle; /* show idle processes */
70 int self; /* show self */
71 int system; /* show system processes */
72 int thread; /* show threads */
73 #define TOP_MAX_UIDS 8
74 int uid[TOP_MAX_UIDS]; /* only these uids (unless uid[0] == -1) */
75 int wcpu; /* show weighted cpu */
76 int jid; /* only this jid (unless jid == -1) */
77 int jail; /* show jail ID */
78 int swap; /* show swap usage */
79 int kidle; /* show per-CPU idle threads */
80 char *command; /* only this command (unless == NULL) */
83 /* routines defined by the machine dependent module */
85 char *format_header();
86 char *format_next_process();
87 void toggle_pcpustats(void);
88 void get_system_info(struct system_info *si);
89 int machine_init(struct statics *statics, char do_unames);
90 int proc_owner(int pid);
92 /* non-int routines typically used by the machine dependent module */
95 #endif /* MACHINE_H */