source: trunk/third/top/machine.h @ 9084

Revision 9084, 1.3 KB checked in by ghudson, 28 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r9083, 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 */
10struct 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
24struct system_info
25{
26    int    last_pid;
27    double load_avg[NUM_AVERAGES];
28    int    p_total;
29    int    p_active;     /* number of procs considered "active" */
30    int    *procstates;
31    int    *cpustates;
32    int    *memory;
33};
34
35/* cpu_states is an array of percentages * 10.  For example,
36   the (integer) value 105 is 10.5% (or .105).
37 */
38
39/*
40 * the process_select struct tells get_process_info what processes we
41 * are interested in seeing
42 */
43
44struct process_select
45{
46    int idle;           /* show idle processes */
47    int system;         /* show system processes */
48    int uid;            /* only this uid (unless uid == -1) */
49    char *command;      /* only this command (unless == NULL) */
50};
51
52/* routines defined by the machine dependent module */
53
54char *format_header();
55char *format_next_process();
56
57/* non-int routines typically used by the machine dependent module */
58char *printable();
Note: See TracBrowser for help on using the repository browser.