oraclecloud甲骨文VPS保活脚本

甲骨文VPS为什么需要保活


最近甲骨文出了一个政策,对于闲置资源会强制回收
为了保证VPS在线,必须满足以下要求
Idle Always Free计算实例可能会被 Oracle 回收。如果在 7 天内满足以下条件,则 Oracle 会将虚拟机和裸机计算实例视为空闲:

第 95 个百分位的 CPU 利用率低于 10%
网络利用率低于10%
内存利用率低于 10% (仅适用于A1 形状)

AMD鸡需要CPU和网络利用率大于10%
ARM鸡需要CPU,网络,内存利用率大于10%

甲骨文保活脚本一键安装


一键保活
#适用于x86_64架构
cd /root && wget https://raw.githubusercontent.com/velor2012/lookbusy-docker/main/lookbusy -O lookbusy && chmod +x lookbusy &&  echo "0 */3 * * * root timeout 600 /root/lookbusy -c 10-20 -r curve" >> /etc/crontab && systemctl restart cron

#适用于ARM64架构
cd /root && wget https://raw.githubusercontent.com/velor2012/lookbusy-docker/main/lookbusy-arm -O lookbusy && chmod +x lookbusy &&  echo "0 */3 * * * root timeout 600 /root/lookbusy -c 10-20 -r curve" >> /etc/crontab && systemctl restart cron

甲骨文保活脚本一键卸载删除

sed -i "/lookbusy/d" /etc/crontab && rm -f /root/lookbusy && systemctl restart cron

本文修改了参考文章的部分代码,让脚本可以在debian下运行,其他版本墙查看参考文章。

参考:
https://hostloc.com/thread-1132743-1-1.html
https://github.com/velor2012/lookbusy-docker
https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier_topic-Always_Free_Resources.htm

此处评论已关闭