blktrace output comprehensive message when gnuplot not found

Currently, uses os.execvp which does not show enough information
when executed command is not found. For example, when gnuplot is not found shows the following messages:

    Traceback (most recent call last):
      File "/usr/local/bin/", line 123, in <module>
        os.execvp(cmd[0], cmd)
      File "/usr/lib64/python2.7/", line 344, in execvp
        _execvpe(file, args)
      File "/usr/lib64/python2.7/", line 368, in _execvpe
        func(file, *argrest)
    OSError: [Errno 2] No such file or directory

Users can't understand what happend directly from the message.

Instead of os.execvp, this patch uses os.system which shows the following
messages when gnuplot not found:

    sh: gnuplot: command not found

Signed-off-by: Eiichi Tsukata <>
Signed-off-by: Jens Axboe <>
1 file changed