Re: Regarding /proc/<pid>/status

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

 



--- shivaligupta <shivaligupta308@xxxxxxxxx> wrote:

> Mulyadi Santosa wrote:
> 
> >Dear shivaligupta
> >
> >  
> >
> >>But in the below given example VmSize >> VmLib +
> VmExe + VmData
> >>+VmStk what does that indicate?
> >>
> >>bash-2.05b# cat /proc/16108/status
> >>Name:   thunderbird
> >>State:  S (sleeping)
> >>Tgid:   16108
> >>Pid:    16108
> >>PPid:   4436
> >>TracerPid:      0
> >>Uid:    0       0       0       0
> >>Gid:    0       0       0       0
> >>FDSize: 256
> >>Groups: 0 1 2 3 4 6 10
> >>VmSize:     4156 kB
> >>VmLck:         0 kB
> >>VmRSS:         4 kB
> >>VmData:      108 kB
> >>VmStk:        24 kB
> >>VmExe:       592 kB
> >>VmLib:      1312 kB
> >>    
> >>
> >
> >As you can see there, VmSize is bigger than the
> total. Why? Because 
> >VmSize represent the size of all allocated VMA. A
> size of all VMAs 
> >doesn't equal to current memory consumption,
> because the page might not 
> >exist there
> >  
> >
> Then the page will be in swap space.(plz correct me
> if i m wrong)
> How can i know how much memory this process has
> taken in swap?
> I guess that stack and heap will always be in
> memory. so is it like
> that the memory consumed in swap is because of code
> segment + data segment.
> 
> 

Code pages are not swapped. They have a disk backed-up

file, so they are not eligible for swapping.
They can be brought into memory from disk,
if their pages have been removed, whenever required. 
Only the data & stack needs swapping.

Try also /proc/$PID/statm for getting more memory
related information .

Cheers !




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           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