Over a million developers have joined DZone.

Crossbeam Configuration Collection Script

// This script will gather and grab the configuration & logs from a crossbeam X series chassis.

cd /var/log
tar cf $HOSTNAME-tech-support.tar messages*
tar rf $HOSTNAME-tech-support.tar audit*
cd /tftpboot/.private/home/$USER/
echo "Now saving technical data... "
echo "Please wait... executing 'show tech-support...'"
yes |/crossbeam/bin/cli -i "show tech-support" > $HOSTNAME-show-tech-support.txt
echo "tech support data saved - stage 1 of 2 complete..."
echo " "
echo " "
echo "Preparing to compress the results, this may take a few minutes... "
tar rf $HOSTNAME-tech-support.tar $HOSTNAME-show-tech-support.txt
gzip $HOSTNAME-tech-support.tar
/bin/rm $HOSTNAME-show-tech-support.txt
echo "Tech Support data collection complete."
echo " "
echo "File saved as /tftpboot/.private/home/$USER/$HOSTNAME-tech-support.tar " 
# Run this script
# bash 

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}