#include #include #include #include #include #include #include #define CPUINFO "/proc/cpuinfo"; #define CPUFREQ "/sys/devices/system/cpu/cpu0/cpufreq/"; #define CLEAR "\033[2J"; #define REPOS "\033[H"; // Re-positions the cursor to top left of screen void move(int row, int col) { printf("\x1b[%d;%df", row, col); } int main(int argc, char** argv) { short memory = 0; short cpu = 0; short cores = 0; int samples = 20; long tdelay = 500000; for (int i = 1; i < argc ; i++) { if (strstr(*argv, "--memory")) memory = 1; if (strstr(*argv, "--cpu")) cpu = 1; if (strstr(*argv, "--cores")) cores = 1; if (strstr(argv[i], "--samples=")) ; if (strstr(argv[i], "--tdelay=")) ; } return 0; }