#!/bin/sh PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin # Keep going even if one of the programs report an error code # set -e mkdir system && cd system if type dmidecode >/dev/null 2>&1; then # Throw away error messages. It will print "/dev/mem: mmap: Bad address" # in Xen machines. dmidecode > dmidecode 2> /dev/null fi if type lspci >/dev/null 2>&1; then lspci > lspci lspci -n > lspci-n fi if type lsusb >/dev/null 2>&1; then lsusb > lsusb fi if type lsscsi >/dev/null 2>&1; then lsscsi > lsscsi fi if type lsmod >/dev/null 2>&1; then lsmod > lsmod fi uname -smr > uname-smr uname -n > hostname ifconfig -a > ifconfig-a route -n > route-n cat /proc/cpuinfo > cpuinfo cat /proc/meminfo > meminfo # Collect software RAID status if [ -f /proc/mdstat ] ; then cat /proc/mdstat > mdstat fi # Collect mount points, for nagios configuration cp /etc/fstab fstab cat /proc/mounts > procmounts # Document current runlevel, useful to differenciate LTSP # thin clients from diskless workstations. runlevel > runlevel # Throw away error message from laptop-detect using dmidecode in Xen # domUs. See #438693 for more info. if [ -x /usr/sbin/laptop-detect ] && /usr/sbin/laptop-detect 2>/dev/null; then touch laptop fi for f in /etc/ssh/ssh_host*.pub ; do cp $f . done if [ -f /etc/X11/xorg.conf ]; then cp /etc/X11/xorg.conf . fi