LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Write data from user level to RAM file (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/write-data-from-user-level-to-ram-file-828363/)

zvivered 08-25-2010 06:29 AM

Write data from user level to RAM file
 
Hi,

I'm using vanilla 2.6.27.35 with busybox on a Pentium M SBC.

What RAM based file system should I use to print messages from a user level application to a file (which is on RAM) ?

Can I use "proc" for this purpose ?

Thanks.

theNbomr 08-25-2010 08:36 AM

/proc is a virtual filesystem provided by the kernel to transport key info to userspace, and occasionally from userspace to the kernel. I have also been search for a filesystem to put on an NVRAM memory segment. So far, my best thought is to create my own simple filesystem back-end in userspace, using fuse as the front end. I was sure there must be a better way, but so far, I haven't found anything. My application is for non-volatile storage on a diskless SBC; sounds similar to your application.
--- rod.

zvivered 08-27-2010 12:10 AM

Quote:

Originally Posted by theNbomr (Post 4077191)
/proc is a virtual filesystem provided by the kernel to transport key info to userspace, and occasionally from userspace to the kernel. I have also been search for a filesystem to put on an NVRAM memory segment. So far, my best thought is to create my own simple filesystem back-end in userspace, using fuse as the front end. I was sure there must be a better way, but so far, I haven't found anything. My application is for non-volatile storage on a diskless SBC; sounds similar to your application.
--- rod.

I think I mislead you. I do not need a nanvolatile media.
just a file located in RAM that will hold data till reboot/shutdown.
What is the optimal way to do it ?
Thanks.

syg00 08-27-2010 02:23 AM

"optimal" is highly subjective.
Use tmpfs - you don't even need to do a mkfs on it, just create files on it.


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