lnstat : force a flush before sleep
Hi Stephen This small patch allows to use lnstat/rtstat with a pipe output, without a full bufferisation. Thank you Eric Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
This commit is contained in:
parent
13010712c5
commit
f50332c57a
|
|
@ -328,6 +328,7 @@ int main(int argc, char **argv)
|
||||||
print_hdr(stdout, header);
|
print_hdr(stdout, header);
|
||||||
lnstat_update(lnstat_files);
|
lnstat_update(lnstat_files);
|
||||||
print_line(stdout, lnstat_files, &fp);
|
print_line(stdout, lnstat_files, &fp);
|
||||||
|
fflush(stdout);
|
||||||
sleep(interval);
|
sleep(interval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue