My Firefox froze in one of the tabs when in another tab I had a long Fry-IT intranet blog half finished. To avoid having to rewrite the whole text again Jan showed me how to dump the RAM memory onto disk which I could then look through with standard tools. For this to work you have plenty of diskspace since the dump file is about 1Gb big:


$ sudo su -
# df -h
# cat /proc/kcore > /usr/kcore.dump
# strings /usr/kcore.dump > /usr/kcore.strings
# ls -lh | grep kcore
-rw-r--r--   1 root    root    1016M 2006-10-30 10:18 kcore.dump
-rw-r--r--   1 root    root      74M 2006-10-30 10:19 kcore.strings
# less kcore.strings | grep 'Bla bla bla'

Was this the most boring blog item I've written in a long time? Maybe, but it's good to have it noted the next time Firefox crashes.

Comments

Jean Jordaan

Heh! This works too, and the first thing it finds is your blog entry that I'm looking at::

klippie net # strings /proc/kcore | grep "Bla bla bla"
# less kcore.strings | grep 'Bla bla bla'

Then it starts finding itself over and over again::

strings /proc/kcore | grep "Bla bla bla"
etc etc etc ..

Anonymous

i have a memory dump will this soultion help because alot of them havent

nemo

Check this tool out: "msramdmp: McGrew Security RAM Dumper", I'm pretty sure you will get a kick out of it ;)
//-------------------------------------
Information Security Comments
http://cryptoexperts.blogspot.com
//-------------------------------------

Earthwind

It's much eiaser to understand when you put it that way!

Your email will never ever be published.

Previous:
Oxfordtube's website sucks October 30, 2006
Next:
Crazy road in China November 6, 2006 Misc. links
Related by category:
set -ex - The most useful bash trick of the year August 31, 2014 Linux
brotli_static in Nginx November 8, 2024 Linux
Be very careful with your add_header in Nginx! You might make your site insecure February 11, 2018 Linux
Linux tip: du --max-depth=1 September 27, 2007 Linux
Related by keyword:
Button tag in bloody Internet Explorer August 9, 2005 Web development
zope-memory-readings - Tracking Zope2's memory usage by URL May 30, 2008 Zope
Getting uploadify to work July 17, 2009 Web development
Future of Web Apps (quick summary and thoughts) October 4, 2007 Web development