Skip to content

Adaptation on pmap output from OpenSUSE 12.3#3

Open
JanKovis wants to merge 1 commit intomilianw:masterfrom
JanKovis:patch-1
Open

Adaptation on pmap output from OpenSUSE 12.3#3
JanKovis wants to merge 1 commit intomilianw:masterfrom
JanKovis:patch-1

Conversation

@JanKovis
Copy link

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

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
@milianw
Copy link
Owner

milianw commented Oct 12, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants