{"id":466,"date":"2015-12-12T12:04:03","date_gmt":"2015-12-12T12:04:03","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/2015\/12\/12\/20-pmap-commands-examples-in-linux-unix\/"},"modified":"2021-02-27T09:49:47","modified_gmt":"2021-02-27T09:49:47","slug":"20-pmap-commands-examples-in-linux-unix","status":"publish","type":"post","link":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/","title":{"rendered":"20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial"},"content":{"rendered":"<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3162 aligncenter\" src=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png\" alt=\"\" width=\"600\" height=\"400\" srcset=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png 600w, https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l-300x200.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>You can find the memory used by a program (process) by looking into \/proc directory or using standard command such as ps or top.<\/p>\n<\/div>\n<div>However, you must calculate all memory usage by hand i.e. add Shared Memory + mapped file + total virtual memory size of the process + Resident Set Size + non-swapped physical memory used by process. So how do you find the total memory used by a process or program under Linux? Use a tool called pmap. It reports the memory map of a process or processes.<\/div>\n<div><\/div>\n<div><strong>To display process mappings, type<\/strong><\/div>\n<div>$ pmap pid<\/div>\n<div>$ pmap 3724<\/div>\n<div><\/div>\n<div><strong>If you want to see the exented format<br \/>\n<\/strong>The -x option can be used to provide information about the memory allocation and mapping types per mapping. The amount of resident, non-shared anonymous, and locked memory is shown for each mapping:<\/div>\n<div><\/div>\n<div>$ pmap -x 3526<\/div>\n<div><\/div>\n<div><strong>If you want to see the device format<\/strong><\/div>\n<div>$ pmap -d 3526<\/div>\n<div><\/div>\n<div><strong>If you do not display some header\/footer lines.<\/strong><\/div>\n<div>$ pmap -q 3526<\/div>\n<div><\/div>\n<div><\/div>\n<div><strong>GENERAL OPTIONS<\/strong><\/div>\n<div>-x extended Show the extended format.<\/div>\n<div>-d device Show the device format.<\/div>\n<div>-q quiet Do not display some header\/footer lines.<\/div>\n<div>-V show version Displays version of program.<\/div>\n<div><\/div>\n<div><strong>Reference<\/strong><\/div>\n<div><a href=\"http:\/\/linux.die.net\/man\/1\/pmap\" target=\"_blank\" rel=\"noopener\">http:\/\/linux.die.net\/man\/1\/pmap<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>You can find the memory used by a program (process) by looking into \/proc directory or using standard command such [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":3162,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[54],"tags":[378,632,460,1298,1295,1296,1297,1300,1299,169],"class_list":["post-466","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unix-linux","tag-commands","tag-examples","tag-linux","tag-linux-pmap-command","tag-pmap","tag-pmap-command","tag-pmap-command-examples","tag-pmap-command-line","tag-pmap-commands-tutorials","tag-unix"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial - scmGalaxy<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial - scmGalaxy\" \/>\n<meta property=\"og:description\" content=\"You can find the memory used by a program (process) by looking into \/proc directory or using standard command such [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/\" \/>\n<meta property=\"og:site_name\" content=\"scmGalaxy\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-12T12:04:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-27T09:49:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"scmgalaxy K\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"scmgalaxy K\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/\"},\"author\":{\"name\":\"scmgalaxy K\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"headline\":\"20 pmap Commands Examples in Linux \\\/ UNIX | pmap Commands Tutorial\",\"datePublished\":\"2015-12-12T12:04:03+00:00\",\"dateModified\":\"2021-02-27T09:49:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/\"},\"wordCount\":204,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/pmap-commands-examples-in-l.png\",\"keywords\":[\"commands\",\"Examples\",\"Linux\",\"Linux pmap Command\",\"pmap\",\"pmap Command\",\"pmap Command Examples\",\"pmap command line\",\"pmap Commands Tutorials\",\"unix\"],\"articleSection\":[\"Unix - Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/\",\"name\":\"20 pmap Commands Examples in Linux \\\/ UNIX | pmap Commands Tutorial - scmGalaxy\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/pmap-commands-examples-in-l.png\",\"datePublished\":\"2015-12-12T12:04:03+00:00\",\"dateModified\":\"2021-02-27T09:49:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/pmap-commands-examples-in-l.png\",\"contentUrl\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/wp-content\\\/uploads\\\/2015\\\/12\\\/pmap-commands-examples-in-l.png\",\"width\":600,\"height\":400,\"caption\":\"pmap-commands\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/20-pmap-commands-examples-in-linux-unix\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"20 pmap Commands Examples in Linux \\\/ UNIX | pmap Commands Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#website\",\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/\",\"name\":\"scmGalaxy\",\"description\":\"A Platform for Software Engineers\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/#\\\/schema\\\/person\\\/fc12ad190f540e79460243c81148d102\",\"name\":\"scmgalaxy K\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g\",\"caption\":\"scmgalaxy K\"},\"sameAs\":[\"http:\\\/\\\/www.DevOpsSchool.com\"],\"url\":\"https:\\\/\\\/www.scmgalaxy.com\\\/tutorials\\\/author\\\/scmgalaxy\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial - scmGalaxy","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/","og_locale":"en_US","og_type":"article","og_title":"20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial - scmGalaxy","og_description":"You can find the memory used by a program (process) by looking into \/proc directory or using standard command such [&hellip;]","og_url":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/","og_site_name":"scmGalaxy","article_published_time":"2015-12-12T12:04:03+00:00","article_modified_time":"2021-02-27T09:49:47+00:00","og_image":[{"width":600,"height":400,"url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png","type":"image\/png"}],"author":"scmgalaxy K","twitter_card":"summary_large_image","twitter_misc":{"Written by":"scmgalaxy K","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#article","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/"},"author":{"name":"scmgalaxy K","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"headline":"20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial","datePublished":"2015-12-12T12:04:03+00:00","dateModified":"2021-02-27T09:49:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/"},"wordCount":204,"commentCount":0,"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png","keywords":["commands","Examples","Linux","Linux pmap Command","pmap","pmap Command","pmap Command Examples","pmap command line","pmap Commands Tutorials","unix"],"articleSection":["Unix - Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/","url":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/","name":"20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial - scmGalaxy","isPartOf":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#primaryimage"},"image":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#primaryimage"},"thumbnailUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png","datePublished":"2015-12-12T12:04:03+00:00","dateModified":"2021-02-27T09:49:47+00:00","author":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102"},"breadcrumb":{"@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#primaryimage","url":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png","contentUrl":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-content\/uploads\/2015\/12\/pmap-commands-examples-in-l.png","width":600,"height":400,"caption":"pmap-commands"},{"@type":"BreadcrumbList","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/20-pmap-commands-examples-in-linux-unix\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.scmgalaxy.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"20 pmap Commands Examples in Linux \/ UNIX | pmap Commands Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#website","url":"https:\/\/www.scmgalaxy.com\/tutorials\/","name":"scmGalaxy","description":"A Platform for Software Engineers","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.scmgalaxy.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.scmgalaxy.com\/tutorials\/#\/schema\/person\/fc12ad190f540e79460243c81148d102","name":"scmgalaxy K","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b902ea8c77ee0a326c112f29d0edf51b7c3e1cd05c4fb92a810177e9c3f12a9?s=96&d=mm&r=g","caption":"scmgalaxy K"},"sameAs":["http:\/\/www.DevOpsSchool.com"],"url":"https:\/\/www.scmgalaxy.com\/tutorials\/author\/scmgalaxy\/"}]}},"_links":{"self":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/466","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/comments?post=466"}],"version-history":[{"count":3,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/466\/revisions"}],"predecessor-version":[{"id":3297,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/posts\/466\/revisions\/3297"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media\/3162"}],"wp:attachment":[{"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/media?parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/categories?post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.scmgalaxy.com\/tutorials\/wp-json\/wp\/v2\/tags?post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}