[opensuse] pmap - "failed to parse"



Hello,

on my system kernel (3.0.26) I try to determine memory resources of
processes with pmap. But I get the error:

===================================
~# pmap 3020
failed to parse /proc/3020/smaps
===================================

(pid 3020 is for example the crond)



The file /proc/3020/smaps is readable and looks like this:

===================================================================
7feccc5b2000-7feccc5b4000 r-xp 00000000 fd:00 1379054
/lib64/libdl-2.11.3.so
Size: 8 kB
Rss: 0 kB
Pss: 0 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 0 kB
Referenced: 0 kB
Anonymous: 0 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
7feccc5b4000-7feccc7b4000 ---p 00002000 fd:00 1379054
/lib64/libdl-2.11.3.so
Size: 2048 kB
Rss: 0 kB
Pss: 0 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 0 kB
Referenced: 0 kB
Anonymous: 0 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
7feccc7b4000-7feccc7b5000 r--p 00002000 fd:00 1379054
/lib64/libdl-2.11.3.so
..
..
. (ASO)
===================================================================


If I start pmap with strace, the file is open and it reads 2 time 1024
bytes, then it ends.
===================================================================
~# strace -s2048 -f pmap 3020

..
..
..
brk(0x62a000) = 0x62a000
open("/proc/3020/maps", O_RDONLY) = 3
open("/proc/3020/smaps", O_RDONLY) = 4
write(1, "START SIZE RSS PSS DIRTY SWAP
PERM MAPPING\n", 70START SIZE RSS PSS DIRTY
SWAP PERM MAPPING
) = 70

fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f5346c18000

read(3, "7feccc5b2000-7feccc5b4000 r-xp 00000000 fd:00 1379054
/lib64/libdl-2.11.3.so\n7feccc5b4000-7feccc7b4000 ---p
00002000 fd:00 1379054
/lib64/libdl-2.11.3.so\n7feccc7b4000-7feccc7b5000 r--p 00002000 fd:00
1379054
/lib64/libdl-2.11.3.so\n7feccc7b5000-7feccc7b6000 rw-p 00003000 fd:00
1379054
/lib64/libdl-2.11.3.so\n7feccc7b6000-7feccc7cf000 r-xp 00000000 fd:00
1379140
/lib64/libaudit.so.0.0.0\n7feccc7cf000-7feccc9cf000 ---p 00019000
fd:00 1379140
/lib64/libaudit.so.0.0.0\n7feccc9cf000-7feccc9d0000 r--p 00019000
fd:00 1379140
/lib64/libaudit.so.0.0.0\n7feccc9d0000-7feccc9d1000 rw-p 0001a000
fd:00 1379140
/lib64/libaudit.so.0.0.0\n7feccc9d1000-7fecccb3c000 r-xp 00000000
fd:00 1379048
/lib64/libc-2.11.3.so\n7fecccb3c000-7fecccd3b000 ---p 0016b000 fd:00
1379048
/lib64/libc-2.11.3.so\n7fecccd3b000-7fecccd3f000 r--p 0016a000 fd:00
1379048 ", 1024) = 1024

fstat(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0

mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7f5346c17000

read(4, "7feccc5b2000-7feccc5b4000 r-xp 00000000 fd:00 1379054
/lib64/libdl-2.11.3.so\nSize: 8 kB\nRss:
0 kB\nPss: 0 kB\nShared_Clean:
0 kB\nShared_Dirty: 0 kB\nPrivate_Clean: 0
kB\nPrivate_Dirty: 0 kB\nReferenced: 0
kB\nAnonymous: 0 kB\nAnonHugePages: 0 kB\nSwap:
0 kB\nKernelPageSize: 4 kB\nMMUPageSize:
4 kB\nLocked: 0 kB\n7feccc5b4000-7feccc7b4000 ---p
00002000 fd:00 1379054
/lib64/libdl-2.11.3.so\nSize: 2048 kB\nRss:
0 kB\nPss: 0 kB\nShared_Clean: 0
kB\nShared_Dirty: 0 kB\nPrivate_Clean: 0
kB\nPrivate_Dirty: 0 kB\nReferenced: 0
kB\nAnonymous: 0 kB\nAnonHugePages: 0 kB\nSwap:
0 kB\nKernelPageSize: 4 kB\nMMUPageSize:
4 kB\nLocked: 0 kB\n7feccc7b4000-7feccc7b5000 r--p
00002000 fd:00 13", 1024) = 1024

write(2, "failed to parse /proc/3020/smaps\n", 33failed to parse
/proc/3020/smaps
) = 33
exit_group(1) = ?
===================================================================


On a similar System with kernel 2.6.32 pmap works.

The version from pmap is in both cases the same:

~ # pmap -V
procps version 3.2.7


Does anyone can help me. procps should work with kernel 3.x..

Thanks Meike
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx



Relevant Pages

  • Re: [opensuse] pmap - "failed to parse"
    ... but the test system is a native SLES11SP2 with all patches... ... How should I update "pmap / procps"? ... on my system kernel I try to determine memory resources of ... It does need a pmap / procps update and we will be providing one for SLES 11 SP2 ...
    (SuSE)
  • Re: [opensuse] pmap - "failed to parse"
    ... but the test system is a native SLES11SP2 with all patches... ... How should I update "pmap / procps"? ... To contact the owner, e-mail: ...
    (SuSE)
  • Re: Finding map of shared memory
    ... >> man pmap ... >> The last two require a recent procps package. ... Michael Heiming ...
    (comp.os.linux.misc)
  • Re: [opensuse] pmap - "failed to parse"
    ... on my system kernel I try to determine memory resources of ... processes with pmap. ... failed to parse /proc/3020/smaps ...
    (SuSE)