闲置实例资源保活
Keepoccupied
出自于Hostloc论坛sesr大佬,原贴地址:《甲骨文保持占用》 。在此博主将其ARM
命令与AMD
命令整合到一个脚本中,由脚本自行判断,对CPU、内存(仅ARM
)、网络三项进行锻炼。
运行命令
复制
wget https://github.com/honorcnboy/oracle_keep_alive/raw/main/Sesr/keepoccupied.sh && bash keepoccupied.sh
复制
# 停止:
systemctl stop KeepCPUMemory.service KeepNetwork.service
或
reboot #直接重启也能停掉
# 完全卸载命令:
sudo systemctl stop KeepCPUMemory.service KeepNetwork.service && \
sudo systemctl disable KeepCPUMemory.service KeepNetwork.service && \
sudo rm /etc/systemd/system/KeepCPUMemory.service /etc/systemd/system/KeepNetwork.service && \
sudo rm /etc/systemd/system/multi-user.target.wants/KeepCPUMemory.service /etc/systemd/system/multi-user.target.wants/KeepNetwork.service && \
sudo rm keepoccupied.sh