nikoo
V2EX  ›  问与答

Swap 内存被占满了,怎么看是哪个进程占的?

  •  
  •   nikoo · Oct 18, 2016 · 2505 views
    This topic created in 3541 days ago, the information mentioned may be changed or developed.
    一台 VPS 目前的状态是:
    # free -m
    total used free shared buffers cached
    Mem: 1024 1021 2 0 0 285
    -/+ buffers/cache: 737 286
    Swap: 1024 1023 0

    Swap 已被占满,什么命令可以看出哪个进程占的?
    1 replies    2016-10-18 17:32:31 +08:00
    ijustdo
        1
    ijustdo  
       Oct 18, 2016
    貌似 2.6 后的内核 基本可以统计 /proc/$PID/smaps 这个来查 具体的 随便用撒语言 或者 sh 统计下呢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1274 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 17:12 · PVG 01:12 · LAX 10:12 · JFK 13:12
    ♥ Do have faith in what you're doing.