Files | |
file | input.c |
file | input.h |
file | screen.c |
file | top.c |
Data Structures | |
struct | data_t |
struct | fixed_float |
struct | perc_cpu_t |
struct | perc_exc_t |
struct | perc_task_t |
Defines | |
#define | DAY 86400 |
#define | FRACTION_TO_FLOAT(float, a, b) |
#define | HOUR 3600 |
#define | MINUTE 60 |
#define | NAME "top" |
#define | TV_POS(tv) ((tv)->tv_sec > 0 || ((tv)->tv_sec == 0 && (tv)->tv_usec > 0)) |
#define | TV_SUB(res, sub) |
#define | UPDATE_INTERVAL 1 |
#define | USEC_COUNT 1000000 |
Enumerations | |
enum | op_mode_t |
enum | sort_mode_t |
Functions | |
static int | cmp_data (void *a, void *b, void *arg) |
static void | compute_percentages (data_t *old_data, data_t *new_data) |
Computes percentage differencies from old_data to new_data. | |
static void | free_data (data_t *target) |
int | main (int argc, char *argv[]) |
Main entry point. | |
static void | print_cpu_info (data_t *data) |
void | print_data (data_t *data) |
static void | print_excs (data_t *data) |
static void | print_excs_head (void) |
static void | print_global_head (data_t *data) |
static void | print_help (void) |
static void | print_ipc (data_t *data) |
static void | print_ipc_head (void) |
static void | print_percent (fixed_float ffloat, unsigned int precision) |
static void | print_physmem_info (data_t *data) |
static void | print_string (const char *str) |
static void | print_task_summary (data_t *data) |
static void | print_tasks (data_t *data) |
static void | print_tasks_head (void) |
static void | print_thread_summary (data_t *data) |
void | print_warning (const char *fmt,...) |
static const char * | read_data (data_t *target) |
int | rwait (struct timeval *tvp) |
void | screen_done (void) |
static void | screen_get_pos (sysarg_t *col, sysarg_t *row) |
static void | screen_get_size (sysarg_t *col, sysarg_t *row) |
void | screen_init (void) |
static void | screen_moveto (sysarg_t col, sysarg_t row) |
static void | screen_newline (void) |
static void | screen_restart (bool clear) |
static void | screen_style_inverted (void) |
static void | screen_style_normal (void) |
static void | sort_data (data_t *data) |
int | tgetchar (unsigned int sec) |
void | tsleep (unsigned int sec) |
Variables | |
bool | excs_all |
bool | excs_all = false |
static aid_t | getchar_inprog = 0 |
static char | lastchar = '\0' |
op_mode_t | op_mode |
op_mode_t | op_mode = OP_TASKS |
sort_mode_t | sort_mode |
sort_mode_t | sort_mode = SORT_TASK_CYCLES |
static sysarg_t | warn_col = 0 |
static sysarg_t | warn_row = 0 |
int main | ( | int | argc, | |
char * | argv[] | |||
) |