gzip.1 & co.: Please keep DragonFly timeline for .Dd, not FreeBSD's.
[dragonfly.git] / contrib / top / machine.h
blob04eeefad1da425df38f5036261c8c66a9e985be2
1 /*
2 * $FreeBSD: src/contrib/top/machine.h,v 1.4.6.1 2002/08/11 17:09:25 dwmalone Exp $
3 * $DragonFly: src/contrib/top/machine.h,v 1.4 2006/10/03 12:20:11 y0netan1 Exp $
4 */
6 /*
7 * This file defines the interface between top and the machine-dependent
8 * module. It is NOT machine dependent and should not need to be changed
9 * for any specific machine.
13 * the statics struct is filled in by machine_init
15 struct statics
17 char **procstate_names;
18 char **cpustate_names;
19 char **memory_names;
20 char **swap_names;
21 #ifdef ORDER
22 char **order_names;
23 #endif
27 * the system_info struct is filled in by a machine dependent routine.
30 #ifdef p_active /* uw7 define macro p_active */
31 #define P_ACTIVE p_pactive
32 #else
33 #define P_ACTIVE p_active
34 #endif
36 /* CPU1 states follow those of CPU0, and so on for SMP */
37 struct system_info
39 int last_pid;
40 double load_avg[NUM_AVERAGES];
41 int p_total;
42 int P_ACTIVE; /* number of procs considered "active" */
43 int *procstates;
44 int *cpustates;
45 int *memory;
46 int *swap;
47 struct timeval boottime;
50 /* cpu_states is an array of percentages * 10. For example,
51 the (integer) value 105 is 10.5% (or .105).
55 * the process_select struct tells get_process_info what processes we
56 * are interested in seeing
59 struct process_select
61 int idle; /* show idle processes */
62 int self; /* show self */
63 int system; /* show system processes */
64 int threads; /* show threads */
65 int only_threads; /* show only threads */
66 int uid; /* only this uid (unless uid == -1) */
67 char *command; /* only this command (unless == NULL) */
70 /* routines defined by the machine dependent module */
72 char *format_header();
73 char *format_next_process();
75 /* non-int routines typically used by the machine dependent module */
76 char *printable();