#!/bin/bash # based on 'collect_system_info' . run_profile.txt . $base_dir/plans/commands/common.fns SUT=`hostname -s` run_dir=$run_dir if [ ! -d $run_dir ]; then echo "Error: Run directory '$run_dir' does not exist" exit -10 fi mkdir -p $run_dir/sysinfo base_dir=$run_dir/sysinfo/$SUT count=1 while [ -d $base_dir.$count ]; do echo "Warning: Run directory '$base_dir.$count' already exists. Incrementing..." let count+=1 done out_dir=$base_dir.$count mkdir $out_dir echo "sysinfo & procfsdump go to :$out_dir:" df -Th $out_dir echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" # Take a snapshot of the system sut_sysinfo >$out_dir/sysinfo.txt procfsdump >$out_dir/procfsfiles.txt # generate a summary - system_summary [html|text] #system_summary $out_dir text > $out_dir/summary.txt # generate a diff - system_diff [html|text] #if [ $count -eq 2 ]; then # system_diff $base_dir.1 $base_dir.2 html > $run_dir/sysinfo/$SUT-diff.html #fi