[Crash-utility] How to parse out kmem output?

Lei Wen adrian.wenl at gmail.com
Sun Mar 24 11:41:31 UTC 2013


Hi list,

I am current tracking one issue related with memory.
What I want to know if a kernel address which is alloced by kmalloc,
1. whether that address is already freed or not
2. if not freed, could I know which task or struct is owning that range?

I am also try to use the kmem command to get more info,
but I don't know the meaning for its output...
Like "CACHE"/"ALLOCATED"/"TOTAL"/"SLABS" member,
what are they referring to?
And according to "FREE / [ALLOCATED]" as below, does it
mean that 0xe1416acc already be freed?

crash> kmem -S 0xe1416acc
CACHE    NAME                 OBJSIZE  ALLOCATED     TOTAL  SLABS  SSIZE
e0002400 kmalloc-2048            2048        156       160     10    32k
  SLAB      MEMORY    NODE  TOTAL  ALLOCATED  FREE
  c1628200  e1410000     0     12         12     0
  FREE / [ALLOCATED]
  [e1410000]
  [e1410800]
  [e1411000]
  [e1411800]
   e1412000  (cpu 0 cache)
   e1412800  (cpu 0 cache)
   e1413000  (cpu 0 cache)
   e1413800  (cpu 0 cache)
   e1414000  (cpu 0 cache)
   e1414800  (cpu 0 cache)
   e1415000  (cpu 0 cache)
  [e1415800]
crash>

Also seems current kmem only support SLAB, right?
If memory is allocated with like SLUB or SLOB, could the kmem
still handle it?

Thanks,
Lei




More information about the Crash-utility mailing list