S
sc0ri0n
Hi,
I want to be able to tail -f log files on a different machine and display
the results in a web page. Below code from the cgi works:
$cmd = "rsh -l $acc $Host tail -f $LogFileName |";
$count=0;
open LOG, $cmd or die "Could not open file: $!";
while (<LOG>){
$_ =~ s/\&/&/g;
$_ =~ s/\</</g;
$_ =~ s/\>/>/g;
print "$_";
last if (count++ >100);
}
exit;
However; problem is that I can not end the session! If for example a user
clicks stop; or closes the window, on the target machine, I still see
'tail -f $LogFileName' under $acc user...
It looks like the above cgi does not stop neither the rsh connection.
Did anyone do something like this? How is it possible to close the
connection?
Adil
I want to be able to tail -f log files on a different machine and display
the results in a web page. Below code from the cgi works:
$cmd = "rsh -l $acc $Host tail -f $LogFileName |";
$count=0;
open LOG, $cmd or die "Could not open file: $!";
while (<LOG>){
$_ =~ s/\&/&/g;
$_ =~ s/\</</g;
$_ =~ s/\>/>/g;
print "$_";
last if (count++ >100);
}
exit;
However; problem is that I can not end the session! If for example a user
clicks stop; or closes the window, on the target machine, I still see
'tail -f $LogFileName' under $acc user...
It looks like the above cgi does not stop neither the rsh connection.
Did anyone do something like this? How is it possible to close the
connection?
Adil