intel_gpu_top: suport command line parameters and variable samples per

second

This patch adds support for getopt, and adds two default parameters to it:
-h to show usage notes; and -s to allow user to define number of samples
to acquire per second.

Manpage documentation is also adjusted accordingly.

Signed-off-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
This commit is contained in:
Eugeni Dodonov
2011-09-05 16:23:11 -03:00
parent 6194c75c8f
commit 09e4b0cd26
2 changed files with 55 additions and 4 deletions
+9
View File
@@ -4,11 +4,20 @@
.SH NAME
intel_gpu_top \- Display a top-like summary of Intel GPU usage
.SH SYNOPSIS
.nf
.B intel_gpu_top
.B intel_gpu_top [ parameters ]
.SH DESCRIPTION
.B intel_gpu_top
is a tool to display usage information of an Intel GPU. It requires root
privilege to map the graphics device.
.SS Options
.TP
.B -s [samples per second]
number of samples to acquire per second
.TP
.B -h
show usage notes
.PP
Note that idle units are not
displayed, so an entirely idle GPU will only display the ring status and