use Net::Telnet (); $username = "ackme"; $password = "XXXXXXXXX"; $t = new Net::Telnet (Timeout => 60); $t->open("some.otherbox.com"); $t->login($username, $password); @d = $t->cmd("date +%m%d%y"); chop(@d); @lines = $t->cmd("tail -1 /home/ackme/eod.log.$d[0]"); $->logout; open (LOG, ">>I:/perl/testlog") || "cannot create testlog! $!"; print LOG "the date: $d[0]\n"; chop @lines[0]; $correct = "eod complete exit status = 0"; if (${lines}[0] ne $correct) { print LOG "WARNING LOG NOT CORRECT!!"; } else { print LOG "the last line of the EOD log is: \"$lines[0]\"\n"; } close (LOG) || "can't close testlog: $!"
In reply to remote logchecker by ackme
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |