{"id":13457048,"url":"https://github.com/spiritLHLS/Oracle-server-keep-alive-script","last_synced_at":"2025-03-24T12:30:37.007Z","repository":{"id":65649460,"uuid":"596101676","full_name":"spiritLHLS/Oracle-server-keep-alive-script","owner":"spiritLHLS","description":"服务器资源占用脚本(甲骨文服务器保活脚本)(Oracle Server Keep Alive Script)","archived":false,"fork":false,"pushed_at":"2025-03-06T04:47:24.000Z","size":217,"stargazers_count":1810,"open_issues_count":0,"forks_count":433,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-22T05:51:27.269Z","etag":null,"topics":["alive","bash","centos","debian","dynamic","oracle","oracle-cloud","redhat","server","speedtest-cli","speedtest-go","ubuntu"],"latest_commit_sha":null,"homepage":"https://ko-fi.com/spiritlhl","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spiritLHLS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-01T13:23:16.000Z","updated_at":"2025-03-21T13:32:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"645ee32c-85d8-4ed9-9de8-17d8fa5e99c9","html_url":"https://github.com/spiritLHLS/Oracle-server-keep-alive-script","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2FOracle-server-keep-alive-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2FOracle-server-keep-alive-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2FOracle-server-keep-alive-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spiritLHLS%2FOracle-server-keep-alive-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spiritLHLS","download_url":"https://codeload.github.com/spiritLHLS/Oracle-server-keep-alive-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245269680,"owners_count":20587825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alive","bash","centos","debian","dynamic","oracle","oracle-cloud","redhat","server","speedtest-cli","speedtest-go","ubuntu"],"created_at":"2024-07-31T08:01:32.417Z","updated_at":"2025-03-24T12:30:36.990Z","avatar_url":"https://github.com/spiritLHLS.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Oracle-server-keep-alive-script\n\n[![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FspiritLHLS%2FOracle-server-keep-alive-script\u0026count_bg=%2379C83D\u0026title_bg=%23555555\u0026icon=\u0026icon_color=%23E7E7E7\u0026title=hits\u0026edge_flat=false)](https://hits.seeyoufarm.com)\n\n## 甲骨文服务器保活脚本\n\n适配系统：已在Ubuntu 20+，Debian 10+, Centos 7+, Oracle linux 8+，AlmaLinux 8.5+\n\n上述系统验证无问题，别的主流系统应该也没有问题\n\n可选占用：CPU，内存，带宽\n\n安装完毕后如果有问题请卸载脚本反馈问题(重复卸载也没问题)\n\n所有资源(除了CPU)可选默认配置则动态占用，实时调整，避免服务器有别的任何资源已经超过限额了仍然再占用资源\n\n为避免GitHub的CDN抽风加载不了新内容，所有新更新已使用[Gitlab仓库](https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script)\n\n由于speedtest-go的release依赖于GitHub，所以请检查 [www.githubstatus.com](https://www.githubstatus.com/) ,有问题时无法安装带宽占用\n\n请留意脚本当前更新日期：2023.09.24.08.37\n\n**由于友人实测，资源占用感觉也是玄学，一个号四个服务器全部停机，但号还在，也有人一直不占用，但就是没停机的问题，所以该项目将长期保持现有状态，非必要不再更新**\n\n**也有说要在上面解析一个网址做一个网站挂着的，感觉也是玄学，自己测试吧**\n\n### 说明\n\n选项1安装，选项2卸载，选项3更新安装引导脚本，选项4退出脚本\n\n安装过程中无脑回车则全部可选的占用都占用，不需要什么占用输入```n```再回车\n\n如果选择带宽占用，会询问使用speedtest-go占用还是使用wget占用，按照提示进行选择即可\n\n有询问是否需要带宽占用的参数自定义，这时候默认选项就是```n```，回车就使用默认配置，输入```y```再回车则需要按照提示自定义参数\n\n```\ncurl -L https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh -o oalive.sh \u0026\u0026 chmod +x oalive.sh \u0026\u0026 bash oalive.sh\n```\n\n或\n\n```\nbash oalive.sh\n```\n\n或\n\n```\nbash \u003c(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh)\n```\n\n### 特点\n\n- 提供两种CPU占用模式：DD模拟占用和科学计算模式，用户可以自由选择，占用范围设置在15%至25%之间，更推荐DD模拟占用。\n- DD模拟占用在守护进程中设置了CPU占用的最高限制。\n- 默认情况下，CPU占用设置为25%最高值，计算方法是核数乘以20%，如果计算结果低于25%，则设置为25%；如果计算结果高于25%，则按照计算结果的比例进行设置。\n- 内存占用设置为占用总内存的25%，占用时间为300秒，休息时间为300秒。\n- 每300秒检测一次内存占用情况，并根据需要动态调整占用大小。如果内存占用已经大于25%，则不增加占用。\n- 在占用过程中，使用守护进程和开机自启服务，以确保占用任务持续且有效。\n- 默认选项的带宽占用每45分钟下载一次大小在1G至10G之间的文件，只进行下载而不保存。在下载过程中会占用硬盘空间，但在下载完成后会自动释放。\n- 默认选项的带宽占用动态调整实际下载的带宽/速率，限制每次下载的最长时长为6分钟。在每次下载之前，会测试最大可用带宽，并根据实时结果将下载速率设置为30%的带宽。\n- 带宽占用测试使用了speedtest-cli和speedtest-go两种工具，以防其中之一不可用时使用第二种工具，用户可以自定义设置带宽占用，此时详见设置提示。\n- 提供一键卸载所有占用服务的选项，卸载将删除所有脚本、服务、任务、守护进程和开机自启设置。\n- 提供一键检查更新的功能，更新范围仅限于脚本更新。**请在更新后重新设置占用服务**\n- 对所有进程执行增加唯一性检测，避免重复运行，使用PID文件进行判断。\n\n如若不希望一键的，希望自定义设置时间的，请查看[README_CRON.md](https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/blob/main/%20README_CRON.md)自行设置定时任务\n\n### 友链\n\nVPS融合怪测评项目\n\nGo版本：https://github.com/oneclickvirt/ecs\n\nShell版本：https://github.com/spiritLHLS/ecs\n\n一键虚拟化项目\n\n国内 https://virt.spiritlhl.net/\n\n国际 https://www.spiritlhl.net/\n\n### 广告\n\n\n\n## Stargazers over time\n\n[![Stargazers over time](https://starchart.cc/spiritLHLS/Oracle-server-keep-alive-script.svg)](https://starchart.cc/spiritLHLS/Oracle-server-keep-alive-script)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FspiritLHLS%2FOracle-server-keep-alive-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FspiritLHLS%2FOracle-server-keep-alive-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FspiritLHLS%2FOracle-server-keep-alive-script/lists"}