#include #include static char buf[8192]; int main (int argc, char **argv) { const char *file = argc > 1 ? argv[1] : "/proc/stat"; while (1) { int fd = open (file, O_RDONLY); while (read (fd, buf, 8192) > 0); close (fd); usleep (300000); } }