命令行来获取进程使用的内存

时间:2022-06-24 21:04:26

What command line should I write to display the memory used by process as well as the process command line and it's pid ?

我应该编写什么命令行来显示进程使用的内存以及进程命令行和它的pid?

Something like:

pid mem cmdline
--- --- -------
112 12M mysql -param1 5 -param2 12
115 15M apache -param1 44 -param2 8
...

2 个解决方案

#1


try

ps -eo pid,rss,cmd

#2


Wasn't there something like the /proc directory? /proc/[id]/mem should lead you there.

是不是像/ proc目录? / proc / [id] / mem应该引导你到那里。

#1


try

ps -eo pid,rss,cmd

#2


Wasn't there something like the /proc directory? /proc/[id]/mem should lead you there.

是不是像/ proc目录? / proc / [id] / mem应该引导你到那里。