Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ramfs(4) [plan9 man page]

RAMFS(4)						     Kernel Interfaces Manual							  RAMFS(4)

NAME
ramfs - memory file system SYNOPSIS
ramfs [ -i ] [ -s ] -m [ mountpoint ] DESCRIPTION
Ramfs starts a process that mounts itself (see bind(2)) on mountpoint (default /tmp). The ramfs process implements a file tree rooted at dir, keeping all files in memory. Initially the file tree is empty. The -i flag tells ramfs to use file descriptors 0 and 1 for its communication channel rather than create a pipe. This makes it possible to use ramfs as a file server on a remote machine: the file descriptors 0 and 1 will be the network channel from ramfs to the client machine. The -s flag causes ramfs to post its channel on /srv/ramfs rather than mounting it on mountpoint, enabling multiple clients to access its files. However, it does not authenticate its clients and its implementation of groups is simplistic, so it should not be used for precious data. This program is useful mainly as an example of how to write a user-level file server. It can also be used to provide high-performance tem- porary files. SOURCE
/sys/src/cmd/ramfs.c SEE ALSO
bind(2) RAMFS(4)

Check Out this Related Man Page

SRV(3)							     Library Functions Manual							    SRV(3)

NAME
srv - server registry SYNOPSIS
bind #s /srv #s/service1 #s/service2 ... DESCRIPTION
The srv device provides a one-level directory holding already-open channels to services. In effect, srv is a bulletin board on which pro- cesses may post open file descriptors to make them available to other processes. To install a channel, create a new file such as /srv/myserv and then write a text string (suitable for strtoul; see atof(2)) giving the file descriptor number of an open file. Any process may then open /srv/myserv to acquire another reference to the open file that was reg- istered. An entry in srv holds a reference to the associated file even if no process has the file open. Removing the file from /srv releases that reference. It is an error to write more than one number into a server file, or to create a file with a name that is already being used. EXAMPLE
To drop one end of a pipe into /srv, that is, to create a named pipe: int fd, p[2]; char buf[32]; pipe(p); fd = create("/srv/namedpipe", 1, 0666); sprint(buf, "%d", p[0]); write(fd, buf, strlen(buf)); close(fd); close(p[0]); write(p[1], "hello", 5); At this point, any process may open and read /srv/namedpipe to receive the hello string. Data written to /srv/namedpipe will be received by executing read(p[1], buf, sizeof buf); in the above process. SOURCE
/sys/src/9/port/devsrv.c SRV(3)
Man Page

5 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

RAMFS in Linux

Hi, RAMFS in Linux means what and how to use and where I will get more details and how to use ramfs in webservers like tomcat. Thanks in advanace, Bache Gowda (0 Replies)
Discussion started by: bache_gowda
0 Replies

2. Debian

change initramfs by hand?

What's the correct way to change the initramfs file that's used during boot? I know that it's a gzipped cpio archive, but when I gunzip, extract, re-archive (without changing any files), and gzip, then the result is that the system does not boot any more. And I even set the cpio archive type. ... (18 Replies)
Discussion started by: frankie06
18 Replies

3. Linux

initramfs on 2.4 kernel

Is there a patch available to support initramfs on the 2.4 kernel? We can't upgrade to 2.6 for legacy purposes. All I found on google were early references to how initramfs is better than the 2.4 initrd. Thanks much! (0 Replies)
Discussion started by: amoeba
0 Replies

4. Debian

Only have initramfs now...

Long story short, I had a ps3 with both Lenny and Sid repositories. Knowing this is a bad idea and that Lenny is being deprecated I decided I wanted to move everything to Sid. I changed my repos and ran apt-get-update, upgrade, dist-upgrade. Had one warning during the apt-get upgrade that... (0 Replies)
Discussion started by: Azrael
0 Replies

5. UNIX for Beginners Questions & Answers

Why bind to LiveCD /proc before building initramfs ?

Imagine I have an unbootable system where I need to update the kernel image using update-initramfs. I have seen numerous examples online which show the following $ mount -t proc none /mnt/ubuntu/proc $ mount -o bind /dev /mnt/ubuntu/dev $ mount -o bind /sys /mnt/ubuntu/sys After that we... (8 Replies)
Discussion started by: sreyan32
8 Replies