1
我寫了一個監控腳本來查看一些日誌進步,但是我堅持了下面的代碼,代碼繼續錯誤使用的Net :: OpenSSH的
$fh = $ssh->capture("find $servers{$agent}{$log} -mmin +10") or die "Unable to run command\n";
chomp($fh);
if ($fh) {
print "Log are 10 minutes not moving. \n";
}
else {
print "Log are running as usual. \n";
}
此代碼將拿出低於輸出,
無法運行命令
這表明有錯誤發生,但是我嘗試手動通過ssh運行命令完美的作品。
需要幫助來檢查此代碼。
啥子呢'$ SSH-> error'說? – Botje