sos-linux 610 B

1234567891011121314151617181920212223242526272829303132
  1. #! /bin/sh
  2. me="`basename $0`"
  3. outf="$HOME/sos-`hostname`-`date +%Y%m%d-%H%M%S`.txt"
  4. if test "`whoami`" != "root"; then
  5. echo "$me: please run $me as root" 1>&2
  6. exit 1
  7. fi
  8. echo "$me: output file is $outf"
  9. exec > $outf
  10. exec 2>&1
  11. set -x
  12. uname -a
  13. grep . /etc/*release* /etc/*version* | sed 50q
  14. find /sys/module/aoe -name version | xargs cat
  15. cat /proc/mounts
  16. aoe-version
  17. aoe-stat
  18. cat /proc/mdstat
  19. pvs
  20. ifconfig -a
  21. free
  22. dmesg | tail -n 50
  23. lspci
  24. set +x
  25. for i in `aoe-stat | awk '{print $3}' | sed 's!,! !g'`; do
  26. echo ethtool -S $i
  27. done | sort | uniq | sh -x
  28. # top -b -n 1
  29. grep . /sys/block/etherd*/debug /dev/null