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;
32 * the system_info struct is filled in by a machine dependent routine.
35 #ifdef p_active /* uw7 define macro p_active */
36 #define P_ACTIVE p_pactive
38 #define P_ACTIVE p_active
44 double load_avg[NUM_AVERAGES];
46 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 int uid; /* only this uid (unless uid == -1) */
72 int wcpu; /* show weighted cpu */
73 int jid; /* only this jid (unless jid == -1) */
74 int jail; /* show jail ID */
75 int kidle; /* show per-CPU idle threads */
76 char *command; /* only this command (unless == NULL) */
79 /* routines defined by the machine dependent module */
81 char *format_header();
82 char *format_next_process();
83 void toggle_pcpustats(void);
84 void get_system_info(struct system_info *si);
85 int machine_init(struct statics *statics, char do_unames);
86 int proc_owner(int pid);
88 /* non-int routines typically used by the machine dependent module */
91 #endif /* MACHINE_H */