#!/bin/bash #Copyright 2001 William Stearns #This is released under the GPL. New versions at ftp://ftp.stearns.org #and http://www.stearns.org # #This script will collect debugging information relevant to problems #with the Intermezzo filesystem. INDEBUGVER="0.1" usage () { echo 'Suggested usage:' >>/dev/stderr echo "$0" '| less -S' >>/dev/stderr echo " or" >>/dev/stderr echo "$0" '>debug.thishostname' >>/dev/stderr echo " The above file can be sent to the Intermezzo developers." >>/dev/stderr echo "See http://www.inter-mezzo.org for more details." >>/dev/stderr } case "$1" in usage|-h|/h) usage exit ;; esac echo "Indebug version $INDEBUGVER" echo "Copyright 2001, William Stearns, GPL'd" echo ; echo Hostname hostname | sed -e 's/^/ /' echo ; echo Kernel uname -a | sed -e 's/^/ /' echo ; echo /etc/intermezzo directory ls -al /etc/intermezzo | sed -e 's/^/ /' for X in /etc/intermezzo/* ; do echo ; echo $X cat $X | sed -e 's/^/ /' done echo ; echo /etc/hosts relevant lines for OneAddr in \ `cat * | grep 'ipaddr=' | sed -e 's/.*ipaddr=//' -e 's/ .*//' -e 's/"//g'` \ `cat * | grep 'bindaddr=' | sed -e 's/.*bindaddr=//' -e 's/ .*//' -e 's/"//g'` ; do cat /etc/hosts | grep $OneAddr done | sort | uniq | sed -e 's/^/ /' echo ; echo Interfaces ifconfig | sed -e 's/^/ /' echo ; echo Routing table route -n | sed -e 's/^/ /' echo ; echo /etc/fstab \(Intermezzo portions\) cat /etc/fstab | grep -i intermezzo | sed -e 's/^/ /' for OneFstab in `cat /etc/fstab | grep -i intermezzo | awk '{print $1 " " $2}'` ; do echo ; echo $OneFstab ls -ald $OneFstab | sed -e 's/^/ /' done echo ; echo /dev/intermezzo\* ls -al /dev/intermezzo* | sed -e 's/^/ /' echo ; echo /proc/devices cat /proc/devices | sed -e 's/^/ /' echo ; echo Mounted Intermezzo filesystems mount | grep -i intermezzo | sed -e 's/^/ /' echo ; echo Running Lentos ps ax | grep -i '(lento|mount)' | grep -v grep | sed -e 's/^/ /' echo ; echo Loaded modules lsmod | sed -e 's/^/ /' if type -path rpm >/dev/null 2>/dev/null ; then echo ; echo Loaded Intermezzo rpms rpm -qa | egrep -i \ '(^e2fsprogs\-|^expat\-|^intermezzo\-|^librsync\-|^linux\-|^losetup\-|^mount\-|^perl\-)' \ | sort | sed -e 's/^/ /' else echo ; echo No rpm binary, unable to list Intermezzo packages. fi echo ; echo Syslog messages cat /var/log/messages | egrep -i \ '(presto|EXT3|InterMezzo|Journal|Lento|filter_|no fileset inode|cache file ops|Fsetroot|mount|fsck|reiser)' \ | sed -e 's/^/ /' echo ; echo Oops messages cat /var/log/messages | grep -A 50 -B 15 -i 'kernel: Oops' | grep 'kernel:' | sed -e 's/^/ /' if type -path ksymoops >/dev/null 2>/dev/null ; then echo ; echo Oops decoded cat /var/log/messages | grep kernel | ksymoops | sed -e 's/^/ /' else echo ; echo No ksymoops binary, unable to decode any oops\'s. Attaching /proc/ksyms: cat /proc/ksyms | sed -e 's/^/ /' fi