History

perf python scripting: Append examples to err msg about audit-libs-python

To print syscall names, the audit-libs-python package is required.. If not installed, it prints this error string: # perf script syscall-counts Install the audit-libs-python package to get syscall names. But the package name is different in Ubuntu, mention that in the error message, 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.

Taeung Song committed 10 years ago

Commit b416e201 parent 37b4e201 file · +4 −1Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py+4−1
@@ -71,7 +71,10 @@ try: · 70 unmodified lines
7171 except:
7272 if not audit_package_warned:
7373 audit_package_warned = True
74− print "Install the audit-libs-python package to get syscall names"
74+ print "Install the audit-libs-python package to get syscall names.\n" \
75+ "For example:\n # apt-get install python-audit (Ubuntu)" \
76+ "\n # yum install audit-libs-python (Fedora)" \
77+ "\n etc.\n"
7578
7679 def syscall_name(id):
7780 try: