Annotation of src/usr.bin/top/machine.h, Revision 1.1
1.1 ! downsj 1: /* $OpenBSD$ */
! 2:
! 3: /*
! 4: * This file defines the interface between top and the machine-dependent
! 5: * module. It is NOT machine dependent and should not need to be changed
! 6: * for any specific machine.
! 7: */
! 8:
! 9: /*
! 10: * the statics struct is filled in by machine_init
! 11: */
! 12: struct statics
! 13: {
! 14: char **procstate_names;
! 15: char **cpustate_names;
! 16: char **memory_names;
! 17: #ifdef ORDER
! 18: char **order_names;
! 19: #endif
! 20: };
! 21:
! 22: /*
! 23: * the system_info struct is filled in by a machine dependent routine.
! 24: */
! 25:
! 26: struct system_info
! 27: {
! 28: int last_pid;
! 29: double load_avg[NUM_AVERAGES];
! 30: int p_total;
! 31: int p_active; /* number of procs considered "active" */
! 32: int *procstates;
! 33: int *cpustates;
! 34: int *memory;
! 35: };
! 36:
! 37: /* cpu_states is an array of percentages * 10. For example,
! 38: the (integer) value 105 is 10.5% (or .105).
! 39: */
! 40:
! 41: /*
! 42: * the process_select struct tells get_process_info what processes we
! 43: * are interested in seeing
! 44: */
! 45:
! 46: struct process_select
! 47: {
! 48: int idle; /* show idle processes */
! 49: int system; /* show system processes */
! 50: int uid; /* only this uid (unless uid == -1) */
! 51: char *command; /* only this command (unless == NULL) */
! 52: };
! 53:
! 54: /* routines defined by the machine dependent module */
! 55:
! 56: char *format_header();
! 57: char *format_next_process();
! 58:
! 59: /* non-int routines typically used by the machine dependent module */
! 60: char *printable();