I would like to get a process's memory usage and it seems that pmap can do that. However, the value it returns is different from what I see in top command.

# pmap 22080 | grep total
total          6588952K
# top | grep 22080
22080 ghatee    20   0 6588948 5.873g  11936 R 100.0  9.4   1120:17 pw.x       

What is the reason?

1 Answer 1


'total' in pmap probably includes virtual/VSZ memory, which corresponds to the 5th column in top. If you look closely, both values differ only by 4K, something surely attributable to having executed the commands at slightly different times

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .