foreach $server (@servers) { chomp $server; open TMP, ">/tmp/$server.tmp"; $ENV{"FILENAME"} = "/tmp/$server\.tmp"; # SUPER INEFFIECIENT, looping through all of the data for each server. Need to rethink this foreach (@DATA) { ($hostid, $time, $get, $post, $currconn) = split(/\t/); next if ($hostid ne $SERVER{$server}); $time = ((int($time/300))*300)+10800; # Add 3 hours for EST time ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($time); $year+=1900; $year = substr($year,2); $mon++; $mon = "0".$mon if ($month < 10); $mday = "0".$mday if ($mday < 10); $hour = "0".$hour if ($hour < 10); $min = "0".$min if ($min < 10); $time = "$mon/$mday/$year\.$hour:$min"; $total = $get+$post; print TMP "$time\t$server\t$get\t$post\t$total\t$currconn\n"; $total_get{"$time"} += $get; $total_post{"$time"} += $post; $total_conn{"$time"} += $currconn; } close TMP; if (!$ARGV[3]) { `$dir/plbin210/bin/pl $dir/WebHits.pol -o $output_dir/graphs/$server\_webhits.gif -gif title="$server Gets, Posts and Opens"`; `$dir/plbin210/bin/pl $dir/WebHits.pol -o $output_dir/graphs/$server\_Twebhits.gif -gif -scale 0.50 title="$server $hour:$min"`; }