Re: viewing memory ??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2008/4/27 William Case <billlinux@xxxxxxxxxx>:
> Hi;
>
>  I am not sure I am posing this question correctly, so please view it
>  from the perspective of where I am trying to get to.
>
>  I have recently taken up the "kernel" challenge.
>
>  The text books I have all show a schematic of memory organization.
>  First BIOS; Next kernel space; then user space; with various
>  subdivisions within each space.
>
>  Is there a program I can download, or by using sysfs, procfs a way, that
>  lets me catch a snapshot of what my entire memory looks like -- address
>  by address grouping (block)-- with some type of labels for each grouping
>  (block)?  I am willing to build a diagram for myself, if I can be
>  assured that some strategy will give me everything.
>
>  Even if it is a lot of data, it is a, sort of, one time thing.  More in
>  the seeing-is-believing line of thought than anything else.

I'm not sure this is all you want/need, but perhaps it is :)

There is
cat /proc/meminfo

And also
cat /proc/vmstat

Then there's the slabinfo tool which can also show a lot of details:
juhl@dragon:~/kernel/linux-2.6$ gcc -o slabinfo Documentation/vm/slabinfo.c
juhl@dragon:~/kernel/linux-2.6$ ./slabinfo -h
slabinfo 5/7/2007. (c) 2007 sgi. clameter@xxxxxxx

slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]
-a|--aliases           Show aliases
-A|--activity          Most active slabs first
-d<options>|--debug=<options> Set/Clear Debug options
-D|--display-active    Switch line format to activity
-e|--empty             Show empty slabs
-f|--first-alias       Show first alias
-h|--help              Show usage information
-i|--inverted          Inverted list
-l|--slabs             Show slabs
-n|--numa              Show NUMA information
-o|--ops                Show kmem_cache_ops
-s|--shrink            Shrink slabs
-r|--report             Detailed report on single slabs
-S|--Size              Sort by size
-t|--tracking          Show alloc/free information
-T|--Totals            Show summary information
-v|--validate          Validate slabs
-z|--zero              Include empty slabs
-1|--1ref              Single reference

Valid debug options (FZPUT may be combined)
a / A          Switch on all debug options (=FZUP)
-              Switch off all debug options
f / F          Sanity Checks (SLAB_DEBUG_FREE)
z / Z          Redzoning
p / P          Poisoning
u / U          Tracking
t / T          Tracing

Lots of details can also be found in various files in /sys/kernel/slab/

Hope that helps :)

-- 
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux