--- iog-1.03.orig/iog.cfg
+++ iog-1.03/iog.cfg
@@ -26,5 +26,7 @@
 # [switch2:192.168.0.11:public:sysUpTime:/www/iog]
 # sw2-port20:192.168.0.11:public:ifHCInOctets.20:ifHCOutOctets.20:/www/iog/
 #
+[localhost:127.0.0.1:public:sysUpTime.0:/var/lib/iog]
+localhost:127.0.0.1:public:ifInOctets.2:ifOutOctets.2:/var/lib/iog
 
 
--- iog-1.03.orig/iog
+++ iog-1.03/iog
@@ -39,7 +39,7 @@
 my($inoctets,$outoctets,$path,$iogver,$hostreset,$kbsize,$mbsize,$gbsize);
 
 $BER::pretty_print_timeticks="0";
-$cfgfile="$main::binpath"."iog.cfg";
+$cfgfile="/etc/iog.cfg";
 $iogver="v1.03";
 
 # Default Byte Sizes
@@ -361,11 +361,11 @@
 }
 
 sub footer {        
-print DHTML "<br><br><br></td></tr></table><table cellpadding=3 align=left>        
-<tr><td><a href=http://www.dynw.com/iog/><img src=ioglogo.gif border=0></a></td>    
-<td>IOG $iogver - <a href=http://www.dynw.com/iog/>Input Output Grapher</a><br>
--<br>James Dogopoulos &lt;<a href=mailto:jd\@dynw.com>jd\@dynw.com</a>&gt;<br>
-Questions or comments to <a href=mailto:iog\@dynw.com>iog\@dynw.com</a>
+print DHTML "<br><br><br></td></tr></table><table cellpadding=3 align=\"left\">        
+<tr><td><a href=\"http://www.dynw.com/iog/\"><img src=\"ioglogo.gif\" border=0 alt=\"iog\"></a></td>    
+<td>IOG $iogver - <a href=\"http://www.dynw.com/iog/\">Input Output Grapher</a><br>
+-<br>James Dogopoulos &lt;<a href=\"mailto:jd\@dynw.com\">jd\@dynw.com</a>&gt;<br>
+Questions or comments to <a href=\"mailto:iog\@dynw.com\">iog\@dynw.com</a>
 </td></tr></table><br>";
 }
 
@@ -403,8 +403,10 @@
  flock(DHTML, 2) or print "can't flock $name $host: $!";
  truncate(DHTML, 0);
 
+ print DHTML qq(<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+    "http://www.w3.org/TR/html4/loose.dtd">\n\n);
  print DHTML "<html><title>IOG $iogver - $host</title>
-<META HTTP-EQUIV=Refresh CONTENT=3600><body bgcolor=#FFFFFF>
+<META HTTP-EQUIV=\"Refresh\" CONTENT=3600><body bgcolor=\"#FFFFFF\">
 <table border=0><tr><td>";
 
  my $dexist = (-f "$path".$main::SL."$name"."-days.html");
@@ -412,32 +414,32 @@
 
   if ($newday != "1") {
    if ($dexist && $mexist) {
-   print DHTML "<font size=3> [ Today | <a href="."$name"."-days.html>This Month</a>
-   | <a href="."$name"."-months.html>Previous Months</a> ]</font><br><br>";
+   print DHTML "<font size=3> [ Today | <a href=\""."$name"."-days.html\">This Month</a>
+   | <a href=\""."$name"."-months.html\">Previous Months</a> ]</font><br><br>";
    } else {
      if ($dexist && !$mexist) {
-     print DHTML "<font size=3> [ Today | <a href="."$name"."-days.html>This
+     print DHTML "<font size=3> [ Today | <a href=\""."$name"."-days.html\">This
      Month</a> | Previous Months ]</font><br><br>";
      } else { 
         if (!$dexist && $mexist) {
         print DHTML "<font size=3> [ Today | This Month 
-        | <a href="."$name"."-months.html>Previous Months</a> ]</font><br><br>";
+        | <a href=\""."$name"."-months.html\">Previous Months</a> ]</font><br><br>";
         } else { print DHTML "[ Today | This Month | Previous Months ]"; }
      }
    }
   } 
   else { 
    if ($dexist && $mexist) {
-   print DHTML "<font size=3> [ <a href="."$name"."-days.html>This Month</a>
-   | <a href="."$name"."-months.html>Previous Months</a> ]</font><br><br>";
+   print DHTML "<font size=3> [ <a href=\""."$name"."-days.html\">This Month</a>
+   | <a href=\""."$name"."-months.html\">Previous Months</a> ]</font><br><br>";
    } else {
      if ($dexist && !$mexist) {
-     print DHTML "<font size=3> [ <a href="."$name"."-days.html>This
+     print DHTML "<font size=3> [ <a href=\""."$name"."-days.html\">This
      Month</a> | Previous Months ]</font><br><br>";
      } else { 
         if (!$dexist && $mexist) {
         print DHTML "<font size=3> [ This Month 
-        | <a href="."$name"."-months.html>Previous Months</a> ]</font><br><br>";
+        | <a href=\""."$name"."-months.html\">Previous Months</a> ]</font><br><br>";
         }
      }
    }
@@ -473,21 +475,21 @@
    $gbin = sprintf("%.1f", $mbin / $gbsize);
    $gbout = sprintf("%.1f", $mbout / $gbsize);
 
-   $gstring = "<td><font size=2><font color=#00CC00>In:</font> $gbin GB 
-   ($mbin MB)<br><font color=#0000FF>Out:</font> $gbout GB ($mbout MB)
+   $gstring = "<td><font size=2><font color=\"#00CC00\">In:</font> $gbin GB 
+   ($mbin MB)<br><font color=\"#0000FF\">Out:</font> $gbout GB ($mbout MB)
    </font></td></tr>";
    } 
    else {
-   $gstring = "<td><font size=2><font color=#00CC00>In:</font> $mbin MB (".
-   sprintf("%.f", $inoct / $kbsize)." KB)<br><font color=#0000FF>Out:</font> $mbout 
-   MB (".sprintf("%.f", $outoct / $kbsize)." KB)";
+   $gstring = "<td><font size=2><font color=\"#00CC00\">In:</font> $mbin MB (".
+   sprintf("%.f", $inoct / $kbsize)." KB)<br><font color=\"#0000FF\">Out:</font> $mbout 
+   MB (".sprintf("%.f", $outoct / $kbsize)." KB)</font></td></tr>";
    }
 
  $inwidth = (sprintf("%.f", $inwidth) + 1);
  $outwidth = (sprintf("%.f", $outwidth) + 1);
 
- print DHTML "<tr><td><b>"."$count".":00</b></td><td width=455><img src=in.gif height=12 width=$inwidth><br>\n";
- print DHTML "<img src=out.gif height=12 width=$outwidth><br></td>\n";
+ print DHTML "<tr><td><b>"."$count".":00</b></td><td width=455><img src=\"in.gif\" height=12 width=$inwidth alt=\"in\"><br>\n";
+ print DHTML "<img src=\"out.gif\" height=12 width=$outwidth alt=\"out\"><br></td>\n";
 
  print DHTML $gstring;
 
@@ -497,17 +499,17 @@
 $intotal = sprintf("%.f", ($intotal / $mbsize));
 $outtotal = sprintf("%.f", ($outtotal / $mbsize));
 
-print DHTML "</table><br></td></tr><tr><td align=right>";
+print DHTML "</table><br></td></tr><tr><td align=\"right\">";
 
   if ($intotal > $gbsize or $outtotal > $gbsize) {
   my $gbtotal = sprintf("%.1f", ($intotal + $outtotal) / $gbsize);
-  print DHTML "Today's Total: <b>$gbtotal GB</b><br><font color=#00CC00>
-In:</font> $intotal MB - <font color=#0000FF>Out:</font>
+  print DHTML "Today's Total: <b>$gbtotal GB</b><br><font color=\"#00CC00\">
+In:</font> $intotal MB - <font color=\"#0000FF\">Out:</font>
  $outtotal MB<br>";
   }
   else {
    print DHTML "Today's Total: <b>".($intotal + $outtotal)." MB</b><br>
-<font color=#00CC00>In:</font> $intotal MB - <font color=#0000FF>Out:</font> 
+<font color=\"#00CC00\">In:</font> $intotal MB - <font color=\"#0000FF\">Out:</font> 
  $outtotal MB<br>";
   }
 
@@ -543,16 +545,18 @@
 flock(DHTML, 2)	or print "can't flock $name $host : $!";
 truncate(DHTML, 0);
 
-print DHTML "<html><title>IOG $iogver - $host</title><body bgcolor=#FFFFFF>
+print DHTML qq(<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+    "http://www.w3.org/TR/html4/loose.dtd">\n\n);
+print DHTML "<html><title>IOG $iogver - $host</title><body bgcolor=\"#FFFFFF\">
 <table border=0><tr><td>";
 
 my $dexist = (-f "$path".$main::SL."$name"."-days.html");
 
 if ($dexist) {
-print DHTML "<font size=3>[ <a href="."$name".".html>Today</a> |
-<a href="."$name"."-days.html>This Month</a> | Previous Months ]</font><br><br>";
+print DHTML "<font size=3>[ <a href=\""."$name".".html\">Today</a> |
+<a href=\""."$name"."-days.html\">This Month</a> | Previous Months ]</font><br><br>";
 } else {
-print DHTML "<font size=3>[ <a href="."$name".".html>Today</a> | 
+print DHTML "<font size=3>[ <a href=\""."$name".".html\">Today</a> | 
 This Month | Previous Months ]</font><br><br>";
 }
 
@@ -583,20 +587,20 @@
    $gbout = sprintf("%.1f", $mbout / $gbsize);
    $gbtotal = sprintf("%.1f", ($gbin + $gbout));
 
-   $gstring = "<td><font size=2><font color=#00CC00>In:</font> $gbin GB
-   ($mbin MB)<br><font color=#0000FF>Out:</font> $gbout GB ($mbout MB)
+   $gstring = "<td><font size=2><font color=\"#00CC00\">In:</font> $gbin GB
+   ($mbin MB)<br><font color=\"#0000FF\">Out:</font> $gbout GB ($mbout MB)
    </font></td></tr>";
 
  $inwidth = (sprintf("%.f", $inwidth) + 1);
  $outwidth = (sprintf("%.f", $outwidth) + 1);
 
  if (-f "$path".$main::SL."$name"."-month".($count + "1").".html") { 
- $mlink = "<a href=$name"."-month".($count + "1").".html>$months[$count]</a>";
+ $mlink = "<a href=\"$name"."-month".($count + "1").".html\">$months[$count]</a>";
  } else { $mlink = "$months[$count]"; }
 
  print DHTML "<tr><td><b>$mlink<br>$gbtotal GB</b></td><td width=455>
-<img src=in.gif height=12 width=$inwidth><br>\n";
- print DHTML "<img src=out.gif height=12 width=$outwidth><br></td>\n";
+<img src=\"in.gif\" height=12 width=$inwidth><br>\n";
+ print DHTML "<img src=\"out.gif\" height=12 width=$outwidth><br></td>\n";
 
  print DHTML $gstring;
 
@@ -652,14 +656,16 @@
 flock(DHTML, 2) or print "can't flock $name $host : $!";
 truncate(DHTML, 0);
 
-print DHTML "<html><title>IOG $iogver - $host</title><body bgcolor=#FFFFFF>
+print DHTML qq(<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+    "http://www.w3.org/TR/html4/loose.dtd">\n\n);
+print DHTML "<html><title>IOG $iogver - $host</title><body bgcolor=\"#FFFFFF\">
 <table border=0><tr><td>";
 
   if (-f "$path".$main::SL."$name"."-months.html") {     
-  print DHTML "<font size=3>[ <a href="."$name".".html>Today</a> |
-  This Month | <a href="."$name"."-months.html>Previous Months</a> ]</font><br><br>";
+  print DHTML "<font size=3>[ <a href=\""."$name".".html\">Today</a> |
+  This Month | <a href=\""."$name"."-months.html\">Previous Months</a> ]</font><br><br>";
   } else {
-  print DHTML "<font size=3>[ <a href="."$name".".html>Today</a> | This Month
+  print DHTML "<font size=3>[ <a href=\""."$name".".html\">Today</a> | This Month
   | Previous Months ]</font><br><br>";
   }
 
@@ -690,14 +696,14 @@
    $gbin = sprintf("%.1f", $mbin / $gbsize);
    $gbout = sprintf("%.1f", $mbout / $gbsize);
 
-   $gstring = "<td><font size=2><font color=#00CC00>In:</font> $gbin GB
-   ($mbin MB)<br><font color=#0000FF>Out:</font> $gbout GB ($mbout MB)
+   $gstring = "<td><font size=2><font color=\"#00CC00\">In:</font> $gbin GB
+   ($mbin MB)<br><font color=\"#0000FF\">Out:</font> $gbout GB ($mbout MB)
    </font></td></tr>";
    }
    else {
-   $gstring = "<td><font size=2><font color=#00CC00>In:</font> $mbin MB (".
-   sprintf("%.f", $inoct / $kbsize)." KB)<br><font color=#0000FF>Out:</font> $mbout
-   MB (".sprintf("%.f", $outoct / $kbsize)." KB)";
+   $gstring = "<td><font size=2><font color=\"#00CC00\">In:</font> $mbin MB (".
+   sprintf("%.f", $inoct / $kbsize)." KB)<br><font color=\"#0000FF\">Out:</font> $mbout
+   MB (".sprintf("%.f", $outoct / $kbsize)." KB)</font></td></tr>";
    }
 
  $inwidth = (sprintf("%.f", $inwidth) + 1);
@@ -707,12 +713,12 @@
 
    if (-f "$path".$main::SL."$name"."-day".$count.".html" && $lastday eq "0"
 	&& ($newmon ne "1")) { 
-     $pday = "<a href=$name"."-day".$count.".html>$pday</a>";
+     $pday = "<a href=\"$name"."-day".$count.".html\">$pday</a>";
    }
 
  print DHTML "<tr><td><b>$pday</b></td><td width=455>
- <img src=in.gif height=12 width=$inwidth><br>\n";
- print DHTML "<img src=out.gif height=12 width=$outwidth><br></td>\n";
+ <img src=\"in.gif\" height=12 width=$inwidth><br>\n";
+ print DHTML "<img src=\"out.gif\" height=12 width=$outwidth><br></td>\n";
  print DHTML $gstring;
 
  $count++;
@@ -723,9 +729,9 @@
 
 my $gbtotal = sprintf("%.1f", (($intotal + $outtotal) / $gbsize));
 
-print DHTML "</table><br></td></tr><tr><td align=right>";
-print DHTML "Monthly Total: <b>$gbtotal GB</b><br><font color=#00CC00>
-In:</font> $intotal MB - <font color=#0000FF>Out:</font> $outtotal MB<br>";
+print DHTML "</table><br></td></tr><tr><td align=\"right\">";
+print DHTML "Monthly Total: <b>$gbtotal GB</b><br><font color=\"#00CC00\">
+In:</font> $intotal MB - <font color=\"#0000FF\">Out:</font> $outtotal MB<br>";
 
 footer();
 
