diff options
author | Elliott Baron <ebaron@toriamos.yyz.redhat.com> | 2008-10-10 15:36:00 -0400 |
---|---|---|
committer | Elliott Baron <ebaron@toriamos.yyz.redhat.com> | 2008-10-10 15:36:00 -0400 |
commit | d68088d095ca865001a5cc3f595982b63c96c418 (patch) | |
tree | c7e6e70cfaae900722ac802a2ee4796fe938024b /stap-report | |
parent | 584426f6d52569b1c1f9e3f9f6d5caa982838c88 (diff) | |
download | systemtap-steved-d68088d095ca865001a5cc3f595982b63c96c418.tar.gz systemtap-steved-d68088d095ca865001a5cc3f595982b63c96c418.tar.xz systemtap-steved-d68088d095ca865001a5cc3f595982b63c96c418.zip |
2008-10-10 Elliott Baron <ebaron@redhat.com>
PR 4211
* stap-report: First attempt at bug reporting tool.
Diffstat (limited to 'stap-report')
-rwxr-xr-x | stap-report | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/stap-report b/stap-report new file mode 100755 index 00000000..c2a5d070 --- /dev/null +++ b/stap-report @@ -0,0 +1,32 @@ +#!/usr/bin/python + +import sys +import time +import subprocess + +ofname = "/tmp/stapreport-" + time.strftime("%Y%m%d%H%M%S") + ".txt" +ofile = open(ofname, "w") + +def run(command): + ofile.write("== " + command + " ==\n") + ofile.flush() + p = subprocess.Popen(command, shell=True, stdout=ofile, stderr=ofile) + p.wait() + ofile.write("\n") + sys.stdout.write(".") + sys.stdout.flush() + +if __name__ == "__main__": + sys.stdout.write("Collecting data") + sys.stdout.flush() + run("stap -V") + run("which stap") + run("ls -ald `locate -r '/stap$'` `locate -r '/staprun$'`") + run("printenv | egrep '^PATH=|^LD_LIBRARY_PATH=|^SYSTEMTAP_.*='") + run("gcc -v") + run("uname -a") + run("dmesg | grep 'gcc'") + run("dmesg | egrep 'stap|systemtap' | tail -n 10") + run("cat /proc/cpuinfo | egrep 'processor|vendor_id|model name'") + run(r"rpm -qa --qf %{name}-%{version}-%{release}.%{arch}\\n | egrep 'systemtap|elfutils|kernel|gcc' | sort") + print "\nPlease include the following file in your bug report:", ofname |