vailixi Posted October 15, 2015 Share Posted October 15, 2015 I want to just dump my memory to a file. There are a lot of references to /dev/mem and /dev/crash but when I try to use those file locations I get file or directory not found.How do I go about this? Quote Link to comment Share on other sites More sharing options...
digip Posted October 15, 2015 Share Posted October 15, 2015 (edited) It's usually disabled in the kernel, but if you are root, you should be able to use the dd command like you would for disk copying to save a memory dump if it's enabled. Example: dd if=/dev/kmem of=/root/kmem I always forget the dd syntax, and remember it like "data dump input file=/yourfile outputfile=/yourlocationtocopy" which saves it to "kmem" in /root. If kmem doesn't work, try /dev/mem instead, but again, these could be disabled by default in the kernel. kmem holds the swap file too apparently, so if this is really large, make sure you have the room for everything you want to dump to disk. edit: not sure exactly what you were tryign to do, but also came across - http://serverfault.com/questions/173999/dump-a-linux-processs-memory-to-file if you wanted to attach to a process and dump just that process, which might be useful if thats all you needed. Edited October 15, 2015 by digip Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.