Linux – find page size and number of pages of a process in linux

linuxprocessunix

Given a PID of the process running in Linux (latest kernel), how do I find out:

  1. The number of pages it is using
  2. The size of each page it is using (4K, 2MB or 1GB)

This is for x86-64 architecture.

Best Answer

Pagesize is system wide and can be found with the getconf command

getconf PAGESIZE

The mem_usage.py tool can provide some more detailed information on a processes memory usage.