
"Terminal read. The handle is invalid." - Log file viewer
Hi,
My script to view unix log files works well, however I get the strange
error "Terminal readThe handle is invalid" at the first line of every
output it produces, even though the output is 100% correct otherwise
(no visible errors)..
Any ideas why /what??
Script:
#! /usr/bin/perl
use CGI qw(param);
$host= param("host");
$log= param("log");
$lines= param("lines");
$refresh= param("refresh");
$output= `rsh $host -l dmadmin tail -$lines $log`;
print "Content-type: text/html\n\n";
print "<meta http-equiv='Refresh' content='$refresh'>";
print "<html><body bgcolor='#FFFFFF' text='#000000'>";
print "<font face='Verdana, Arial, Helvetica, sans-serif' size='1'
color='#999999'>";
print "<h1>[start]<BR>";
print "</h1>\n";
print "$host <BR> $log <BR> Refresh every $refresh second(s)";
print "<BR><BR>";
print "<font face='Verdana, Arial, Helvetica, sans-serif' size='3'
color='#000000'>";
print "<pre>$output</pre>\n";
print "<font face='Verdana, Arial, Helvetica, sans-serif' size='1'
color='#999999'>";
print "<html><body><h1>[end]";
print "</h1></body></html>\n";