All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf python scripting: Append examples to err msg about audit-libs-python
@ 2016-02-09 11:53 Taeung Song
  2016-02-11 22:20 ` Arnaldo Carvalho de Melo
  2016-02-16  7:52 ` [tip:perf/core] " tip-bot for Taeung Song
  0 siblings, 2 replies; 4+ messages in thread
From: Taeung Song @ 2016-02-09 11:53 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Jiri Olsa, Namhyung Kim, Ingo Molnar, Taeung Song

To print the syscall name, the audit-libs-python package
should be required. If not installed, print
the erron string e.g.

    # perf script syscall-counts
    Install the audit-libs-python package to get syscall names.

But the package name is different in Ubuntu
so append examples the erron string like below.
(similar to a error message of util/trace-event-scripting.c)

    # perf script syscall-counts
    Install the audit-libs-python package to get syscall names.
    For example:
      # apt-get install python-audit (Ubuntu)
      # yum install audit-libs-python (Fedora)
      etc.

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
index 15c8400..1d95009 100644
--- a/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
+++ b/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
@@ -71,7 +71,10 @@ try:
 except:
 	if not audit_package_warned:
 		audit_package_warned = True
-		print "Install the audit-libs-python package to get syscall names"
+		print "Install the audit-libs-python package to get syscall names.\n" \
+                    "For example:\n  # apt-get install python-audit (Ubuntu)" \
+                    "\n  # yum install audit-libs-python (Fedora)" \
+                    "\n  etc.\n"
 
 def syscall_name(id):
 	try:
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-16  7:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 11:53 [PATCH] perf python scripting: Append examples to err msg about audit-libs-python Taeung Song
2016-02-11 22:20 ` Arnaldo Carvalho de Melo
2016-02-11 23:59   ` Taeung Song
2016-02-16  7:52 ` [tip:perf/core] " tip-bot for Taeung Song

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.