linux_dsm_epyc7002/tools/power/x86/turbostat
Len Brown 0815a3d09b tools/power turbostat: show error on exec
When turbostat is run in one-shot command mode,
the parent takes the 'before' counter snapshot,
fork/exec/wait for the child to exit,
takes the 'after' counter snapshot,
and prints the results.

however, if the child fails to exec the command,
it immediately returns, without indicating that
anythign was wrong.

Add an error message showing that exec failed:

sudo turbostat sleeeep 4
...
turbostat: exec sleeeep: No such file or directory
...

Note that the parent will still print out the statistics,
because it can't tell the difference between the failed
exec and a command that is purposefully returning
the same status.  Unfortunately, this may obscure the
error message.  However, if the --out parameter is used,
the error message is evident on stderr.

Reported-by: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2017-03-01 00:14:25 -05:00
..
.gitignore turbostat: Add a .gitignore to ignore the compiled turbostat binary 2014-01-18 22:34:10 -05:00
Makefile tools/power turbostat: use intel-family.h model strings 2016-12-01 01:33:19 -05:00
turbostat.8 tools/power turbostat: support "--hide C1" etc. 2017-03-01 00:14:24 -05:00
turbostat.c tools/power turbostat: show error on exec 2017-03-01 00:14:25 -05:00