Find the answer to your Linux question:
Results 1 to 10 of 10
I use linux and unix and run aplication. How I can use command top , vmstat ,free ...etc existing command to find out there is memory leaking ??? Please give ...
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    44

    memory leaking

    I use linux and unix and run aplication.
    How I can use command top , vmstat ,free ...etc
    existing command to find out there is memory leaking ???
    Please give me example .
    It is not allow to use compiler to compile the program /tool.

  2. #2
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309
    Welcome
    you have to put this comand in terminal as local user or root user and press enter see output
    [ved@localhost ~]$ free
    total used free shared buffers cached
    Mem: 443724 435876 7848 0 20724 149932
    -/+ buffers/cache: 265220 178504
    Swap: 2098168 39352 2058816
    [ved@localhost ~]$ free
    total used free shared buffers cached
    Mem: 443724 428236 15488 0 19140 135056
    -/+ buffers/cache: 274040 169684
    Swap: 2098168 42480 2055688
    [ved@localhost ~]$ cat /proc/meminfo
    MemTotal: 443724 kB
    MemFree: 14388 kB
    Buffers: 19300 kB
    Cached: 135544 kB
    SwapCached: 7076 kB
    Active: 171792 kB
    Inactive: 204676 kB
    Active(anon): 87140 kB
    Inactive(anon): 139932 kB
    Active(file): 84652 kB
    Inactive(file): 64744 kB
    Unevictable: 0 kB
    Mlocked: 0 kB
    HighTotal: 0 kB
    HighFree: 0 kB
    LowTotal: 443724 kB
    LowFree: 14388 kB
    SwapTotal: 2098168 kB
    SwapFree: 2055688 kB
    Dirty: 40 kB
    Writeback: 0 kB
    AnonPages: 215676 kB
    Mapped: 82244 kB
    Shmem: 5444 kB
    Slab: 28380 kB
    SReclaimable: 15676 kB
    SUnreclaim: 12704 kB
    KernelStack: 2208 kB
    PageTables: 9568 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 2320028 kB
    Committed_AS: 1253224 kB
    VmallocTotal: 572472 kB
    VmallocUsed: 12508 kB
    VmallocChunk: 554084 kB
    HardwareCorrupted: 0 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 2048 kB
    DirectMap4k: 13248 kB
    DirectMap2M: 444416 kB
    [ved@localhost ~]$
    or read this
    Linux memory leak?

  3. #3
    Just Joined!
    Join Date
    Aug 2009
    Posts
    44
    Quote Originally Posted by ved View Post
    Welcome
    you have to put this comand in terminal as local user or root user and press enter see output
    [ved@localhost ~]$ free
    total used free shared buffers cached
    Mem: 443724 435876 7848 0 20724 149932
    -/+ buffers/cache: 265220 178504
    Swap: 2098168 39352 2058816
    [ved@localhost ~]$ free
    total used free shared buffers cached
    Mem: 443724 428236 15488 0 19140 135056
    -/+ buffers/cache: 274040 169684
    Swap: 2098168 42480 2055688
    [ved@localhost ~]$ cat /proc/meminfo
    MemTotal: 443724 kB
    MemFree: 14388 kB
    Buffers: 19300 kB
    Cached: 135544 kB
    SwapCached: 7076 kB
    Active: 171792 kB
    Inactive: 204676 kB
    Active(anon): 87140 kB
    Inactive(anon): 139932 kB
    Active(file): 84652 kB
    Inactive(file): 64744 kB
    Unevictable: 0 kB
    Mlocked: 0 kB
    HighTotal: 0 kB
    HighFree: 0 kB
    LowTotal: 443724 kB
    LowFree: 14388 kB
    SwapTotal: 2098168 kB
    SwapFree: 2055688 kB
    Dirty: 40 kB
    Writeback: 0 kB
    AnonPages: 215676 kB
    Mapped: 82244 kB
    Shmem: 5444 kB
    Slab: 28380 kB
    SReclaimable: 15676 kB
    SUnreclaim: 12704 kB
    KernelStack: 2208 kB
    PageTables: 9568 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 2320028 kB
    Committed_AS: 1253224 kB
    VmallocTotal: 572472 kB
    VmallocUsed: 12508 kB
    VmallocChunk: 554084 kB
    HardwareCorrupted: 0 kB
    HugePages_Total: 0
    HugePages_Free: 0
    HugePages_Rsvd: 0
    HugePages_Surp: 0
    Hugepagesize: 2048 kB
    DirectMap4k: 13248 kB
    DirectMap2M: 444416 kB
    [ved@localhost ~]$
    or read this
    Linux memory leak?
    What is the relationship between "free" and "meminfo"
    Which is the actual free memory ??Which is memory leakage ???
    Pleae give detailed example .

  4. #4
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309

    What is the relationship between "free" and "meminfo"

    [ved@localhost ~]$ free
    total used free shared buffers cached
    Mem: 443724 421944 21780 0 15832 152308
    -/+ buffers/cache: 253804 189920
    Swap: 2098168 72304 2025864
    # it show total memory used memory and rest is free memory i .e 21780
    @ meminfo
    is show total memory =MemTotal: 443724 kB, memory used by process= ,
    free memory=MemFree: 21780 kB
    The actual free memory ??
    Free ram =21780
    Free swap = 2025864

    New members should read the "All New Users Read This First" thread and the "Forum Etiquette" post below before beginning to post.
    http://www.linuxforums.org/forum/lin...ead-first.html
    http://www.linuxforums.org/forum/lin...tions-2-a.html

  5. #5
    Just Joined!
    Join Date
    Aug 2009
    Posts
    44
    Quote Originally Posted by ved View Post
    [ved@localhost ~]$ free
    total used free shared buffers cached
    Mem: 443724 421944 21780 0 15832 152308
    -/+ buffers/cache: 253804 189920
    Swap: 2098168 72304 2025864
    # it show total memory used memory and rest is free memory i .e 21780
    @ meminfo
    is show total memory =MemTotal: 443724 kB, memory used by process= ,
    free memory=MemFree: 21780 kB
    so in your case the freemem is 14388 kB in meminfo
    in output of "free" command it is 21780 kB.
    So the memory leakage is 21780 -14388 ??
    Is it right ???
    Please advice .

  6. #6
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309

    Smile

    In both case case free memory is same
    that is 21780 and i think memory leaking is memory used by unwanted program
    Attached Files Attached Files

  7. #7
    Just Joined!
    Join Date
    Aug 2009
    Posts
    44
    Which one is larger if there is memory leakage ???
    the value in output of "free" or value in /proc/meminfo ???
    which one ???

  8. #8
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309

  9. #9
    Just Joined!
    Join Date
    Aug 2009
    Posts
    44
    so, what is first example ???
    What is the purpose ???
    Please describe .......
    I do not understand why you post first example .....

  10. #10
    ved
    ved is offline
    Linux User ved's Avatar
    Join Date
    Jan 2008
    Location
    New Delhi
    Posts
    309
    sorry for first example i put the comands after some time and when post the command
    data is not in sane sequence so sorry for that
    now Screenshot is give the same

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...