Skip to content

Commit

Permalink
tools/power turbostat: fix output buffering issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Len Brown committed Nov 30, 2012
1 parent e52966c commit ddac0d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tools/power/x86/turbostat/turbostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ int format_counters(struct thread_data *t, struct core_data *c,
void flush_stdout()
{
fputs(output_buffer, stdout);
fflush(stdout);
outp = output_buffer;
}
void flush_stderr()
Expand Down

0 comments on commit ddac0d6

Please sign in to comment.