我使用远程桌面在办公室的笔记本电脑上工作。 偶尔我不能再接触到主机。 当我物理login到主机时,它似乎已经从networking断开,重新启动主机解决了这个问题。 我需要一个运行在远程主机上的脚本/程序,并在它失去networking连接时重新启动。
像这样的东西…不要求任何人写,只要指向正确的方向,如果已经有应用程序或脚本这样做。
if flag file exists exit (we already restarted once) loop loop ping 'some other host' if fail sleep and then try again if fail > N times write flag file reboot fi fi end loop sleep for a while end loop
当然…你可以尝试解决问题的根源:
Allow the computer to turn off this device to save power 看看是否有效。