linux会话空闲无法关机,解决linux的”turn off swap”无法关机问题
生活随笔
收集整理的這篇文章主要介紹了
linux会话空闲无法关机,解决linux的”turn off swap”无法关机问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
因為oracle使用很大的swap空間,這樣在系統(tǒng)關(guān)機(jī)的時候,導(dǎo)致停留在”turn off swap”而無法關(guān)機(jī)。
解決辦法:先關(guān)閉oracle數(shù)據(jù)庫,然后執(zhí)行poweroff或reboot
最好的方法就是寫一個sh腳本放到root目錄。
#/home/root/poweroff.sh
#!/bin/sh
# —————————————————————————–
# Stop oracle and then poweroff
# —————————————————————————–
su – oracle “-c dbshut”
poweroff
#/home/root/reboot.sh
#!/bin/sh
# —————————————————————————–
# Stop oracle and then reboot
# —————————————————————————–
su – oracle “-c dbshut”
reboot
改為可執(zhí)行:
chmod +x poweroff.sh reboot.sh
那么以后關(guān)機(jī)可以使用:
./poweroff.sh
總結(jié)
以上是生活随笔為你收集整理的linux会话空闲无法关机,解决linux的”turn off swap”无法关机问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 搭建可视化管理DNS服务器
- 下一篇: 佛山植物组织培养实验室必备设备