#!/bin/bash DIR=`dirname $0` if [ $# != 2 ]; then echo "You must specify the path to the chart.pl script and the Chart Directory libraries." exit 1 fi SCRIPT=$1 LIBRARIES=$2 export PERL5LIB=$LIBRARIES pushd $DIR > /dev/null $SCRIPT --table html -s lines --title "02 Interrupt Rate" -x "Time (Secs.)" -y "Interrupts/sec" plot-files/*int_rate.plot $SCRIPT --table html -s stackedlines --title "01 - CPU all" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-all_sys.plot plot-files/cpu-all_softirq.plot plot-files/cpu-all_idle.plot plot-files/cpu-all_nice.plot plot-files/cpu-all_irq.plot plot-files/cpu-all_steal.plot plot-files/cpu-all_user.plot plot-files/cpu-all_iowait.plot $SCRIPT --table html -s stackedlines --title "03 - CPU 0" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-0_sys.plot plot-files/cpu-0_softirq.plot plot-files/cpu-0_idle.plot plot-files/cpu-0_nice.plot plot-files/cpu-0_irq.plot plot-files/cpu-0_steal.plot plot-files/cpu-0_user.plot plot-files/cpu-0_iowait.plot $SCRIPT --table html -s stackedlines --title "04 - CPU 1" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-1_sys.plot plot-files/cpu-1_softirq.plot plot-files/cpu-1_idle.plot plot-files/cpu-1_nice.plot plot-files/cpu-1_irq.plot plot-files/cpu-1_steal.plot plot-files/cpu-1_user.plot plot-files/cpu-1_iowait.plot $SCRIPT --table html -s stackedlines --title "05 - CPU 2" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-2_sys.plot plot-files/cpu-2_softirq.plot plot-files/cpu-2_idle.plot plot-files/cpu-2_nice.plot plot-files/cpu-2_irq.plot plot-files/cpu-2_steal.plot plot-files/cpu-2_user.plot plot-files/cpu-2_iowait.plot $SCRIPT --table html -s stackedlines --title "06 - CPU 3" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-3_sys.plot plot-files/cpu-3_softirq.plot plot-files/cpu-3_idle.plot plot-files/cpu-3_nice.plot plot-files/cpu-3_irq.plot plot-files/cpu-3_steal.plot plot-files/cpu-3_user.plot plot-files/cpu-3_iowait.plot $SCRIPT --table html -s stackedlines --title "07 - CPU 4" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-4_sys.plot plot-files/cpu-4_softirq.plot plot-files/cpu-4_idle.plot plot-files/cpu-4_nice.plot plot-files/cpu-4_irq.plot plot-files/cpu-4_steal.plot plot-files/cpu-4_user.plot plot-files/cpu-4_iowait.plot $SCRIPT --table html -s stackedlines --title "08 - CPU 5" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-5_sys.plot plot-files/cpu-5_softirq.plot plot-files/cpu-5_idle.plot plot-files/cpu-5_nice.plot plot-files/cpu-5_irq.plot plot-files/cpu-5_steal.plot plot-files/cpu-5_user.plot plot-files/cpu-5_iowait.plot $SCRIPT --table html -s stackedlines --title "09 - CPU 6" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-6_sys.plot plot-files/cpu-6_softirq.plot plot-files/cpu-6_idle.plot plot-files/cpu-6_nice.plot plot-files/cpu-6_irq.plot plot-files/cpu-6_steal.plot plot-files/cpu-6_user.plot plot-files/cpu-6_iowait.plot $SCRIPT --table html -s stackedlines --title "10 - CPU 7" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-7_sys.plot plot-files/cpu-7_softirq.plot plot-files/cpu-7_idle.plot plot-files/cpu-7_nice.plot plot-files/cpu-7_irq.plot plot-files/cpu-7_steal.plot plot-files/cpu-7_user.plot plot-files/cpu-7_iowait.plot $SCRIPT --table html -s stackedlines --title "11 - CPU 8" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-8_sys.plot plot-files/cpu-8_softirq.plot plot-files/cpu-8_idle.plot plot-files/cpu-8_nice.plot plot-files/cpu-8_irq.plot plot-files/cpu-8_steal.plot plot-files/cpu-8_user.plot plot-files/cpu-8_iowait.plot $SCRIPT --table html -s stackedlines --title "12 - CPU 9" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-9_sys.plot plot-files/cpu-9_softirq.plot plot-files/cpu-9_idle.plot plot-files/cpu-9_nice.plot plot-files/cpu-9_irq.plot plot-files/cpu-9_steal.plot plot-files/cpu-9_user.plot plot-files/cpu-9_iowait.plot $SCRIPT --table html -s stackedlines --title "13 - CPU 10" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-10_sys.plot plot-files/cpu-10_softirq.plot plot-files/cpu-10_idle.plot plot-files/cpu-10_nice.plot plot-files/cpu-10_irq.plot plot-files/cpu-10_steal.plot plot-files/cpu-10_user.plot plot-files/cpu-10_iowait.plot $SCRIPT --table html -s stackedlines --title "14 - CPU 11" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-11_sys.plot plot-files/cpu-11_softirq.plot plot-files/cpu-11_idle.plot plot-files/cpu-11_nice.plot plot-files/cpu-11_irq.plot plot-files/cpu-11_steal.plot plot-files/cpu-11_user.plot plot-files/cpu-11_iowait.plot $SCRIPT --table html -s stackedlines --title "15 - CPU 12" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-12_sys.plot plot-files/cpu-12_softirq.plot plot-files/cpu-12_idle.plot plot-files/cpu-12_nice.plot plot-files/cpu-12_irq.plot plot-files/cpu-12_steal.plot plot-files/cpu-12_user.plot plot-files/cpu-12_iowait.plot $SCRIPT --table html -s stackedlines --title "16 - CPU 13" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-13_sys.plot plot-files/cpu-13_softirq.plot plot-files/cpu-13_idle.plot plot-files/cpu-13_nice.plot plot-files/cpu-13_irq.plot plot-files/cpu-13_steal.plot plot-files/cpu-13_user.plot plot-files/cpu-13_iowait.plot $SCRIPT --table html -s stackedlines --title "17 - CPU 14" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-14_sys.plot plot-files/cpu-14_softirq.plot plot-files/cpu-14_idle.plot plot-files/cpu-14_nice.plot plot-files/cpu-14_irq.plot plot-files/cpu-14_steal.plot plot-files/cpu-14_user.plot plot-files/cpu-14_iowait.plot $SCRIPT --table html -s stackedlines --title "18 - CPU 15" -x "Time (secs.)" -y "CPU Utilization" --y-range=0:100 --legend-position=bottom plot-files/cpu-15_sys.plot plot-files/cpu-15_softirq.plot plot-files/cpu-15_idle.plot plot-files/cpu-15_nice.plot plot-files/cpu-15_irq.plot plot-files/cpu-15_steal.plot plot-files/cpu-15_user.plot plot-files/cpu-15_iowait.plot echo -e "\n
\n\n" >> chart.html html_file=`echo $i | sed -e "s/png/html/"` if [ -e $html_file ]; then echo -e " | \n" >> chart.html cat $html_file >> chart.html echo -e " | \n" >> chart.html fi echo -e "