-   Linux - Embedded & Single-board computer (
-   -   Extracting a file in RAM File system when RAM dump is available (

sudheendrasp 04-18-2011 11:52 AM

Extracting a file in RAM File system when RAM dump is available
I have a RAM dump of my MIPS multi core processor and would like to extract a file which is part of the RAM filesystem for eg., /proc/stat.
Can someone guide the way with some pointer or wiki.

Thanks for any sort of help provided...

theNbomr 04-18-2011 02:54 PM

I will rephrase your question, to make sure I understand it correctly. You have a MIPS-based host running Linux, and you want to capture an entry in the /proc virtual filesystem to a file on disk.
First, the /proc filesystem is not really a filesystem at all; it is a virtual filesystem (VFS). What that means is that it is a set of configurations that the kernel exports to userspace using filesystem semantics. There is no actual data storage like what exists for a conventional files and directories. The data is all transient, reflecting the state of the kernel at the instant the virtual file is read (and in some cases, written to).
Having said this, as /proc does obey conventional filesystem semantics, it is possible to use things like cat to read the VFS, and therefore to redirect its output to conventional disk files:

cat /proc/stat > /home/LQsudheendrasp/procStat
Is this what you were looking for?

--- rod.

sudheendrasp 04-19-2011 01:03 AM

Hi rod...
I think I was not clear with my question. I will try and explain it in a better way.
I have the memory dump or image of RAM with me which contains kernel, apps etc., part of RAMFS and I want to extract any file which was part of filesystem. I dont have live kernel running as of now but have the memory image.
Thanks for your time!!

theNbomr 04-19-2011 08:58 AM

Ohh... that is much different. Sorry I cannot help with that.
--- rod.

All times are GMT -5. The time now is 05:41 PM.