Allow to output statistics to stdout.

This allows intel_gpu_top to run both in statistics-collecting mode
(collecting the per-ring statistics in gnuplot-friendly format) and
ncurses top-like mode at the same time.

It also allows to output the statistics directly to stdout, by using "-o
-", so the results can be parsed directly via a popen() parsing.

If you are using intel_gpu_top as previously (without any command-line
arguments), it should change nothing for you. If you were using its
logging facilities (e.g., the '-o file'), note that the logging will keep
running, but the detailed top-like interface will be on the screen at the
same time.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
This commit is contained in:
Eugeni Dodonov
2011-10-14 15:26:13 -03:00
parent eaaddc794b
commit 62c542fd4e
2 changed files with 58 additions and 40 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ privilege to map the graphics device.
number of samples to acquire per second
.TP
.B -o [output file]
run non-interactively and collect usage statistics to [file]
collect usage statistics to [file]. If file is "-", run non-interactively
and output statistics to stdout.
.TP
.B -e ["command to profile"]
execute a command, and leave when it is finished. Note that the entire command