Hi Pradeep,

PRDEEP KUMAR wrote:
> Hi max,
>
>  Is there a way/command to get no of memory segments on the system?
>  
>  And the segment informations like start address and size of the segments.
>
> -Pradeep
I can think of a way to do this, but first I must ask why you are 
interested.
Many of the segments will be shared between processes (such as libc text).
Are you looking for all segments, or only unique segments?  Do you want
this for processes plus the kernel?  Not all segments will have physical
pages mapped.  What do you want to do with this information?

At any rate, this will give you the number of VM (virtual memory) segments,
including the kernel:

# echo "::walk proc | ::print proc_t p_as | ::walk seg ! wc" | mdb -k

max


max
>
>
> On Tue, Apr 22, 2008 at 8:23 PM, [EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]> <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi Pradeep,
>
>
>     PRDEEP KUMAR wrote:
>
>         Hi All,
>
>          How can I see the  memory range used  by kernel in  solaris
>          on X86 system?
>          How can I see the  VA->PA mappings?
>
>          If you could give me the commands would be better,Otherwise
>         also ok.
>
>     # echo "p0::pmap" | mdb -k
>
>     or
>
>     # echo "kas::walk seg | ::seg" |  mdb -k
>
>     will give you base virtual address and virtual sizes for the
>     kernel's memory segments.
>
>     Walking the list of kernel pages to get physical page numbers:
>
>     # echo "kvp::walk page | ::print page_t p_pagenum" | mdb -k
>
>     should work (but may not be complete).  In general, if you have a
>     kernel virtual address,
>     # echo "virtual_address::vtop" | mdb -k
>
>     will give you the physical address.
>
>
>     max
>
>
>         Thanks,
>         Pradeep
>         
> ------------------------------------------------------------------------
>
>         _______________________________________________
>         opensolaris-code mailing list
>         [email protected]
>         <mailto:[email protected]>
>         http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
>          
>
>
>

_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to