Re: Detect memory leaks - Linux

This is a discussion on Re: Detect memory leaks - Linux ; Chris P. wrote: > Hi, > > I am having RH 7.3, apache, proftpd, spamassassin, mysql, chiliasp and a > bunch of other applications. I have memory leaks for sure because memory is > going to swap till 400MB and ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Re: Detect memory leaks

  1. Re: Detect memory leaks

    Chris P. wrote:
    > Hi,
    >
    > I am having RH 7.3, apache, proftpd, spamassassin, mysql, chiliasp and a
    > bunch of other applications. I have memory leaks for sure because memory is
    > going to swap till 400MB and server crash every few days. I have 1 GB of
    > RAM.
    >
    > I suspect that I have one or several applications that have memory leaks.
    > How I can trace this?
    >
    > Will a kill -1 release the memory? Is any remedy without a server restart?
    >
    > Is there any utility that will report the memory usage for a parent and all
    > its childs - a sum of used memory per type of process?
    >
    > I am looking also for any guide or URL link the I can use to tune Apache for
    > 500 sites, capacity planning or similar.
    >
    > Thank you,
    >
    > Chris P.
    >
    >


    First find out which application is leaking.

    'man top'
    The top program provides a dynamic real-time view of a running system.
    It can display system summary information as well as a list of tasks
    currently being managed by the Linux kernel.

    --
    Ben M.

    ----------------
    What are Software Patents for?
    To protect the small enterprise from bigger companies.

    What do Software Patents do?
    In its current form, they protect only companies with
    big legal departments as they:
    a.) Patent everything no matter how general
    b.) Sue everybody. Even if the patent can be argued
    invalid, small companies can ill-afford the
    typical $500k cost of a law-suit (not to mention
    years of harassment).

    Don't let them take away your right to program
    whatever you like. Make a stand on Software Patents
    before its too late.

    Read about the ongoing battle at http://swpat.ffii.org/
    ----------------

  2. Re: Detect memory leaks

    I tried already top - is not enough it does not provide relevant information. I have a script that run top every minute
    and log the results. However it does not provide enough info.

    How can I see what parent processes have lots of allocated memory in swap?

    Chris











    "Ben Measures" wrote in message
    news:vHh2c.5102$h_.3552@news-binary.blueyonder.co.uk...
    Chris P. wrote:
    > Hi,
    >
    > I am having RH 7.3, apache, proftpd, spamassassin, mysql, chiliasp and a
    > bunch of other applications. I have memory leaks for sure because memory is
    > going to swap till 400MB and server crash every few days. I have 1 GB of
    > RAM.
    >
    > I suspect that I have one or several applications that have memory leaks.
    > How I can trace this?
    >
    > Will a kill -1 release the memory? Is any remedy without a server restart?
    >
    > Is there any utility that will report the memory usage for a parent and all
    > its childs - a sum of used memory per type of process?
    >
    > I am looking also for any guide or URL link the I can use to tune Apache for
    > 500 sites, capacity planning or similar.
    >
    > Thank you,
    >
    > Chris P.
    >
    >


    First find out which application is leaking.

    'man top'
    The top program provides a dynamic real-time view of a running system.
    It can display system summary information as well as a list of tasks
    currently being managed by the Linux kernel.

    --
    Ben M.

    ----------------
    What are Software Patents for?
    To protect the small enterprise from bigger companies.

    What do Software Patents do?
    In its current form, they protect only companies with
    big legal departments as they:
    a.) Patent everything no matter how general
    b.) Sue everybody. Even if the patent can be argued
    invalid, small companies can ill-afford the
    typical $500k cost of a law-suit (not to mention
    years of harassment).

    Don't let them take away your right to program
    whatever you like. Make a stand on Software Patents
    before its too late.

    Read about the ongoing battle at http://swpat.ffii.org/
    ----------------



  3. Re: Detect memory leaks

    Zorba@nonexistent.com wrote:
    > I tried already top - is not enough it does not provide relevant information. I have a script that run top every minute
    > and log the results. However it does not provide enough info.
    >
    > How can I see what parent processes have lots of allocated memory in swap?
    >
    > Chris


    Errr, you sure you had a good look at top?

    top - 23:55:29 up 17:03, 3 users, load average: 0.38, 0.44, 0.29
    Tasks: 71 total, 4 running, 67 sleeping, 0 stopped, 0 zombie
    Cpu(s): 9.3% user, 4.3% system, 0.0% nice, 86.4% idle
    Mem: 483564k total, 475212k used, 8352k free, 16512k buffers
    Swap: 506036k total, 3496k used, 502540k free, 325848k cached


    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    19430 root 17 0 280m 24m 9868 S 6.6 5.2 0:08.22 X
    19567 ben 15 0 10360 10m 7160 R 3.6 2.1 0:01.11 gnome-terminal
    19561 ben 12 0 13324 13m 9020 R 1.7 2.8 0:02.64 rhythmbox
    19590 ben 10 0 1008 1008 804 R 0.7 0.2 0:00.10 top

    'man top'
    ---------
    The top program provides a dynamic real-time view of a running system.

    [snip]

    -d : Delay time interval as: -d ss.tt (seconds.tenths)
    Specifies the delay between screen updates

    [snip]

    p: SWAP -- Swapped size (kb)
    The swapped out portion of a task's total virtual memory image.

    q: RES -- Resident size (kb)
    The non-swapped physical memory a task has used.

    [snip]

    o: VIRT -- Virtual Image (kb)
    The total amount of virtual memory used by the task.
    VIRT = SWAP + RES.


    Seriously, what more do you want? (Please don't tell me you didn't read
    the manpages...)

    --
    Ben M.

    ----------------
    What are Software Patents for?
    To protect the small enterprise from bigger companies.

    What do Software Patents do?
    In its current form, they protect only companies with
    big legal departments as they:
    a.) Patent everything no matter how general
    b.) Sue everybody. Even if the patent can be argued
    invalid, small companies can ill-afford the
    typical $500k cost of a law-suit (not to mention
    years of harassment).

    Don't let them take away your right to program
    whatever you like. Make a stand on Software Patents
    before its too late.

    Read about the ongoing battle at http://swpat.ffii.org/
    ----------------

+ Reply to Thread