Over a million developers have joined DZone.

Crossbeam Configuration Collection Script

DZone's Guide to

Crossbeam Configuration Collection Script

Free Resource
// 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.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}