1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
/*
* archtest.c -- simple harness to the arch-specific stuff, so
* that we can test those things in relative isolation.
*/
#include "ttyload.h"
#include <stdio.h>
int rows = -1, cols = -1;
int main(int argc, char *argv[])
{
load_list loads;
gettermsize();
printf("termsize: %d rows, %d cols\n", rows, cols);
getload(&loads);
printf("Load averages %g, %g, %g\n",
(loads.one_minute / 1024.0),
(loads.five_minute / 1024.0),
(loads.fifteen_minute / 1024.0));
printf("Version: %s\n", VERSION);
return(0);
}
|