#!/usr/bin/perl $| = 1; use Time::Local timelocal_nocheck; require "ctime.pl"; $dir = "/var/data/www/potaroo/tools/ipv4" ; $now = time() ; @tv = localtime($now) ; $nyear = $tv[5] + 1901 ; chdir($dir); system("$dir/ipv4 -f $dir") ; $gnuplot = "/usr/local/bin/gnuplot" ; if (!(-e $gnuplot)) { $gnuplot = "/usr/bin/gnuplot" ; } $ploticus = "/usr/local/bin/ploticus" ; #figure 01 open(T,">$dir/fig01.pl") ; print T <$dir/fig02.pl") ; print T <$dir/fig03.pl") ; print T <$dir/fig04.pl") ; print T <$dir/fig05.pl") ; print T <$dir/fig19.dat") ; open(I,"$dir/ipv4.series.proj.txt") ; while ($line = ) { chop($line) ; next if ($line =~ /^\#/) ; (@f) = split(/\s+/,$line) ; if ($#f >= 8) { if ($f[9] >= 219.914) { $f[9] = 0 ; } if ($f[12] >= 219.914 ) { $f[12] = 0 ; } if ($f[15] >= 219.914 ) { $f[15] = 0 ; } } print(T "$f[0] $f[2]") ; if ($#f >= 8) { print(T " $f[9] $f[12] $f[15]") ; } print(T "\n") ; } close(I) ; close(T) ; $ll = `tail -1 $dir/fig19.dat` ; (@f) = split(/\s+/,$ll) ; $ld = $f[0] ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIR Allocation - Projections\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [1997:2020]\n") ; print(CTL "plot \'$dir/fig19.dat\' using 1:2 title \"RIR Allocations\" with lines 3, \\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:3 title \"Linear\" with lines 2, \\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:4 title \"Exponential\" with lines 1, \\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:5 title \"Ploynomial - O(2)\" with lines 4\n") ; close(CTL); # figure 19a $out = "$dir/fig19a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIR Allocation - Smoothed Data\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:2009]\n") ; print(CTL "set yrange [100:]\n") ; print(CTL "plot \'ipv4.series.alloc.txt' using 1:2 title \"RIR Allocations\" with step 3,\\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:2 title \"Smoothed\" with lines 4\n") ; close(CTL); # figure 19b $out = "$dir/fig19b.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIR Allocation - Best Fit\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:2009]\n") ; print(CTL "set yrange [100:]\n") ; print(CTL "plot \'ipv4.series.alloc.txt' using 1:2 with lines 3,\\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:2 title \"RIR Allocations\" with lines 4, \\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:3 title \"Linear\" with lines 2, \\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:4 title \"Exponential\" with lines 1, \\\n") ; print(CTL " \'$dir/fig19.dat\' using 1:5 title \"Polynomial - O(2)\" with lines 5\n") ; close(CTL); unlink("$dir/fig19.dat") ; # figure 20 # plot 1:2, 1:6, 1:7 of ipv4.series.proj.txt with lines. $out = "$dir/fig20.png" ; $initial = 1 ; open(T,">$dir/fig20.dat") ; open(I,"$dir/ipv4.series.proj.txt") ; while ($line = ) { chop($line) ; next if ($line =~ /^\#/) ; (@f) = split(/\s+/,$line) ; if ($initial) { next if (!$f[3]) ; if ($#f > 6) { $initial = 0 ; } } else { if ($#f < 16) { $f[16] = 0 ; } if ($#f < 13) { $f[13] = 0 ; } if ($#f >= 9) { if ($f[10] >= 219.914) { $f[10] = 0 ; } if ($f[13] >= 219.914) { $f[13] = 0 ; } if ($f[16] >= 219.914) { $f[16] = 0 ; } } } print(T "$f[0] $f[3]") ; if ($#f >= 8) { print(T " $f[10] $f[13] $f[16]") ; } print(T "\n") ; } $f[0] += 0.1 ; print(T "$f[0] 0 0 0\n") ; close(I) ; close(T) ; $ll = `tail -1 $dir/fig20.dat` ; (@f) = split(/\s+/,$ll) ; $ld = $f[0] ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Advertised IPv4 Count - Best Fit\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:2035]\n") ; print(CTL "plot '$dir/fig20.dat' using 1:2 title \"Advertised Address Count\" with lines 3, \\\n") ; print(CTL " \'$dir/fig20.dat\' using 1:3 title \"Linear\" with lines 2, \\\n") ; print(CTL " \'$dir/fig20.dat\' using 1:4 title \"Exponential\" with lines 1, \\\n") ; print(CTL " \'$dir/fig20.dat\' using 1:5 title \"Polynomial - O(2)\" with lines 4\n") ; close(CTL); # figure 20a $out = "$dir/fig20a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Advertised IPv4 Count - Trend Fit\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:2009]\n") ; print(CTL "set yrange [60:]\n") ; print(CTL "plot \'$dir/ipv4.series.bgp.txt\' using 1:2 title \"BGP Data\" with step 3, \\\n") ; print(CTL " \'$dir/fig20.dat\' using 1:2 title \"Advertised Address Count\" with lines 4\n"); close(CTL); # figure 20b $out = "$dir/fig20b.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Advertised IPv4 Count - Trend Fit\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:2009]\n") ; print(CTL "set yrange [60:]\n") ; print(CTL "plot \'$dir/ipv4.series.bgp.txt\' using 1:2 title \"BGP Data\" with step 3, \\\n") ; print(CTL " \'$dir/fig20.dat\' using 1:2 title \"Advertised Address Count\" with lines 4, \\\n"); print(CTL " \'$dir/fig20.dat\' using 1:3 title \"Linear\" with lines 2, \\\n") ; print(CTL " \'$dir/fig20.dat\' using 1:4 title \"Exponential\" with lines 1, \\\n") ; print(CTL " \'$dir/fig20.dat\' using 1:5 title \"Polynomial - O(2)\" with lines 5 \n") ; close(CTL); unlink("$dir/fig20.dat") ; # figure 21 # plot 1:2, 1:5 of ipv4.series.unaratio.txt with lines. $out = "$dir/fig21.png" ; open(I,"ipv4.series.unaratio.txt") ; ; $ll = ; close(I) ; (@f) = split(/\s+/,$ll) ; $fd = $f[0] ; $ll = `tail -1 $dir/ipv4.series.unaratio.txt` ; (@f) = split(/\s+/,$ll) ; $ld = $f[0] ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set title \"Unadvertised: Advertised Ratio - Trend Fit\"\n"); print(CTL "set grid ytics\n"); print(CTL "set nokey\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Unadvertised / Advertised Ratio\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "plot '$dir/ipv4.series.unaratio.txt' using 1:2 title \"Ratio\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.unaratio.txt' using 1:3 title \"Smoothed Ratio\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.unaratio.txt' using 1:5 title \"Least Squares Best Fit\" with lines\n") ; close(CTL); # figure 22 # plot 1:2,3,7,8 ipv4.series.adv.txt with lines. $out = "$dir/fig22.png" ; #$fst = $fa + 2.0; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set title \"Advertised IPv4 Count - Smoothed Data\"\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:$la]\n") ; print(CTL "plot '$dir/ipv4.series.adv.txt' using 1:2 title \"Advertisements\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:4 title \"Smoothed\" with lines\n") ; close(CTL); # figure 23 # plot 1:2,3,7,8 as.series.adv.txt with lines. $out = "$dir/fig23.png" ; open(I,"$dir/ipv4.series.adv.txt") ; ; $ll = ; close(I) ; (@f) = split(/\s+/,$ll) ; $fa = $f[0] ; $ll = `tail -1 $dir/ipv4.series.adv.txt` ; (@f) = split(/\s+/,$ll) ; $la = $f[0] ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set title \"Advertised IPv4 Count - Trend Fit\"\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:$la]\n") ; print(CTL "plot '$dir/ipv4.series.adv.txt' using 1:2 title \"Advertisements\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:4 title \"Smoothed Advertisements\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:8 title \"Linear Model\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:9 title \"Exp Trend Model\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:12 title \"Poly O(2) Model\" with lines \n") ; close(CTL); # figure 23a # plot 1:2,3,7,8 as.series.adv.txt with lines. $out = "$dir/fig23a.png" ; open(I,"$dir/ipv4.series.adv.txt") ; ; $ll = ; close(I) ; (@f) = split(/\s+/,$ll) ; $fa = $f[0] ; $ll = `tail -1 $dir/ipv4.series.adv.txt` ; (@f) = split(/\s+/,$ll) ; $la = $f[0] ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set title \"Advertised IPv4 Count - Trend Fit\"\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:$la]\n") ; print(CTL "plot '$dir/ipv4.series.adv.txt' using 1:2 title \"Advertisements\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:4 title \"Smoothed Advertisements\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:8 title \"Linear Model\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:9 title \"Exp Trend Model\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.adv.txt' using 1:12 title \"Poly O(2) Model\" with lines \n") ; close(CTL); # figure 24 # plot diff of linear and compound models to best fit $od = "$dir/fig24.dat" ; $fa = 0 ; open(I,"$dir/ipv4.series.adv.txt") ; open(O,">$od") ; ; while ($ll = ) { chop($ll) ; (@f) = split(/\s+/,$ll) ; if ($#f > 8) { $dl = $f[7] - $f[1] ; $dc = $f[8] - $f[1] ; $dp = $f[11] - $f[1] ; print(O "$f[0] $dl $dc $dp") ; $dl = $f[7] - $f[3] ; $dc = $f[8] - $f[3] ; $dp = $f[11] - $f[3] ; if (!$fa) { $fa = $f[0] ; } print(O " $dl $dc $dp\n") ; $la = $f[0] ; } } close(I) ; close(O) ; $out = "$dir/fig24.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Advertised Addresses - Fit to Smoothed Data\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Error\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fa:$la]\n") ; print(CTL "plot '$od' using 1:5 title \"Linear Error\" with lines, \\\n") ; print(CTL " '$od' using 1:6 title \"Exp Trend Error\" with lines, \\\n") ; print(CTL " '$od' using 1:7 title \"Poly Error\" with lines \n") ; close(CTL); # figure 24a $out = "$dir/fig24a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set title \"Advertised Addresses - Fit to Raw Data\"\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Error\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fa:$la]\n") ; print(CTL "plot '$od' using 1:2 title \"Linear Error\" with lines, \\\n") ; print(CTL " '$od' using 1:3 title \"Exp Trend Error\" with lines, \\\n") ; print(CTL " '$od' using 1:4 title \"Poly Error\" with lines \n") ; close(CTL); unlink($od) ; # figure 25 $out = "$dir/fig25.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"First order differential of allocations(smoothed)\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [2002:]\n") ; print(CTL "set ylabel \"Assignment Rate (/8's p.a.\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL " plot \'ipv4.series.alloc.txt\' using 1:4 title \"Allocation Rate (smoothed)\" with lines, \\\n") ; print(CTL " \'ipv4.series.alloc.txt\' using 1:9 title \"Linear Best Fit\" with lines \n") ; close(CTL); # figure 25a $out = "$dir/fig25a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"First order differential of log(allocations(smoothed))\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [2002:]\n") ; print(CTL "set ylabel \"Assignment Rate (/8's p.a.\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL " plot \'ipv4.series.alloc.txt\' using 1:6 title \"log(Allocation Rate (smoothed))\" with lines, \\\n") ; print(CTL " \'ipv4.series.alloc.txt\' using 1:10 title \"Linear Best Fit\" with lines \n") ; close(CTL); # figure 26 $out = "$dir/fig26.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"First order differential of advertisements\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [2002:]\n") ; print(CTL "set ylabel \"Advertisement Growth Rate (/8's p.a.)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.adv.txt\' using 1:5 title \"Advertised Address Growth Rate\" with lines, \\\n") ; print(CTL " \'ipv4.series.adv.txt\' using 1:10 title \"Linear Best Fit\" with lines \n") ; close(CTL); # figure 26a $out = "$dir/fig26a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"First order differential of log(advertisements)\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [2002:]\n") ; print(CTL "set ylabel \"log(Advertisement Growth Rate (/8's p.a.))\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.adv.txt\' using 1:7 title \"log(Advertised Address Growth Rate)\" with lines, \\\n") ; print(CTL " \'ipv4.series.adv.txt\' using 1:11 title \"Linear Best Fit\" with lines \n") ; close(CTL); #figure 27 $out = "$dir/fig27.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIR Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Allocated Addresses (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [1984:$nyear]\n") ; print(CTL "plot \'ipv4.series.rirs.txt\' using 2:6 title \"ARIN\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:7 title \"RIPENCC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:5 title \"APNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:8 title \"LACNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:4 title \"AFRINIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:3 title \"IANA\" with lines\n") ; close(CTL); #figure 27a $out = "$dir/fig27a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"ARIN Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Allocated Addresses (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [1984:]\n") ; print(CTL "plot \'ipv4.series.rirs.txt\' using 2:6 title \"ARIN\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:11 title \"smoothed\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:27 title \"Projected\" with lines\n") ; close(CTL); #figure 27b $out = "$dir/fig27b.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"AFRINIC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Allocated Addresses (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [1984:]\n") ; print(CTL "plot \'ipv4.series.rirs.txt\' using 2:4 title \"AFRINIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:9 title \"smoothed\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:25 title \"Projected\" with lines\n") ; close(CTL); #figure 27c $out = "$dir/fig27c.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"APNIC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Allocated Addresses (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:5 title \"APNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:10 title \"smoothed\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:26 title \"Projected\" with lines\n") ; close(CTL); #figure 27d $out = "$dir/fig27d.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIPENCC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Allocated Addresses (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [1984:]\n") ; print(CTL "plot \'ipv4.series.rirs.txt\' using 2:7 title \"RIPENCC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:12 title \"smoothed\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:28 title \"Projected\" with lines\n") ; close(CTL); #figure 27e $out = "$dir/fig27e.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"LACNIC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Allocated Addresses (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [1984:]\n") ; print(CTL "plot \'ipv4.series.rirs.txt\' using 2:8 title \"LACNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:13 title \"smoothed\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:29 title \"Projected\" with lines\n") ; close(CTL); #figure 27f $out = "$dir/fig27f.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIR Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [1984:]\n") ; print(CTL "set ylabel \"Allocated Addresses (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:6 title \"ARIN\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:7 title \"RIPENCC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:5 title \"APNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:8 title \"LACNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:4 title \"AFRINIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:3 title \"IANA\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:27 title \"ARIN Projected\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:28 title \"RIPENCC Projected\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:26 title \"APNIC Projected\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:29 title \"LACNIC Projected\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:25 title \"AFRINIC Projected\" with lines\n") ; close(CTL); #14 - afrinic differential #figure 27g $out = "$dir/fig27g.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"AFRINIC Allocation Rate (smoothed(\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [1984:$nyear]\n") ; print(CTL "set ylabel \"Daily Address Allocation Rate (/8s per year)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:14 title \"AFRINIC\" with lines\n") ; close(CTL); #15 - apnic #figure 27h $out = "$dir/fig27h.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"APNIC Allocation Rate (smoothed(\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [1984:$nyear]\n") ; print(CTL "set ylabel \"Daily Address Allocation Rate (/8s per year)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:15 title \"APNIC\" with lines\n") ; close(CTL); #16 arin #figure 27i $out = "$dir/fig27i.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"ARIN Allocation Rate (smoothed)\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [1984:$nyear]\n") ; print(CTL "set ylabel \"Daily Address Allocation Rate (/8s per year)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:16 title \"ARIN\" with lines\n") ; close(CTL); #17 ripe #figure 27j $out = "$dir/fig27j.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIPENCC Allocation Rate (smoothed)\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [1984:$nyear]\n") ; print(CTL "set ylabel \"Daily Address Allocation Rate (/8s per year)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:17 title \"RIPENCC\" with lines\n") ; close(CTL); #18 lacnic #figure 27k $out = "$dir/fig27k.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"LACNIC Allocation Rate (smoothed)\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [1984:$nyear]\n") ; print(CTL "set ylabel \"Daily Address Allocation Rate (/8s per year)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:18 title \"LACNIC\" with lines\n") ; close(CTL); #19 total #figure 27l $out = "$dir/fig27l.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"RIR Daily allocation rate\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set xrange [1984:$nyear]\n") ; print(CTL "set ylabel \"Daily Address Allocation Rate (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:19 title \"Total\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:14 title \"AFRINIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:15 title \"APNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:16 title \"ARIN\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:17 title \"RIPENCC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:18 title \"LACNIC\" with lines\n") ; close(CTL); #figure28 $out = "$dir/fig28.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Relative RIR Allocation Rates\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Rlative Allocation Rate\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:]\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:22 title \"ARIN\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:23 title \"RIPENCC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:21 title \"APNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:24 title \"LACNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:20 title \"AFRINIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:32 title \"ARIN Projection\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:33 title \"RIPENCC Projection\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:31 title \"APNIC Projection\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:34 title \"LACNIC Projection\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:30 title \"AFRINIC Projection\" with lines\n") ; close(CTL); #figure 28a $out = "$dir/fig28a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Relative ARIN Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Relative Allocation Rate\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:]\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:22 title \"ARIN\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:32 title \"Projected\" with lines\n") ; close(CTL); #figure 28b $out = "$dir/fig28b.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Relative AFRINIC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Relative Allocation Rate\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:]\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:20 title \"AFRINIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:30 title \"Projected\" with lines\n") ; close(CTL); #figure 28c $out = "$dir/fig28c.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Relative APNIC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Relative Allocation Rate\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:]\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:21 title \"APNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:31 title \"Projected\" with lines\n") ; close(CTL); #figure 28d $out = "$dir/fig28d.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Relative RIPENCC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Relative Allocation Rate\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:]\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:23 title \"RIPENCC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:33 title \"Projected\" with lines\n") ; close(CTL); #figure 28e $out = "$dir/fig28e.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set title \"Relative LACNIC Allocations\"\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Relative Allocation Rate\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2002:]\n"); print(CTL "plot \'ipv4.series.rirs.txt\' using 2:24 title \"LACNIC\" with lines, \\\n") ; print(CTL " \'ipv4.series.rirs.txt\' using 2:34 title \"Projected\" with lines\n") ; close(CTL); # figure 29 # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29.png" ; open(I,"$dir/ipv4.series.model.txt") ; ; $ll = ; close(I) ; (@f) = split(/\s+/,$ll) ; $fd = $f[0] ; $ll = `tail -1 $dir/ipv4.series.model.txt` ; (@f) = split(/\s+/,$ll) ; $ld = $f[0] ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:10]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:8 title \"ARIN Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:9 title \"RIPE Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:10 title \"APNIC Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:11 title \"Lacnic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:12 title \"Afrinic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:13 title \"Various Pool\" with lines 1 \n") ; close(CTL); # figure 29a # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:10]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:8 title \"ARIN Pool\" with lines\n") ; close(CTL); # figure 29b # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29b.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:10]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:9 title \"RIPE Pool\" with lines 3\n") ; close(CTL); # figure 29c # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29c.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:10]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:10 title \"APNIC Pool\" with lines 4\n") ; close(CTL); # figure 29d # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29d.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:10]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:11 title \"LACNIC Pool\" with lines 5\n") ; close(CTL); # figure 29e # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29e.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:10]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:12 title \"AFRINIC Pool\" with lines 6\n") ; close(CTL); # figure 29f # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29f.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:10]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:13 title \"VARIOUS Pool\" with lines 1\n") ; close(CTL); # figure 29g # plot 1:2, 1:5 of as.series.unaratio.txt with lines. $out = "$dir/fig29g.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [$fd:$ld]\n") ; print(CTL "set yrange [0:30]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:8 title \"ARIN Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:9 title \"RIPE Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:10 title \"APNIC Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:11 title \"Lacnic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:12 title \"Afrinic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:13 title \"Various Pool\" with lines 1, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:6 title \"RIR Pool\" with lines 2 \n") ; close(CTL); # figure 30 # plot 1:2, 1:5 of ipv4.series.unaratio.txt with lines. $out = "$dir/fig30.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:$ld]\n") ; print(CTL "set yrange [0:220]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:2 title \"IANA Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:3 title \"Assigned\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:4 title \"Advertised\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:5 title \"Unadvertised\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:6 title \"RIR Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:8 title \"Arin Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:9 title \"RIPE Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:10 title \"APNIC Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:11 title \"Lacnic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:12 title \"Afrinic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:13 title \"Various Pool\" with lines \n") ; close(CTL); # figure 30a # plot 1:2, 1:5 of ipv4.series.unaratio.txt with lines. $out = "$dir/fig30a.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:$ld]\n") ; print(CTL "set yrange [0:220]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:4 title \"Advertised\" with lines 3, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines 6\n") ; close(CTL); # figure 30b # plot 1:2, 1:5 of ipv4.series.unaratio.txt with lines. $out = "$dir/fig30b.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:$ld]\n") ; print(CTL "set yrange [0:220]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:4 title \"Advertised\" with lines 3, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:5 title \"Unadvertised\" with lines 4, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines 6\n") ; close(CTL); # figure 30c # plot 1:2, 1:5 of ipv4.series.unaratio.txt with lines. $out = "$dir/fig30c.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:$ld]\n") ; print(CTL "set yrange [0:220]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:4 title \"Advertised\" with lines 3, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:3 title \"Assigned\" with lines 2,\\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:5 title \"Unadvertised\" with lines 4, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines 6\n") ; close(CTL); # figure 30d # plot 1:2, 1:5 of ipv4.series.unaratio.txt with lines. $out = "$dir/fig30d.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:$ld]\n") ; print(CTL "set yrange [0:120]\n") ; print(CTL "plot '$dir/ipv4.series.model.txt' using 1:2 title \"IANA Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:6 title \"RIR Pool\" with lines 2, \\\n") ; print(CTL " '$dir/ipv4.series.model.txt' using 1:7 title \"Projection\" with lines 6\n") ; close(CTL); $ll = `tail -1 $dir/ipv4.series.modelb.txt` ; (@f) = split(/\s+/,$ll) ; $ldd = $f[0] ; # figure 30e # plot 1:2, 1:5 of ipv4.series.unaratio.txt with lines. $out = "$dir/fig30e.png" ; open(CTL,"|$gnuplot") ; print(CTL "set terminal png small\n"); print(CTL "set output \'$out\'\n"); print(CTL "set grid ytics\n"); print(CTL "set key below box\n"); print(CTL "set noarrow\n"); print(CTL "set size 1,0.8\n") ; print(CTL "set ylabel \"Address Count (/8s)\"\n"); print(CTL "set xlabel \"Date\"\n"); print(CTL "set xrange [2000:$ldd]\n") ; print(CTL "set yrange [0:220]\n") ; print(CTL "plot '$dir/ipv4.series.modelb.txt' using 1:2 title \"IANA Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:3 title \"Assigned\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:4 title \"Advertised\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:5 title \"Unadvertised\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:6 title \"RIR Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:7 title \"Projection\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:8 title \"Arin Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:9 title \"RIPE Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:10 title \"APNIC Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:11 title \"Lacnic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:12 title \"Afrinic Pool\" with lines, \\\n") ; print(CTL " '$dir/ipv4.series.modelb.txt' using 1:13 title \"Various Pool\" with lines \n") ; close(CTL); open(I,"$dir/ipv4.series.model.txt") ; ; $ll = ; (@f) = split(/\s+/,$ll) ; $fd = $f[0] ; while ($ll = ) { (@f) = split(/\s+/,$ll) ; $ld = $f[0] ; if ($f[1] > 0.0) { $ianad = $f[0] ; } } close(I) ; $now = time() ; @tv = localtime($now) ; $mstr = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")[$tv[4]] ; $dstr = sprintf("%02d-%s-%d %02d:%02d UTC+1000",$tv[3],$mstr,($tv[5] + 1900),$tv[2],$tv[1]) ; $year = int($ianad) ; $day = int(($ianad - $year) * 365) ; $tvv[5] = $year - 1900 ; $tvv[3] = $day ; $tvv[4] = 0 ; $etime = timelocal_nocheck(@tvv); $iana_e_date = $etime ; @tv = localtime($etime) ; $mstr = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")[$tv[4]]; $ianastr = sprintf("%02d-%s-%d",$tv[3],$mstr,($tv[5] + 1900)) ; $year = int($ld) ; $day = int(($ld - $year) * 365) ; $tvv[5] = $year - 1900 ; $tvv[3] = $day ; $tvv[4] = 0 ; $etime = timelocal_nocheck(@tvv); $rir_e_date = $etime ; @tv = localtime($etime) ; $mstr = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")[$tv[4]]; $estr = sprintf("%02d-%s-%d",$tv[3],$mstr,($tv[5] + 1900)) ; $year = int($ldd) ; $day = int(($ldd - $year) * 365) ; $tvv[5] = $year - 1900 ; $tvv[3] = $day ; $tvv[4] = 0 ; $etime = timelocal_nocheck(@tvv); @tv = localtime($etime) ; $mstr = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")[$tv[4]]; $eestr = sprintf("%02d-%s-%d",$tv[3],$mstr,($tv[5] + 1900)) ; open(I,"$dir/index.template.html") ; open(O,">$dir/index.html") ; while ($line = ) { if ($line =~ /\[DATE\]/) { $line =~ s/\[DATE\]/$dstr/go ; } if ($line =~ /\[EDATE\]/) { $line =~ s/\[EDATE\]/$estr/go ; } if ($line =~ /\[TDATE\]/) { $line =~ s/\[TDATE\]/$eestr/go ; } if ($line =~ /\[IDATE\]/) { $line =~ s/\[IDATE\]/$ianastr/go ; } print(O $line) ; } close(I) ; close(O) ; open(P,">>$dir/ipv4.series.prediction.txt") ; print(P "$now $ianad $iana_e_date $ld $rir_e_date\n") ; print("$now $ianad $iana_e_date $ld $rir_e_date\n") ; close(P) ; #open(I,"$dir/numerology.template.html") ; #open(O,">$dir/numerology.html") ; # #while ($line = ) { # if ($line =~ /\[DATE\]/) { # $line =~ s/\[DATE\]/$dstr/go ; # } # if ($line =~ /\[EDATE\]/) { # $line =~ s/\[EDATE\]/$estr/go ; # } # if ($line =~ /\[TDATE\]/) { # $line =~ s/\[TDATE\]/$eestr/go ; # } # if ($line =~ /\[IDATE\]/) { # $line =~ s/\[IDATE\]/$ianastr/go ; # } # # print(O $line) ; # } #close(I) ; #close(O) ; # # now transfer numerology.html and *.png to the ispcolumn directory # $dir to $ispcol_dir #opendir(D,"$dir") ; #foreach $file (readdir(D)) { # if (($file eq "numerology.html") || ($file =~ /\.png$/) || ($file eq "Makefile") # || ($file =~ /\.c$/) || ($file =~ /\.h$/) || ($file =~ /\.pl$/)) { # system("cp $dir/$file $ispcol_dir/$file") ; # } # } #closedir(D) ; exit ;