首页
相册
友链
留言
关于
足迹
朋友圈
推荐
百度一下
Search
1
Linux服务器测速方法
154 阅读
2
给Typecho的Joe主题添加在线人数统计
149 阅读
3
Freenom域名自动续期bot
146 阅读
4
Joe修改透明、主题色等教程
124 阅读
5
给Typecho的Joe主题隐藏/显示侧边栏模块
110 阅读
网站代码
网站源码
人情世故
软件分享
网址大全
电脑系统
生活趣事
福利羊毛
登录
/
注册
Search
标签搜索
美化
代码
SSH
Linux
源码
系统
文章
命令
IP
Windows
域名
菜鸟
他
11月6日
来过
累计撰写
25
篇文章
累计收到
69
条评论
首页
栏目
网站代码
网站源码
人情世故
软件分享
网址大全
电脑系统
生活趣事
福利羊毛
页面
相册
友链
留言
关于
足迹
朋友圈
推荐
百度一下
登录
丨
注册
搜索到
3
篇与
系统
的结果
2025-09-26
哪吒监控面板v1安装
介绍哪吒监控 是一款轻量化的服务器监控和运维工具,提供实时性能监控与告警通知。作为开源项目,它支持企业自托管,保护数据隐私,并支持多语言。哪吒服务器监控安装简便,支持自定义监控项目,可满足不同服务器运维需求。 开始安装 安装 Dashboard ssh你的服务器运行下面的脚本curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh如果你的服务器位于中国大陆可运行下面的脚本curl -L https://gitee.com/naibahq/scripts/raw/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh以 Docker 安装为例,安装完成后按提示输入以下信息: · 请输入站点标题: - 自定义站点标题。 · 请输入暴露端口: - 公开访问端口(默认 8008,可自定义,如果是云服务器记得在安全组开启8008端口)。 · 请指定后台语言: - 选择语言偏好。输入完成后,等待拉取 Docker 镜像。安装结束后,如果一切正常,你可以通过域名和端口号访问 Dashboard,例如:http://127.0.0.1:8008 如果需要再次运行安装脚本,可输入以下命令:./nezha.sh打开管理脚本。 登录到 Dashboard 配置界面 后台管理界面的路径为 /dashboard,你只需访问:http://127.0.0.1:8008/dashboard首次登录的默认用户名和密码均为 admin。 配置反向代理 以宝塔面板为例,在宝塔面板侧边栏网站,选择反向代理,添加反代,域名填写公开访问域名,如 http://dashboard.example.com,然后填写“代理地址”。在“目标”中填入:http://127.0.0.1:8008点击“确定”。 现在,你可以直接通过域名访问面板,例如:http://dashboard.example.com 安装 Agent 哪吒监控的被控端服务被称为 AgentAgent 二进制文件仓库地址为: https://github.com/nezhahq/agent/releases 一键安装 Agent哪吒监控支持在 Windows、macOS 和 Linux 上一键安装 Agent。遵循本文档的步骤,你可以轻松地在服务器上部署它。准备工作在安装前,需要提前在管理面板中设置通信域名,该域名不可以接入 CDN。本文档以示例通信域名 “data.example.com” 为例。在后台管理面板点击头像,进入“系统设置”页。在“仪表板服务器域名/IP(无 CDN)”项中填入通信域名。 点击“确认”保存设置。一键安装步骤在 服务器 页面中,点击 安装命令 并选择对应操作系统,安装命令将自动复制到你的剪贴板。在被控端服务器中运行安装命令,等待安装完成后返回到 服务器 页面查看是否上线。 如果安装成功,页面中将自动弹出新的服务器,你可以点击编辑按钮为其设置名称。 分享一个自用美化代码<!DOCTYPE html> <html lang=“zh-CN”> <head> <meta charset=“UTF-8” /> <meta name=“viewport” content=“width=device-width, initial-scale=1.0” /> <title>哪吒探针</title> <style> @font-face { font-family: "MyFont"; src: url("https://blog.ozzo.top/usr/uploads/1.ttf"); } /* 设置页面背景为一张图片,全屏覆盖 */ html, body { height: 100% !important; background: url("https://img.ozzo.top/images/2d") no-repeat center center fixed !important; background-size: cover !important; margin: 0; } #root{ background-color: transparent !important; } /* 卡片透明并带模糊效果 */ .rounded-lg{ backdrop-filter: blur(4px)!important; background-color: transparent !important; box-shadow: none !important; } .bg-white{ backdrop-filter: blur(4px)!important; background-color: transparent !important; box-shadow: none !important; } .flex { background-color: transparent !important; } .bg-card{ background-color: transparent !important; } /* 替换左上角 Logo 图标 */ img[src*="/apple-touch-icon.png"] { content: url("/apple-touch-icon.png") !important; } /* 去除页面底部页脚 */ footer { display: none !important; } /* 主内容容器设置为半透明背景 */ .el-container { background-color: rgba(255, 255, 255, 0.9) !important; } /* 卡片、弹窗等组件设置更高透明度的背景 */ .el-card, .el-message-box, .el-dialog { background-color: rgba(255, 255, 255, 0.9) !important; } /* 深色文字设置白色阴影增强对比度 */ .el-text, .el-button, .el-table, .el-form-item__label, .el-form-item__content, .el-menu-item, .el-submenu__title { color: #333 !important; text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); } /* 浅色文字设置黑色阴影提升可视性 */ .el-text-light, .el-button--text, .el-link { color: #fff !important; text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); } /* 碎玻璃特效碎片样式 */ .fragment { position: absolute; width: 10px; height: 10px; background-color: rgba(255, 255, 255, 0.8); clip-path: polygon(0 0, 100% 0, 100% 100%); transform-origin: center; animation: shatter 1.5s ease-out forwards; pointer-events: none; } /* 碎玻璃动画关键帧 */ @keyframes shatter { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) rotate(var(--angle)) scale(0.5); opacity: 0; } } /* 返回顶部按钮样式 */ #backToTop { position: fixed; bottom: 30px; right: 30px; z-index: 1000; background-color: transparent; color: white; border: none; border-radius: 50%; width: 60px; height: 60px; font-size: 24px; cursor: pointer; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); transition: opacity 0.3s, transform 0.3s; display: none; } //覆写内容宽度 .w-full { max-width: 75rem !important; } #backToTop:hover { transform: scale(1.1); } #backToTop::before { content: "🚀"; font-size: 24px; display: block; line-height: 60px; text-align: center; } .mt-4.w-full.mx-auto > div { display: none; } </style> </head> <body> <!-- 返回顶部按钮 --> <button id=“backToTop”></button> <script> //禁用动画小人 window.DisableAnimatedMan = true; document.addEventListener('click', function(e) { createShatterEffect(e.pageX, e.pageY); }); //点击碎片特效 function createShatterEffect(x, y) { const fragmentCount = 20; for (let i = 0; i < fragmentCount; i++) { const fragment = document.createElement('div'); fragment.className = 'fragment'; const angle = Math.random() * 360; const distance = Math.random() * 200 + 50; const dx = Math.cos((angle * Math.PI) / 180) * distance; const dy = Math.sin((angle * Math.PI) / 180) * distance; fragment.style.left = `${x}px`; fragment.style.top = `${y}px`; fragment.style.setProperty('--dx', `${dx}px`); fragment.style.setProperty('--dy', `${dy}px`); fragment.style.setProperty('--angle', `${Math.random() * 720}deg`); document.body.appendChild(fragment); setTimeout(() => fragment.remove(), 1500); } } //隐藏数据 const observer = new MutationObserver(mutations => { document.querySelectorAll('span[data-current-value]').forEach(el => { if(!el.dataset.processed) { el.style.opacity = "0"; el.dataset.processed = true; } }); }); observer.observe(document.body, { childList: true, subtree: true }); /**/卡面添加流量统计 window.ShowNetTransfer = "true"; ; (function () { let trafficTimer = null; let trafficCache = null; const config = { showTrafficStats: true, insertPosition: 'replace', // 可选:'after', 'before', 'replace' interval: 60000, // 60秒刷新周期 style: 1 }; function formatFileSize(bytes) { if (bytes === 0) return { value: '0', unit: 'B' }; const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; let unitIndex = 0; let size = bytes; while (size >= 1024 && unitIndex < units.length - 1) { size /= 1024; unitIndex++; } return { value: size.toFixed(unitIndex === 0 ? 0 : 2), unit: units[unitIndex] }; } function calculatePercentage(used, total) { used = Number(used); total = Number(total); if (used > 1e15 || total > 1e15) { used /= 1e10; total /= 1e10; } return (used / total * 100).toFixed(1); } function formatDate(dateString) { const date = new Date(dateString); return date.toLocaleDateString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit' }); } function safeSetTextContent(parent, selector, text) { const el = parent.querySelector(selector); if (el) { el.textContent = text; } } **/ // 返回进度条颜色:绿色(0%)到红色(100%) function getGradientColor(percentage) { const clamp = (val, min, max) => Math.min(Math.max(val, min), max); const lerp = (start, end, t) => Math.round(start + (end - start) * t); const p = clamp(Number(percentage), 0, 100) / 100; const startColor = { r: 16, g: 185, b: 129 }; // #10b981 const endColor = { r: 239, g: 68, b: 68 }; // #ef4444 const r = lerp(startColor.r, endColor.r, p); const g = lerp(startColor.g, endColor.g, p); const b = lerp(startColor.b, endColor.b, p); return `rgb(${r}, ${g}, ${b})`; } function renderTrafficStats(trafficData) { const serverMap = new Map(); for (const cycleId in trafficData) { const cycle = trafficData[cycleId]; if (!cycle.server_name || !cycle.transfer) continue; for (const serverId in cycle.server_name) { const serverName = cycle.server_name[serverId]; const transfer = cycle.transfer[serverId]; const max = cycle.max; const from = cycle.from; const to = cycle.to; const next_update = cycle.next_update[serverId]; if (serverName && transfer !== undefined && max && from && to) { serverMap.set(serverName, { id: serverId, transfer: transfer, max: max, name: cycle.name, from: from, to: to, next_update: next_update }); } } } serverMap.forEach((serverData, serverName) => { const targetElement = Array.from(document.querySelectorAll('section.grid.items-center.gap-2')) .find(section => { const firstText = section.querySelector('p.break-all.font-bold.tracking-tight.text-xs')?.textContent.trim(); return firstText === serverName; }); if (!targetElement) { //console.warn(`[renderTrafficStats] 未找到服务器 "${serverName}" (ID: ${serverData.id}) 的元素`); return; } const usedFormatted = formatFileSize(serverData.transfer); const totalFormatted = formatFileSize(serverData.max); const percentage = calculatePercentage(serverData.transfer, serverData.max); const fromFormatted = formatDate(serverData.from); const toFormatted = formatDate(serverData.to); const next_update = new Date(serverData.next_update).toLocaleString("zh-CN", { timeZone: "Asia/Shanghai" }); const uniqueClassName = 'traffic-stats-for-server-' + serverData.id; const progressColor = getGradientColor(percentage); let insertPosition = config.insertPosition; const containerDiv = targetElement.closest('div'); if (!containerDiv) return; const existing = Array.from(containerDiv.querySelectorAll('.new-inserted-element')).find(el => el.classList.contains(uniqueClassName) ); if (!config.showTrafficStats) { if (existing) existing.remove(); return; } if (existing) { safeSetTextContent(existing, '.used-traffic', usedFormatted.value); safeSetTextContent(existing, '.used-unit', usedFormatted.unit); safeSetTextContent(existing, '.total-traffic', totalFormatted.value); safeSetTextContent(existing, '.total-unit', totalFormatted.unit); safeSetTextContent(existing, '.from-date', fromFormatted); safeSetTextContent(existing, '.to-date', toFormatted); safeSetTextContent(existing, '.percentage-value', percentage + '%'); safeSetTextContent(existing, '.next-update', `next update: ${next_update}`); const progressBar = existing.querySelector('.progress-bar'); if (progressBar) { progressBar.style.width = percentage + '%'; progressBar.style.backgroundColor = progressColor; } console.log(`[renderTrafficStats] 更新已存在的流量条目: ${serverName}`); } else { let oldSection = containerDiv.querySelector('section.flex.items-center.w-full.justify-between.gap-1'); if (!oldSection) { oldSection = containerDiv.querySelector('section.grid.items-center.gap-3'); insertPosition = 'after'; } if (!oldSection) return; const newElement = document.createElement('div'); newElement.classList.add('space-y-1.5', 'new-inserted-element', uniqueClassName); newElement.style.width = '100%'; if (config.style === 1) { newElement.innerHTML = ` <div class="flex items-center justify-between"> <div class="flex items-baseline gap-1"> <span class="text-[10px] font-medium text-neutral-800 dark:text-neutral-200 used-traffic">${usedFormatted.value}</span> <span class="text-[10px] font-medium text-neutral-800 dark:text-neutral-200 used-unit">${usedFormatted.unit}</span> <span class="text-[10px] text-neutral-500 dark:text-neutral-400">/ </span> <span class="text-[10px] text-neutral-500 dark:text-neutral-400 total-traffic">${totalFormatted.value}</span> <span class="text-[10px] text-neutral-500 dark:text-neutral-400 total-unit">${totalFormatted.unit}</span> </div> <div class="text-[10px] font-medium text-neutral-600 dark:text-neutral-300"> <span class="from-date">${fromFormatted}</span> <span class="text-neutral-500 dark:text-neutral-400">-</span> <span class="to-date">${toFormatted}</span> </div> </div> <div class="relative h-1.5"> <div class="absolute inset-0 bg-neutral-100 dark:bg-neutral-800 rounded-full"></div> <div class="absolute inset-0 bg-emerald-500 rounded-full transition-all duration-300 progress-bar" style="width: ${percentage}%; background-color: ${progressColor};"></div> </div> `; } else if (config.style === 2) { newElement.innerHTML = ` <div class="flex items-center justify-between"> <div class="flex items-baseline gap-1"> <span class="text-[10px] font-medium text-neutral-800 dark:text-neutral-200 used-traffic">${usedFormatted.value}</span> <span class="text-[10px] font-medium text-neutral-800 dark:text-neutral-200 used-unit">${usedFormatted.unit}</span> <span class="text-[10px] text-neutral-500 dark:text-neutral-400">/ </span> <span class="text-[10px] text-neutral-500 dark:text-neutral-400 total-traffic">${totalFormatted.value}</span> <span class="text-[10px] text-neutral-500 dark:text-neutral-400 total-unit">${totalFormatted.unit}</span> </div> <span class="text-[10px] text-neutral-500 dark:text-neutral-400 percentage-value">${percentage}%</span> </div> <div class="relative h-1.5"> <div class="absolute inset-0 bg-neutral-100 dark:bg-neutral-800 rounded-full"></div> <div class="absolute inset-0 bg-emerald-500 rounded-full transition-all duration-300 progress-bar" style="width: ${percentage}%; background-color: ${progressColor};"></div> </div> <div class="flex items-center justify-between"> <div class="text-[10px] text-neutral-500 dark:text-neutral-400"> <span class="from-date">${fromFormatted}</span> <span class="text-neutral-500 dark:text-neutral-400">-</span> <span class="to-date">${toFormatted}</span> </div> <span class="text-[10px] text-neutral-500 dark:text-neutral-400">next update: ${next_update}</span> </div> `; } if (insertPosition === 'before') oldSection.before(newElement); else if (insertPosition === 'replace') oldSection.replaceWith(newElement); else oldSection.after(newElement); console.log(`[renderTrafficStats] 插入新流量条目: ${serverName},插入方式: ${insertPosition}`); } }); } function updateTrafficStats(force = false) { const now = Date.now(); if (!force && trafficCache && (now - trafficCache.timestamp < config.interval)) { console.log('[updateTrafficStats] 使用缓存数据'); renderTrafficStats(trafficCache.data); return; } console.log('[updateTrafficStats] 正在请求新数据...'); fetch('/api/v1/service') .then(res => res.json()) .then(data => { if (!data.success) { console.warn('[updateTrafficStats] 请求成功但返回数据异常'); return; } console.log('[updateTrafficStats] 成功获取新数据'); const trafficData = data.data.cycle_transfer_stats; trafficCache = { timestamp: now, data: trafficData }; renderTrafficStats(trafficData); }) .catch(err => console.error('[updateTrafficStats] 获取失败:', err)); } function startPeriodicRefresh() { if (!trafficTimer) { console.log('[startPeriodicRefresh] 启动周期刷新任务'); trafficTimer = setInterval(() => { updateTrafficStats(); }, config.interval); } } function onDomChildListChange() { console.log('[onDomChildListChange] 检测到DOM变化, 立即刷新'); updateTrafficStats(); if (!trafficTimer) { console.log('[onDomChildListChange] 启动定时刷新'); startPeriodicRefresh(); } } const TARGET_SELECTOR = 'section.server-card-list, section.server-inline-list'; let currentSection = null; let childObserver = null; function observeSection(section) { if (childObserver) { childObserver.disconnect(); console.log('[监听] 断开旧的子节点监听'); } currentSection = section; console.log('[监听] 监听新的目标 section 子节点'); childObserver = new MutationObserver(mutations => { for (const m of mutations) { if (m.type === 'childList' && (m.addedNodes.length || m.removedNodes.length)) { console.log('[监听] section 子节点变化,触发刷新'); onDomChildListChange(); break; } } }); childObserver.observe(currentSection, { childList: true, subtree: false }); updateTrafficStats(); } const sectionDetector = new MutationObserver(() => { const section = document.querySelector(TARGET_SELECTOR); if (section && section !== currentSection) { observeSection(section); } }); const root = document.querySelector('main') || document.body; sectionDetector.observe(root, { childList: true, subtree: true }); console.log('[初始化] 启动 sectionDetector, 持续监听 section 切换'); startPeriodicRefresh(); window.addEventListener('beforeunload', () => { if (trafficTimer) clearInterval(trafficTimer); if (childObserver) childObserver.disconnect(); sectionDetector.disconnect(); console.log('[清理] 卸载监听器和定时器'); }); })(); window.CustomDesc=""; </script> </body> </html>将以上代码放入在后台管理面板点击头像,进入“系统设置”页,自定义代码(样式和脚本)
2025年09月26日
64 阅读
1 评论
0 点赞
2024-01-01
宝塔面板关闭安全入口
效果图 执行以下命令即可rm -f /www/server/panel/data/admin_path.pl
2024年01月01日
52 阅读
0 评论
1 点赞
2022-12-03
Windows10关闭开机磁盘检测
当你有一天,电脑开机。屏幕跳出。。。要跳过磁盘检查,请在8秒内按任意键。。。。。。那一刻,我是懵逼的。目前使用win10的用户应该不少,笔者的电脑也是win10系统,前段时间在开机时,突然出现要进行磁盘检查,刚开始排查以为是刚更新过补丁或非正常关机的原因,也就没在意,但连续几天开机都需要磁盘检查,明显影响了开机速度,所以需要进行设置下。鼠标指向左下角的开始菜单,然后右击运行(也可以使用快捷键Win+R)在弹出的运行框中,输入regedit,点击确定,打开注册表编辑器HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manage将上面内容粘贴在注册表的URL栏目里面,然后回车键按一下,如下面操作:在注册表右侧找到“BootExecute”,双击打开将“BootExecute”里的数据清空,点击确定。视频教程{dplayer src="http://tu.2lc.top/images/2022/12/03/1670047421638ae6bd16c71.mp4"/}
2022年12月03日
62 阅读
0 评论
0 点赞