aioom — AI Memory Guardian Skill
Introduction
>概述 aioom 是一个 AI 驱动的内存守护进程,参考 earlyoom 设计,通过 AI 评分机制智能识别内存泄漏进程并执行清理。支持 CLI 守护模式和 Web GUI 可视化面板两种形态。 项目路径: C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom\ Web 端口: http://localhost:8866 日志文件: C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom.log 调用方式自动检测 优先使用打包后的 exe,回退到 Python 脚本: import os, subprocess PROJECT_DIR = r"C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom" EXE_PATH = r"C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom\dist\aioom.exe" WEB_EXE = r"C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom\dist\aioom-web.exe" PY_AIOOM = os.path.join(PROJECT_DIR, "aioom.py") PY_WEB = os.path.join(PROJECT_DIR, "web.py") def get_runner(target="cli"): """返回 (cmd_prefix, cwd)""" if target == "cli": if os.path.exists(EXE_PATH): return [EXE_PATH], PROJECT_DIR return ["python", PY_AIOOM], PROJECT_DIR else: # web if os.path.exists(WEB_EXE): return [WEB_EXE], PROJECT_DIR return ["python", PY_WEB], PROJECT_DIR 功能一:查看系统内存状态 使用 psutil 快速获取当前内存信息(无需启动 aioom 守护进程): import psutil mem = psutil.virtual_memory() swap = psutil.swap_memory() print(f"内存:{mem.percent:.1f}% 已用 | 可用 {mem.available / 1024**3:.2f} GB / 总计 {mem.total / 1024**3:.2f} GB") print(f"SWAP:{swap.percent:.1f}% 已用") # 列出前10个内存占用最高的进程 procs = sorted(psutil.process_iter(['pid','name','memory_percent']), key=lambda p: p.info['memory_percent'] or 0, reverse=True) for p in procs[:10]: print(f" PID {p.info['pid']:6d} {p.info['memory_percent']:.1f}% {p.info['name']}") 功能二:干跑分析(只分析不清理) 适合在执行清理前确认目标进程: # CLI 方式 python "C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom\aioom.py" --dryrun -v # 或 exe 方式 "C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom\dist\aioom.exe" --dryrun -v --dryrun:只打印分析结果,不执行任何 kill 操作 -v:详细输出,显示每个进程的 AI 评分 功能三:启动守护进程(后台持续监控) import subprocess cmd, cwd = get_runner("cli") # 后台运行,日志输出到文件 proc = subprocess.Popen( cmd + ["--interval", "5", "-v"], cwd=cwd, stdout=open(r"C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom.log", "a"), stderr=subprocess.STDOUT, creationflags=subprocess.CREATE_NO_WINDOW # Windows 无窗口后台运行 ) print(f"aioom 守护进程已启动,PID: {proc.pid}") 常用参数: 参数 说明 默认值 --interval N 检测间隔秒数 2 --dryrun 干跑模式 关闭 -v 详细输出 关闭 --config path 自定义配置文件 config.toml 功能四:停止 aioom 守护进程 import psutil killed = [] for proc in psutil.process_iter(['pid', 'name', 'cmdline']): try: cmdline = ' '.join(proc.info['cmdline'] or []) if 'aioom' in cmdline.lower() and 'aioom-web' not in cmdline.lower(): proc.terminate() killed.append(proc.info['pid']) except (psutil.NoSuchProcess, psutil.AccessDenied): pass print(f"已停止 {len(killed)} 个 aioom 进程:{killed}") 功能五:打开 Web GUI 面板 import subprocess, webbrowser, time cmd, cwd = get_runner("web") proc = subprocess.Popen(cmd, cwd=cwd, creationflags=subprocess.CREATE_NO_WINDOW) time.sleep(2) # 等待服务启动 webbrowser.open("http://localhost:8866") print(f"Web GUI 已在 http://localhost:8866 启动,PID: {proc.pid}") Web 面板功能: 实时内存/CPU 折线图(Chart.js) 进程列表及 AI 评分 一键终止高风险进程 配置阈值调整 配置文件说明 配置文件路径:C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom\config.toml [threshold] mem_percent = 85 # 触发清理的内存占用百分比 swap_percent = 80 # 触发清理的 SWAP 占用百分比 [ai] term_confidence = 0.8 # SIGTERM 置信度阈值 kill_confidence = 0.95 # SIGKILL 置信度阈值 [protect] ignore_patterns = ["sshd", "bash", "powershell", "explorer", "python.*aioom"] ignore_root = true protect_foreground = true [notify] log_file = "aioom.log" verbose = true 修改配置时,直接编辑 config.toml,重启守护进程后生效。 常见场景处理 场景:用户说"内存快满了,帮我清一下" 先用 psutil 展示当前内存状态 运行 --dryrun -v 让用户确认目标进程 征得确认后,正式启动(去掉 --dryrun)执行清理 场景:用户说"启动aioom后台监控" 检查是否已有 aioom 进程在运行 如有,提示用户当前状态 如无,用后台模式启动守护进程 场景:用户说"打开aioom界面" 直接执行功能五,启动 web.py 并打开浏览器 场景:用户说"查看aioom日志" log_path = r"C:\Users\PC\WorkBuddy\2026-05-15-task-3\aioom.log" with open(log_path, encoding='utf-8') as f: lines = f.readlines() print(''.join(lines[-50:])) # 最后50行
Resource Information
License information is collected from official sources and may be outdated or missing. Refer to the LICENSE file in the original repository before commercial use.
Information boundary
Information on this page is collected from official documents for technical presentation only and does not imply our endorsement. Pricing, quotas and availability are subject to the latest official statements. We make no commitment regarding any action you take after leaving this site.
Similar skills
全国电子印章互认平台
Not specifiedAPI key required电子印章公安备案、全网互认,实现所有格式文件电子签章与视频确权,覆盖全国所有CA厂商自2005年以来的全量电子签章数据,无论由哪个地区、哪套系统、哪家CA机构签发,均可精准校验与互认。
Amass · 攻击面测绘
Marked freeOWASP 出品的网络攻击面测绘框架:被动聚合外部 API 与公开数据库 + 主动 DNS 爆破与递归扩展,图谱化呈现资产关系,定位组织全部可达边界与隐藏/被遗忘的子域名。适合大规模侦察与完整攻击面盘点。
Subfinder · 被动子域名枚举
Marked free快速被动子域名枚举工具:通过证书透明度日志、搜索引擎、DNS 数据集等被动源发现目标子域名,不直接向目标发流量,快速且隐蔽。内置通配符消除、按源限速、JSONL 输出,是 bug bounty 侦察管道的标准第一环(subfinder → httpx → nuclei)。
钟馗.skill
API key required钟馗.Skill——会更新漏洞库的安全审查专家。直来直去、快刀斩乱麻,三层审查(静态审计/行为模拟/供应链溯源)覆盖12类风险,输出结构化安全裁定(✅干净/⚠️可疑/🚫恶意)。Use when 用户说"审查这个Skill"、"安全检查"、"钟馗看下"、"审一下"、"查一下这个skill"、安装Skill前的安全评估、或需要审计SKILL.md的恶意载荷。
HTTPX · 存活探测与指纹
Marked free快速多用途 HTTP 探测工具:对子域名列表批量探测存活、状态码、页面标题、技术栈指纹(-tech-detect)、重定向链。是 subfinder 之后、nuclei 之前的标准一环——先知道哪些活着、跑着什么,再决定扫什么。
Waybackurls · 历史URL挖掘
Marked free从 Internet Archive Wayback Machine 提取目标域名的全部历史 URL。老 API 路径、已下线页面、带参数的历史端点常常还活着但没人管——正是赏金猎人说的「钱在无聊的输出里」。纯被动,不碰目标。
What is a Skill
A Skill is a packaged single capability, such as text recognition, document summarization, or keyword extraction. Developers wrap the calling logic and prompts into a plugin-like unit, so users can load it without understanding the underlying model. StackPilot indexes a large number of skills that can be tried instantly or assembled into a plan.