<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7650.28">
<TITLE>No such file or directory - t2_report++</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hello,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I am having trouble with t2_reporting++ and the html_dir. I try to run t2_report++ as seen below but I'm unable to get it to see or create the www directory. This started after I made the recommended changes to Traffic_plot.pm.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">sfo-radius01-test# /usr/local/Coral/bin/spoolcat '/usr/local/Coral/data/*.t2' | /usr/local/Coral/bin/t2_report++ -f /usr/local/Coral/etc/t2_report.conf</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Unable to create destination directory</FONT>
<BR><FONT SIZE=2 FACE="Arial">No such file or directory at /usr/local/Coral/bin/t2_report++ line 2141.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">sfo-radius01-test# /usr/local/Coral/bin/spoolcat '/usr/local/Coral/data/*.t2' | /usr/local/Coral/bin/t2_report++</FONT>
<BR><FONT SIZE=2 FACE="Arial">Unable to create destination directory</FONT>
<BR><FONT SIZE=2 FACE="Arial">No such file or directory at /usr/local/Coral/bin/t2_report++ line 2141.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">sfo-radius01-test# /usr/local/Coral/bin/spoolcat '/usr/local/Coral/data/*.t2' | /usr/local/Coral/bin/t2_report++ -c "html_dir='/usr/local/Coral/www'"</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Unable to create destination directory '/usr/local/Coral/www'</FONT>
<BR><FONT SIZE=2 FACE="Arial">No such file or directory at /usr/local/Coral/bin/t2_report++ line 2141.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I set up some test programs to confirm that perl is working correctly and it creates or sees the directory as expected. </FONT></P>
<P><FONT SIZE=2 FACE="Arial">#! /usr/bin/perl5</FONT>
<BR><FONT SIZE=2 FACE="Arial">##</FONT>
<BR><FONT SIZE=2 FACE="Arial">##</FONT>
<BR><FONT SIZE=2 FACE="Arial"> my $html_dir = "/usr/local/Coral/www";</FONT>
<BR><FONT SIZE=2 FACE="Arial"> # Unless directory exists we better make it.</FONT>
<BR><FONT SIZE=2 FACE="Arial"> unless ((-w $html_dir) and (-d $html_dir)) {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> unless ($html_dir and mkdir("$html_dir", 0755)) {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> die "Unable to create destination directory $html_dir\n$!";</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">And (run like "ptest /home/danb/www")</FONT>
<BR><FONT SIZE=2 FACE="Arial">#! /usr/bin/perl5</FONT>
<BR><FONT SIZE=2 FACE="Arial">##</FONT>
<BR><FONT SIZE=2 FACE="Arial">##</FONT>
<BR><FONT SIZE=2 FACE="Arial"> my $html_dir = shift;</FONT>
<BR><FONT SIZE=2 FACE="Arial"> # Unless directory exists we better make it.</FONT>
<BR><FONT SIZE=2 FACE="Arial"> unless ((-w $html_dir) and (-d $html_dir)) {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> unless ($html_dir and mkdir("$html_dir", 0755)) {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> die "Unable to create destination directory $html_dir\n$!";</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Any help would be appreciated.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Thanks.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Dan Ballinger</FONT>
<BR><FONT SIZE=2 FACE="Arial">Sr Network Engineer</FONT>
<BR><FONT SIZE=2 FACE="Arial">275 Sacramento St.</FONT>
<BR><FONT SIZE=2 FACE="Arial">San Francisco, CA 94111</FONT>
<BR><FONT SIZE=2 FACE="Arial">(415) 962-5120</FONT>
</P>
</BODY>
</HTML>