mirror of
https://github.com/oneclickvirt/oneclickvirt.github.io.git
synced 2026-06-01 00:00:53 +08:00
2 lines
6.5 KiB
JavaScript
2 lines
6.5 KiB
JavaScript
import{_ as a,c as t,o as s,ag as i}from"./chunks/framework.CSeR4K32.js";const u=JSON.parse('{"title":"仓库","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"case/case5.md","filePath":"case/case5.md","lastUpdated":1749312947000}'),r={name:"case/case5.md"};function l(p,e,c,o,n,h){return s(),t("div",null,e[0]||(e[0]=[i('<h1 id="仓库" tabindex="-1">仓库 <a class="header-anchor" href="#仓库" aria-label="Permalink to "仓库""></a></h1><p><a href="https://github.com/spiritLHLS/Oracle-server-keep-alive-script" target="_blank" rel="noreferrer">https://github.com/spiritLHLS/Oracle-server-keep-alive-script</a></p><p><a href="https://hits.spiritlhl.net" target="_blank" rel="noreferrer"><img src="https://hits.spiritlhl.net/Oracle-server-keep-alive-script.svg?action=hit&title=Hits&title_bg=%23555555&count_bg=%230eecf8&edge_flat=false" alt="Hits"></a></p><h1 id="oracle-server-keep-alive-script" tabindex="-1">Oracle-server-keep-alive-script <a class="header-anchor" href="#oracle-server-keep-alive-script" aria-label="Permalink to "Oracle-server-keep-alive-script""></a></h1><p>实际不止可以在甲骨文服务器上使用,也可以使用在任意ARM或X86_64架构的系统,用作资源占用</p><h2 id="甲骨文服务器保活脚本" tabindex="-1">甲骨文服务器保活脚本 <a class="header-anchor" href="#甲骨文服务器保活脚本" aria-label="Permalink to "甲骨文服务器保活脚本""></a></h2><p>适配系统:已在Ubuntu 20+,Debian 10+, Centos 7+, Oracle linux 8+,AlmaLinux 8.5+</p><p>上述系统验证无问题,别的主流系统应该也没有问题</p><p>可选占用:CPU,内存,带宽</p><p>安装完毕后如果有问题请卸载脚本反馈问题(重复卸载也没问题)</p><p>所有资源(除了CPU)可选默认配置则动态占用,实时调整,避免服务器有别的任何资源已经超过限额了仍然再占用资源</p><p>为避免GitHub的CDN抽风加载不了新内容,所有新更新已使用<a href="https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script" target="_blank" rel="noreferrer">Gitlab仓库</a></p><p>由于speedtest-go的release依赖于GitHub,所以请检查 <a href="https://www.githubstatus.com/" target="_blank" rel="noreferrer">www.githubstatus.com</a> ,有问题时无法安装带宽占用</p><h3 id="基础开发完毕-测试中-有问题请在issues中反馈" tabindex="-1">基础开发完毕,测试中,有问题请在issues中反馈 <a class="header-anchor" href="#基础开发完毕-测试中-有问题请在issues中反馈" aria-label="Permalink to "基础开发完毕,测试中,有问题请在issues中反馈""></a></h3><p>选项1安装,选项2卸载,选项3更新安装引导脚本,选项4退出脚本</p><p>安装过程中无脑回车则全部可选的占用都占用,不需要什么占用输入<code>n</code>再回车</p><p>如果选择带宽占用,会询问使用speedtest-go占用还是使用wget占用,按照提示进行选择即可</p><p>有询问是否需要带宽占用的参数自定义,这时候默认选项就是<code>n</code>,回车就使用默认配置,输入<code>y</code>再回车则需要按照提示自定义参数</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>curl -L https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh -o oalive.sh && chmod +x oalive.sh && bash oalive.sh</span></span></code></pre></div><p>或</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bash oalive.sh</span></span></code></pre></div><p>或</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/raw/main/oalive.sh)</span></span></code></pre></div><h3 id="说明" tabindex="-1">说明 <a class="header-anchor" href="#说明" aria-label="Permalink to "说明""></a></h3><ul><li>提供两种CPU占用模式:DD模拟占用和科学计算模式,用户可以自由选择,占用范围设置在15%至25%之间,更推荐DD模拟占用</li><li>DD模拟占用在守护进程中设置了CPU占用的最高限制</li><li>默认情况下,CPU占用设置为25%最高值,计算方法是核数乘以12%,如果计算结果低于25%,则设置为该值;如果计算结果高于25%,则按照计算结果的比例进行设置。</li><li>内存占用设置为占用总内存的20%,占用时间为300秒,休息时间为300秒。</li><li>每300秒检测一次内存占用情况,并根据需要动态调整占用大小。如果内存占用已经大于20%,则不增加占用。</li><li>在占用过程中,使用守护进程和开机自启服务,以确保占用任务持续且有效。</li><li>默认选项的带宽占用每45分钟下载一次大小在1G至10G之间的文件,只进行下载而不保存。在下载过程中会占用硬盘空间,但在下载完成后会自动释放。</li><li>默认选项的带宽占用动态调整实际下载的带宽/速率,限制每次下载的最长时长为6分钟。在每次下载之前,会测试最大可用带宽,并根据实时结果将下载速率设置为30%的带宽。</li><li>带宽占用测试使用了speedtest-cli和speedtest-go两种工具,以防其中之一不可用时使用第二种工具,用户可以自定义设置带宽占用,此时详见设置提示。</li><li>提供一键卸载所有占用服务的选项,卸载将删除所有脚本、服务、任务、守护进程和开机自启设置。</li><li>提供一键检查更新的功能,更新范围仅限于脚本更新。<strong>请在更新后重新设置占用服务</strong></li><li>对所有进程执行增加唯一性检测,避免重复运行,使用PID文件进行判断。</li></ul><p>如若不希望一键的,希望自定义设置时间的,请查看<a href="https://gitlab.com/spiritysdx/Oracle-server-keep-alive-script/-/blob/main/%20README_CRON.md" target="_blank" rel="noreferrer">README_CRON.md</a>自行设置定时任务</p>',26)]))}const b=a(r,[["render",l]]);export{u as __pageData,b as default};
|