1.\" $NetBSD: rump_allserver.1,v 1.8 2011/01/08 09:36:26 pooka Exp $ 2.\" 3.\" Copyright (c) 2010 Antti Kantee. All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.Dd January 3, 2011 27.Dt RUMP_SERVER 1 28.Os 29.Sh NAME 30.Nm rump_server , 31.Nm rump_allserver 32.Nd rump kernel server 33.Sh SYNOPSIS 34.Nm 35.Op Fl s 36.Op Fl c Ar ncpu 37.Op Fl d Ar drivespec 38.Op Fl l Ar library 39.Op Fl m Ar module 40.Ar url 41.Sh DESCRIPTION 42The 43.Nm 44utility is used to provide a rump kernel service. 45Clients can use the system calls provided by 46.Nm 47via 48.Ar url . 49.Pp 50The difference between 51.Nm 52and 53.Nm rump_allserver 54is that 55.Nm 56offers only a minimalistic set of features, 57while 58.Nm rump_allserver 59provides all rump kernel components which were available when the 60system was built. 61At execution time it is possible to load components from the command 62line as described in the options section. 63.Bl -tag -width indent 64.It Fl c Ar ncpu 65Configure 66.Ar ncpu 67virtual CPUs on SMP-capable archs. 68By default, the number of CPUs equals the number of CPUs on the 69host. 70.It Fl d Ar drivespec 71The argument 72.Ar drivespec 73maps a host file a block device in the rump fs namespace. 74The string 75.Ar drivespec 76must be of comma-separated 77.Dq name=value 78format and must contain the following tokens: 79.Bl -tag -width hostpath1234 80.It Ar key 81Block device path in rump namespace. 82This must be specified according to the rules for a key in 83.Xr rump_etfs 3 . 84.It Ar hostpath 85Host file used for storage. 86If the file does not exist, it will be created. 87.It Ar size 88Size of the mapping. 89The host file will be truncated to the size indicated. 90Similar to 91.Xr dd 1 , 92this argument accepts a suffix as the multiplier for the number. 93.El 94.It Fl l Ar library 95Call 96.Fn dlopen 97on library before initializing the rump kernel. 98In case 99.Ar library 100provides a kernel module, it will appear as a builtin module in the 101rump kernel. 102Any rump component present in 103.Ar library 104will also be initialized. 105.Pp 106The argument 107.Ar library 108can contain a full path or a filename, in which case the standard 109dynamic library search path will be used. 110Libraries are loaded in the order they are given. 111Dependencies are not autoloaded, and the order must be specified 112correctly. 113.It Fl m Ar module 114Load and link a kernel module after the rump kernel is initialized. 115For this to work, the rump kernel must include the vfs faction, 116since the module is loaded using kernel vfs code (see 117.Sx EXAMPLES ) . 118.It Fl s 119Do not detach from the terminal. 120By default, 121.Nm 122detaches from the terminal once the service is running on 123.Ar url . 124.El 125.Pp 126After use, 127.Nm 128can be made to exit using 129.Xr rump.halt 1 . 130.Sh EXAMPLES 131Start a server and load the tmpfs file system module, and halt the 132server immediately afterwards: 133.Bd -literal -offset indent 134$ rump_server -lrumpvfs -m /modules/tmpfs.kmod unix://sock 135$ env RUMP_SERVER=unix://sock rump.halt 136.Ed 137.Pp 138Start a server with the one gigabyte host file 139.Pa dk.img 140mapped as the block device 141.Pa /dev/dk 142in the rump kernel. 143.Bd -literal -offset indent 144$ rump_allserver -d key=/dev/dk,hostpath=dk.img,size=1g unix://sock 145.Ed 146.Pp 147Start a server which listens on INADDR_ANY port 3755 148.Bd -literal -offset indent 149$ rump_server tcp://0:3755/ 150.Ed 151.Sh SEE ALSO 152.Xr rump.halt 1 , 153.Xr dlopen 3 , 154.Xr rump 3 155