#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/io.h>
#include <sys/proc.h>
#include <threads.h>
#include <time.h>
Go to the source code of this file.
◆ PLOT_WIDTH
◆ SAMPLE_INTERVAL
◆ cpu_stat_count_cpus()
| static uint64_t cpu_stat_count_cpus |
( |
void |
| ) |
|
|
static |
◆ cpu_stat_read()
Definition at line 86 of file main.c.
References cpu_stats_t::activeClocks, ERR, fclose(), fgets(), file, fopen(), cpu_stats_t::id, cpu_stats_t::idleClocks, cpu_stats_t::interruptClocks, NULL, and sscanf().
Referenced by stats_update().
◆ main()
Definition at line 275 of file main.c.
References calloc(), cpu_stat_count_cpus(), stats_t::cpuAmount, stats_t::cpuStats, ERR, EXIT_FAILURE, free(), stats_t::memStats, NULL, stats_t::prevCpuStats, printf(), stats_print(), stats_update(), terminal_columns_get(), and terminalColumns.
◆ mem_stat_read()
◆ stat_percentage()
◆ stats_print()
| static void stats_print |
( |
stats_t * |
stats | ) |
|
|
static |
Definition at line 173 of file main.c.
References cpu_stats_t::activeClocks, stats_t::cpuAmount, stats_t::cpuStats, fflush(), mem_stats_t::freeKiB, cpu_stats_t::idleClocks, cpu_stats_t::interruptClocks, stats_t::memStats, PLOT_WIDTH, stats_t::prevCpuStats, printf(), stat_percentage(), stdout, terminalColumns, and mem_stats_t::totalKiB.
Referenced by main().
◆ stats_update()
| static void stats_update |
( |
stats_t * |
stats | ) |
|
|
static |
◆ terminal_columns_get()
| static uint64_t terminal_columns_get |
( |
void |
| ) |
|
|
static |
◆ terminalColumns