惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
I
InfoQ
N
Netflix TechBlog - Medium
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
C
Cisco Blogs
T
Threat Research - Cisco Blogs
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园_首页
Recorded Future
Recorded Future
J
Java Code Geeks
The Cloudflare Blog
S
Securelist
人人都是产品经理
人人都是产品经理
T
Tor Project blog
云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
V
V2EX
P
Palo Alto Networks Blog
I
Intezer
罗磊的独立博客
博客园 - 叶小钗
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
P
Privacy International News Feed
P
Proofpoint News Feed
美团技术团队
Cisco Talos Blog
Cisco Talos Blog
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
MyScale Blog
MyScale Blog
H
Help Net Security
W
WeLiveSecurity
Google Online Security Blog
Google Online Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

博客园 - 毕海

golang的cgo支持调用C++的方法 [原]zeromq框架测试报告 程序员必读系列 python 不同版本下载资源 提示“load System.Core failed” phpwind主要表结构的研究随笔[1] [转]Python快速教程 [转]80个Python经典资料(教程+源码+工具)汇总——下载目录 [转]一位大牛整理的python资源 [转]PyInstaller2的信息文件Version的生成 [转]使用PyInstaller2将Python脚本转化为可执行文件(下-进阶使用) [转]使用PyInstaller2将Python脚本转化为可执行文件(上-安装部分) [转]使用PyInstaller2将Python脚本转化为可执行文件(中-使用部分) [转]Nginx安装 [转]Centos 5.5 卸载与安装java1.7环境 在win8 x64上安装Scrapy mongodb协议透传 mongodb的监控与性能优化 记一次MongoDB性能问题
[转]linux下查看进程内存使用情况
毕海 · 2014-03-16 · via 博客园 - 毕海

动态查看一个进程的内存使用

1、top命令
top -d 1 -p pid [,pid ...]    //设置为delay 1s,默认是delay 3s
如果想根据内存使用量进行排序,可以shift + m(Sort by memory usage)

静态查看一个进程的内存使用

1、pmap命令
pmap pid

2、ps命令
ps aux|grep process_name

3、查看/proc/process_id/文件夹下的status文件
Name:   php
State:  R (running)
SleepAVG:       0%
Tgid:   21574
Pid:    21574
PPid:   10005
TracerPid:      0
Uid:    1000    1000    1000    1000
Gid:    100     100     100     100
FDSize: 256
Groups: 16 100 
VmPeak:   161740 kB
VmSize:   161740 kB
VmLck:         0 kB
VmHWM:    107144 kB
VmRSS:    107144 kB
VmData:   106192 kB
VmStk:        84 kB
VmExe:      5588 kB
VmLib:      7884 kB
VmPTE:       268 kB
Threads:        1
SigQ:   0/69632
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 00000001818040a7
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
Cpus_allowed:   00000000,00000000,00000000,0000000f
Mems_allowed:   1

任务虚拟地址空间的大小 VmSize
应用程序正在使用的物理内存的大小 VmRSS

posted on 2014-03-16 15:17  毕海  阅读(535)  评论()    收藏  举报