shell-helpers
shell-helpers copied to clipboard
Adaptation on pmap output from OpenSUSE 12.3
On my machine the pmap output is like this
START SIZE RSS PSS DIRTY SWAP PERM MAPPING 0000000000400000 92K 68K 68K 0K 0K r-xp /usr/lib64/firefox/firefox 0000000000616000 4K 4K 4K 4K 0K r--p /usr/lib64/firefox/firefox 0000000000617000 4K 4K 4K 4K 0K rw-p /usr/lib64/firefox/firefox 00007fffb59ff000 4K 4K 0K 0K 0K r-xp [vdso] ffffffffff600000 4K 0K 0K 0K 0K r-xp [vsyscall] Total: 2631292K 1220324K 1200619K 1177580K 2536K
1888736K writable-private, 605780K readonly-private, 136776K shared, and 1149368K referenced
This would then break compatibility with the pmap output I have on my machine. Please add a conditional around to check for the distro and adapt accordingly. Or maybe look at pmap --version. I get there: "pmap from procps-ng 3.3.8" - maybe you have some other pmap implementation and we could base the format on that. I did something similar in the system-wide version of this script, to also support the busybox version of pmap there.