Skip to content

Commit ddac0d6

Browse files
committed
tools/power turbostat: fix output buffering issue
In periodic mode, turbostat writes to stdout, but users were un-able to re-direct stdout, eg. turbostat > outputfile would result in an empty outputfile. Signed-off-by: Len Brown <len.brown@intel.com>
1 parent e52966c commit ddac0d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/power/x86/turbostat/turbostat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ int format_counters(struct thread_data *t, struct core_data *c,
423423
void flush_stdout()
424424
{
425425
fputs(output_buffer, stdout);
426+
fflush(stdout);
426427
outp = output_buffer;
427428
}
428429
void flush_stderr()

0 commit comments

Comments
 (0)