File: archtest.c

package info (click to toggle)
ttyload 0.5%2B20131024%2Bgitf949537-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 228 kB
  • sloc: ansic: 677; makefile: 62; sh: 36
file content (29 lines) | stat: -rw-r--r-- 545 bytes parent folder | download | duplicates (6)
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);
}