#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/fs.h>
#include <sys/proc.h>
#include <threads.h>
#include <time.h>
Go to the source code of this file.
◆ SAMPLE_INTERVAL
◆ sort_mode_t
| Enumerator |
|---|
| SORT_PID | |
| SORT_MEMORY | |
| SORT_CPU | |
Definition at line 19 of file main.c.
◆ terminal_size_get()
| static void terminal_size_get |
( |
void |
| ) |
|
|
static |
◆ cpu_perf_count_cpus()
| static uint64_t cpu_perf_count_cpus |
( |
void |
| ) |
|
|
static |
◆ cpu_perf_read()
◆ mem_perf_read()
◆ proc_perfs_read()
◆ calculate_cpu_percentages()
| static void calculate_cpu_percentages |
( |
perfs_t * |
perfs | ) |
|
|
static |
◆ compare_by_pid()
| static int compare_by_pid |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ compare_by_memory()
| static int compare_by_memory |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ compare_by_cpu()
| static int compare_by_cpu |
( |
const void * |
a, |
|
|
const void * |
b |
|
) |
| |
|
static |
◆ sort_processes()
| static void sort_processes |
( |
perfs_t * |
perfs | ) |
|
|
static |
◆ perfs_update()
| static void perfs_update |
( |
perfs_t * |
perfs | ) |
|
|
static |
◆ perf_percentage()
◆ perfs_print()
| static void perfs_print |
( |
perfs_t * |
perfs | ) |
|
|
static |
◆ main()
◆ terminalColumns
◆ terminalRows
◆ processScrollOffset
◆ lastSampleTime
◆ cpuAmount
◆ currentSortMode