Revision 16185,
1.4 KB
checked in by ghudson, 24 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r16184,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | /* |
---|
2 | * This file defines the interface between top and the machine-dependent |
---|
3 | * module. It is NOT machine dependent and should not need to be changed |
---|
4 | * for any specific machine. |
---|
5 | */ |
---|
6 | |
---|
7 | /* |
---|
8 | * the statics struct is filled in by machine_init |
---|
9 | */ |
---|
10 | struct statics |
---|
11 | { |
---|
12 | char **procstate_names; |
---|
13 | char **cpustate_names; |
---|
14 | char **memory_names; |
---|
15 | #ifdef ORDER |
---|
16 | char **order_names; |
---|
17 | #endif |
---|
18 | }; |
---|
19 | |
---|
20 | /* |
---|
21 | * the system_info struct is filled in by a machine dependent routine. |
---|
22 | */ |
---|
23 | |
---|
24 | #ifdef p_active /* uw7 define macro p_active */ |
---|
25 | #define P_ACTIVE p_pactive |
---|
26 | #else |
---|
27 | #define P_ACTIVE p_active |
---|
28 | #endif |
---|
29 | |
---|
30 | struct system_info |
---|
31 | { |
---|
32 | int last_pid; |
---|
33 | double load_avg[NUM_AVERAGES]; |
---|
34 | int p_total; |
---|
35 | int P_ACTIVE; /* number of procs considered "active" */ |
---|
36 | int *procstates; |
---|
37 | int *cpustates; |
---|
38 | int *memory; |
---|
39 | }; |
---|
40 | |
---|
41 | /* cpu_states is an array of percentages * 10. For example, |
---|
42 | the (integer) value 105 is 10.5% (or .105). |
---|
43 | */ |
---|
44 | |
---|
45 | /* |
---|
46 | * the process_select struct tells get_process_info what processes we |
---|
47 | * are interested in seeing |
---|
48 | */ |
---|
49 | |
---|
50 | struct process_select |
---|
51 | { |
---|
52 | int idle; /* show idle processes */ |
---|
53 | int system; /* show system processes */ |
---|
54 | int uid; /* only this uid (unless uid == -1) */ |
---|
55 | char *command; /* only this command (unless == NULL) */ |
---|
56 | }; |
---|
57 | |
---|
58 | /* routines defined by the machine dependent module */ |
---|
59 | |
---|
60 | char *format_header(); |
---|
61 | char *format_next_process(); |
---|
62 | |
---|
63 | /* non-int routines typically used by the machine dependent module */ |
---|
64 | char *printable(); |
---|
Note: See
TracBrowser
for help on using the repository browser.