diff -u amanda-2.4.3.orig/amplot/amplot.awk amanda-2.4.3.new/amplot/amplot.awk --- amanda-2.4.3.orig/amplot/amplot.awk 2002-12-30 11:23:47.000000000 -0500 +++ amanda-2.4.3.new/amplot/amplot.awk 2003-03-03 14:23:47.000000000 -0500 @@ -485,8 +485,14 @@ if (gnuplot==0) { printf "set output \"%s.ps\"\n",fil >>"title"; - if(paper==1) printf "set term postscript landscape \"Times-Roman\" 10\n" >>"title"; - else printf "set term postscript portrait \"Times-Roman\" 10\n" >>"title"; + if(bw==1) { + if(paper==1) printf "set term postscript landscape \"Times-Roman\" 10\n" >>"title"; + else printf "set term postscript portrait \"Times-Roman\" 10\n" >>"title"; + } + else { + if(paper==1) printf "set term postscript landscape color \"Times-Roman\" 10\n" >>"title"; + else printf "set term postscript portrait color \"Times-Roman\" 10\n" >>"title"; + } } printf "set ylabel """";" >>"title"; # make sure there is no ylabel fmt= "set label %d \"%s\" at "third_col", %d\n"; diff -u amanda-2.4.3.orig/amplot/amplot.g amanda-2.4.3.new/amplot/amplot.g --- amanda-2.4.3.orig/amplot/amplot.g 2002-11-04 20:37:52.000000000 -0500 +++ amanda-2.4.3.new/amplot/amplot.g 2003-03-03 14:28:42.000000000 -0500 @@ -62,7 +62,7 @@ plot "run_queue" title "Run Queue" with line 3,\ "tape_queue" title "Tape Queue" with line 2,\ "finished" title "Dumps Finished" with line 4,\ - "bandw_free" title "Bandwidth Allocated" with line 6, \ + "bandw_free" title "Bandwidth Allocated" with line 8, \ "disk_alloc" title "%Disk Allocated" with line 1, \ "tape_wait" title "%Tape Wait" with line 5,\ "tape_idle" title "Taper Idle" with line 1,\ diff -u amanda-2.4.3.orig/amplot/amplot.sh.in amanda-2.4.3.new/amplot/amplot.sh.in --- amanda-2.4.3.orig/amplot/amplot.sh.in 2002-11-04 20:37:52.000000000 -0500 +++ amanda-2.4.3.new/amplot/amplot.sh.in 2003-03-03 14:24:18.000000000 -0500 @@ -58,7 +58,8 @@ echo " -e Extends x (time) axes if needed" echo " -g Run gnuplot directly no postscript file generated DEFAULT" echo " -l Landscape mode suitable for printing" - echo " -p Postscript output" + echo " -p Postscript output (color)" + echo " -b The postscipt will be b/w" echo " -t T Set the right edge of the plot to be T hours" exit 1 fi @@ -75,6 +76,7 @@ cmpres=0 para="" maxtime=4 +bw=0 # setting up the parameters to pass to [gn]awk while :; do @@ -84,6 +86,7 @@ -g) gnuplot=1; shift;; -l) paper=1; para=$para"$AVARFLAG paper=1 "; shift;; -p) gnuplot=0; shift;; + -b) bw=1; shift;; -t) shift if test "$#" -eq 0; then echo "amplot: no argument for -t option" 1>&2 @@ -109,6 +112,14 @@ echo "amplot: -l requires -p flag at the same time" 1>&2 exit 6 fi + if [ "$bw" -eq 1 ] ; then + echo "amplot: -b requires -p flag at the same time" 1>&2 + exit 6 + fi +fi + +if [ $bw -eq 1 ]; then + para=$para" bw=1" fi list=""; # files to compress at the end