How to inspect the memory usage of a process / program

  • 7006667
  • 19-Aug-2010
  • 30-Apr-2012

Environment

Novell Open Enterprise Server 1 (OES 1) Linux
Novell Open Enterprise Server 1 (OES 1) Linux Support Pack 1 Linux
Novell Open Enterprise Server 1 (OES 1) Linux Support Pack 2 Linux
Novell Open Enterprise Server 2 (OES 2) Linux Support Pack 1
Novell Open Enterprise Server 2 (OES 2) Linux Support Pack 2
SUSE Linux Enterprise Desktop 11
SUSE Linux Enterprise Desktop 11 Service Pack 1
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Desktop 10 Service Pack 1
SUSE Linux Enterprise Desktop 10 Service Pack 2
SUSE Linux Enterprise Desktop 10 Service Pack 3
SUSE Linux Enterprise Point of Service
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Server 10 Service Pack 1
SUSE Linux Enterprise Server 10 Service Pack 2
SUSE Linux Enterprise Server 10 Service Pack 3
SUSE Linux Enterprise Server 9
SUSE Linux Enterprise Server 9 Service Pack 1
SUSE Linux Enterprise Server 9 Service Pack 2
SUSE Linux Enterprise Server 9 Service Pack 3
SUSE Linux Enterprise Server 9 Service Pack 4

Situation

A process is using a lot of memory e.g. a memory hole is suspected. How can this be analysed?

Resolution

Use the command pmap from the package procps. The command only needs the process id (PID) which you can find out with ps.

Note: You can find the information also in the proc file system, but pmap presents it in a better readable format.