当前位置: 技术问答>linux和unix
linux下如何查看某进程占用内存情况?
来源: 互联网 发布时间:2016-10-28
本文导语: RT, 另外,如果这个进程存在内存泄露?这些泄露的内存是不是还是显示为该进程占用? | ps aux|grep 进程名 | cat /proc/pid/maps | top 动态显示 | ...
RT,
另外,如果这个进程存在内存泄露?这些泄露的内存是不是还是显示为该进程占用?
另外,如果这个进程存在内存泄露?这些泄露的内存是不是还是显示为该进程占用?
|
ps aux|grep 进程名
|
cat /proc/pid/maps
|
top 动态显示
|
我这个保证你满意,用leaky.
Once your program has completed execution you can use leaky to look for memory leaks, or at least use it to dump the log. For memory leaks, you use leaky like this:
leaky -d malloc-logLeaky will then display all of the call sites where memory was leaked. To look at the entire log file contents, not just the leaks add "-a" to the arguments:
leaky -d -a malloc-log
Once your program has completed execution you can use leaky to look for memory leaks, or at least use it to dump the log. For memory leaks, you use leaky like this:
leaky -d malloc-logLeaky will then display all of the call sites where memory was leaked. To look at the entire log file contents, not just the leaks add "-a" to the arguments:
leaky -d -a malloc-log