360 Secure SkillHub
360 安全技能中心

Memwatch

这是一款Linux平台的内存监控命令行工具,核心功能包括查看实时内存状态(带可视化条)、TOP内存消耗进程、指定PID内存详情、swap使用情况,还支持内存趋势快照、阈值告警、前后内存对比等。适用于排查内存占用异常、监控系统性能等场景,通过命令参数调用,输出文本化数据、可视化元素或告警提示。

bytesagain
bytesagain
热度 41.55
最近更新 2026-03-19 19:11:54
分类:开发依赖:代码执行 / 读写文件应用场景:DevOps / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add memwatch
Metadata
name
MemWatch
description
Monitor RAM usage in real time and alert on high memory consumption thresholds. Use when tracking memory, identifying RAM hogs, setting alert thresholds.
version
3.0.0
author
BytesAgain
homepage
https://bytesagain.com
source
https://github.com/bytesagain/ai-skills
tags
["memory","ram","monitor","system","process","swap","admin","performance"]
categories
["System Tools","Developer Tools"]

MemWatch

Memory monitor: view usage, find top consumers, watch trends, inspect per-process memory, check swap, and alert on thresholds.

Commands

Command Description
memwatch status Current memory usage with visual bar and breakdown
memwatch top [n] Top N memory-consuming processes (default: 10)
memwatch watch Snapshot memory every 2s for 10 iterations
memwatch process <pid> Memory details for a specific PID (VmRSS, VmSize, PSS, etc.)
memwatch swap Swap usage details with top swap consumers
memwatch alert <threshold> Check if memory usage exceeds threshold %
memwatch detailed Full /proc/meminfo dump
memwatch compare Compare memory now vs 30 seconds later (delta)
memwatch version Show version

Examples

memwatch status         # → usage %, visual bar, total/avail/cached
memwatch top 5          # → top 5 RAM consumers (PID, %MEM, RSS, CMD)
memwatch watch          # → 10 snapshots, 2s apart
memwatch process 1234   # → VmSize, VmRSS, VmSwap, PSS, threads
memwatch swap           # → swap devices, usage, top swap consumers
memwatch alert 80       # → 🚨 if usage > 80%, ✅ if under
memwatch detailed       # → full /proc/meminfo
memwatch compare        # → two snapshots 30s apart with delta

Requirements

  • free, ps (standard)
  • /proc/meminfo, /proc/[pid]/status (Linux)