In Linux, how to tell how much memory processes are using?

前端 未结 13 1118
情歌与酒
情歌与酒 2020-11-30 17:36

I think I may have a memory leak in my LAMP application (memory gets used up, swap starts getting used, etc.). If I could see how much memory the various processes are using

13条回答
  •  温柔的废话
    2020-11-30 17:52

    First get the pid:

    ps ax | grep [process name]
    

    And then:

    top -p PID
    

    You can watch various processes in the same time:

    top -p PID1 -p PID2 
    

提交回复
热议问题