|
|
|
|
|
by guroot
3568 days ago
|
|
You really shouldn't need to be hard rebooting just because you ran out of ram...
did you try a sysrq f (invokes the out of memory killer) first?
If that doesn't work you should at least be able to force a sync and remount read-only before taking it down.
If you have access to a keyboard and the kernel is still responding to sysrq you should never just hard power off without at least trying to regain control of the system. Some reading if you're not familiar with sysrq:
https://en.wikipedia.org/wiki/Magic_SysRq_key
Depending on your distro you might have to enable it, I believe ubuntu (for some dumb reason) ships with emergency sync as the only command available. Enabling it should amount to adding: kernel.sysrq=1 to /etc/sysctl.conf on older machines or editing
/etc/sysctl.d/10-magic-sysrq.conf on newer ones. also if you are running out of ram that often you might want to consider a swap partition. Or if you have one already try setting a more aggressive swapiness value. |
|