[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Dealing with a memory leak
From: Frederik Schwarzer <schwarzerf () gmail ! com>
Date: 2009-11-19 10:51:23
Message-ID: 200911191151.23452.schwarzerf () gmail ! com
[Download RAW message or body]
[Anne Wilson | Thursday 19 November 2009]
> Is there any way at all that I could set an alarm when available swap
> memory reaches a certain low point?
>
> I have been having some horrible freezes for the last 2-3 weeks.
> Basically the system would suddenly become unresponsive. A mouse click
> would take literally two minutes to activate, and it was almost
> impossible to get keystrokes to be accepted at all. Whenever I managed
> to see what was happening in top there was nothing obvious in the
> applications list, but memory was totally used, including swap, with 0%
> available. If I could catch it in time recovery was possible, but if
> it gets to 0% reboot seems to be the only way out.
>
> As you know I do a lot of work on userbase, and I often have many tabs
> open as I refer to other pages. For quite a while I blamed Firefox for
> the problems I was having, since if I could get firefox closed and kill
> nspluginviewer I could always recover. After a few of these I decided
> that I just wouldn't use Firefox, and I started working in Konqueror.
> To my shock and horror I found that the same thing could happen there.
> I'd be fine for quite some time, then suddenly it would freeze and I'd
> lose my work. It was obviously worse when I had many tabs open.
>
> So - I suspect nspluginviewer. I haven't yet searched for bug reports -
> I'll do that today - and I need to gather more info before I attempt to
> file one, but the greatest help, for now, would be some way to warn me
> when the swap available gets below, say 250KB. The last bit of swap
> seems to disappear so quickly that I need to react immediately to save
> work.
>
> Thanks for reading. I hope what I ask is possible.
No idea how usable this is but for me, the following command line does its
job. It polls every 5 seconds and shows a notification if the swap goes
below 512MB.
while true; do if [[ `cat /proc/meminfo|grep "SwapFree"|sed
s/'[^0123456789]//g'` -lt 524288 ]]; then kdialog --passivepopup 'Swap
depleting' 30; fi; sleep 5s; done
(remove the newlines)
Hope it helps (or rather: hope someone has a less hackish idea :))
Regards
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic