从命令行恢复/暂停 enery star linux
我有一个到 Linux 机器的 ssh 连接,该机器在一段非活动时间后会休眠。
我想让它恢复,我该怎么做? (写入 /dev/mouse 来模拟鼠标移动并没有成功)
I have an ssh connection to a linux machine which is hibernated after some non-activity time.
I want to make it resume, how do I do that?
(writing to /dev/mouse to simulate mouse movement didn't do the trick)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果以太网适配器具有 LAN 唤醒 (WOL) 功能并且主板支持该功能,则休眠的计算机无法在不按电源按钮或发送魔术数据包的情况下退出睡眠状态。 WOL 数据包只能在本地网络上生成,不能从其他网络远程生成。
-亚当
A machine that is hibernating cannot come out of sleep without pressing the power button, or sending a magic packet if the ethernet adaptor has Wake On Lan (WOL) capability and the motherboard supports that. WOL packets can only be generated on the local network, not remotely from other networks.
-Adam
除了 Adam 所说的之外,一些主板还支持在触发中断时从各种状态唤醒。
这里的关键是你所说的休眠状态; 您是在谈论硬件中的极低功耗模式,还是将核心内存写入磁盘并完全关闭机器的软件休眠模式? 如果是后者,WOL是唯一的可能; 如果是前者,您可以告诉主板监视来自各种来源的中断,并且可以使用其他方法来触发唤醒。
阅读 维基百科上的 Wake-On-LAN 文章是一个很好的起点。
In addition to what Adam has stated, some motherboards support waking from various states when an interrupt is triggered.
The key here is which state you are referring to as hibernation; are you talking about an extremely low-power mode in hardware, or software hibernation where core memory is written to disk and the machine is turned off completely? If the latter, WOL is the only possibility; if the former, than you can tell your motherboard to watch for interrupts from various sources and you can use some other means to trigger a wake-up.
A good starting point for reading is the Wake-On-LAN article on Wikipedia.
要实现 WOL,您需要做一些事情:
首先,检查您要唤醒的计算机的 BIOS,看看它是否支持 WOL。 如果是这样,请确保它已打开。
然后获取一个可以发送 WOL 数据包的程序:
如果您想从本地网络外部接收 WOL 数据包。 将路由器配置为将端口 9 转发到 255.255.255.255(IP 广播至所有人地址)。
有关 WOL 协议的一些真正有用的信息以及可以在wireshark中加载的示例捕获文件,请参阅本文< /a>.
To accomplish WOL you need a few things:
First, check the BIOS of the machine you're waking to see if it supports WOL. If it does, make sure it's turned on.
Then get a program that can send WOL packets:
If you want to receive WOL packets from outside of your local network. Configure your router to forward port 9 to 255.255.255.255 (IP Broadcast-To-All address).
For some really useful info on the WOL protocol as well as a sample capture file that can be loaded in wireshark, see this article.