| Author |
what is the difference between /proc/pid/statm and top for the special process
|
jing hu
Ranch Hand
Joined: Jun 30, 2009
Posts: 63
|
|
for example
I want to watch a process memory info which pid is 5745.
So I typed the command:
top -p 5745
And top show that the process RES is 700m, VIRT is 848m
now I view the /proc/5745/statm, the file content is :
217088 179228 2251 59 0 207252 0
I want to know whether or not the column 2 of file statm is the process 5745 RES. why the two values have so big difference?
Thanks for any reply.
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12953
|
|
|
What version of what operating system are you using? Not all Unix-like operating systems are exactly the same with regards to these commands.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
jing hu
Ranch Hand
Joined: Jun 30, 2009
Posts: 63
|
|
|
The operation system is suse 11. I just think there should not have so big difference between the two values
|
 |
 |
|
|
subject: what is the difference between /proc/pid/statm and top for the special process
|
|
|