• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pmap: command not found

by Deepika

pmap is a command-line utility in Linux/Unix systems that reports the memory mapping of a process or processes. It displays the memory usage of a process in a detailed and comprehensive manner. This can be useful for analyzing the memory usage of a process, identifying memory leaks, and optimizing memory usage.

The pmap command reports the amount of memory that one or more processes are using. For example, use this command to determine which processes on the server are being allocated memory and whether this amount of memory is a cause of memory bottlenecks:

# pmap -x [pid]

Example below shows the total amount of memory the cupsd process is using:

# pmap -x 1796
1796:   /usr/sbin/cupsd
Address   Kbytes     RSS    Anon  Locked Mode   Mapping
08048000     244       -       -       - r-x--  cupsd
ffffe000       4       -       -       - -----    [ anon ]
-------- ------- ------- ------- -------
total kB    6364       -       -       -

If you encounter the below error while running the command pmap:

pmap: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install procps
Ubuntu apt-get install procps
Alpine apk add procps
Arch Linux pacman -S procps-ng
Kali Linux apt-get install procps
CentOS yum install procps-ng
Fedora dnf install procps-ng
Raspbian apt-get install procps

pmap Command Examples

1. Print memory map for a specific process id (PID):

# pmap pid

2. Show the extended format:

# pmap --extended pid

3. Show the device format:

# pmap --device pid

4. Limit results to a memory address range specified by `low` and `high`:

# pmap --range low,high

5. Print memory maps for multiple processes:

# pmap pid1 pid2 ...

Filed Under: Linux

Some more articles you might also be interested in …

  1. How To Migrate Existing Iptables rules to Nftables In CentOS/RHEL 8
  2. How to Reduce an LVM volume on Ubuntu
  3. route: command not found
  4. dbus-daemon Command Examples in Linux
  5. hwclock Command Examples in Linux
  6. Linux OS Service ‘syslog’
  7. mountpoint Command Examples in Linux
  8. How to Delete unnecessary Entry in /etc/shadow
  9. how to rotate Tang Server Keys and update the Clevis Client
  10. systemd-analyze Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright