Created
October 1, 2014 17:59
-
-
Save johntdyer/44062b1f6001028a7f78 to your computer and use it in GitHub Desktop.
support_data_collector
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # create working dir | |
| mkdir /tmp/report | |
| # archive some basic files | |
| for h in /proc/cpuinfo /etc/redhat-release /opt/voxeo/prism/conf/version.xml /opt/voxeo/prism/conf/capacity.json; do | |
| cat h > /tmp/report/$h.report | |
| done | |
| # get some system data | |
| ps aux > /tmp/report/ps.report | |
| df -h > /tmp/report/df.report | |
| free -h > /tmp/report/free.report | |
| rpm -qa > /tmp/report/rpm.report | |
| # Archive version manifests | |
| find /opt/voxeo/prism/ -type f -iname "MANIFEST.MF" -exec tar -rf /tmp/report/MANIFESTS.tar {} \; | |
| # Backup and delete working space | |
| tar czvf /tmp/report-`date +"%m-%d-%Y"`.tgz /tmp/report | |
| rm -rf /tmp/report |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment