add command line options for kernel memory allocation limit and bootverbose
This commit is contained in:
parent
48553d3a03
commit
29d11b7713
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: rump_allserver.1,v 1.15 2011/02/18 09:54:03 pooka Exp $
|
||||
.\" $NetBSD: rump_allserver.1,v 1.16 2011/02/21 18:50:21 pooka Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2010 Antti Kantee. All rights reserved.
|
||||
.\"
|
||||
|
@ -23,7 +23,7 @@
|
|||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd February 17, 2011
|
||||
.Dd February 21, 2011
|
||||
.Dt RUMP_SERVER 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -159,12 +159,23 @@ Load and link a kernel module after the rump kernel is initialized.
|
|||
For this to work, the rump kernel must include the vfs faction,
|
||||
since the module is loaded using kernel vfs code (see
|
||||
.Sx EXAMPLES ) .
|
||||
.It Fl r Ar total_ram
|
||||
Sets the limit of kernel memory allocatable by the server to
|
||||
.Ar total_ram
|
||||
as opposed to the default which allows the server to allocate as much
|
||||
memory as the host will give it.
|
||||
This parameter is especially useful for VFS servers, since by
|
||||
default the virtual file system will attempt to consume as much
|
||||
memory as it can, and accessing large files can cause an excessive
|
||||
amount of memory to be used as file system cache.
|
||||
.It Fl s
|
||||
Do not detach from the terminal.
|
||||
By default,
|
||||
.Nm
|
||||
detaches from the terminal once the service is running on
|
||||
.Ar url .
|
||||
.It Fl v
|
||||
Set bootverbose.
|
||||
.El
|
||||
.Pp
|
||||
After use,
|
||||
|
@ -192,6 +203,11 @@ Start a server which listens on INADDR_ANY port 3755
|
|||
.Bd -literal -offset indent
|
||||
$ rump_server tcp://0:3755/
|
||||
.Ed
|
||||
.Pp
|
||||
Start a FFS server with a 16MB kernel memory limit.
|
||||
.Bd -literal -offset indent
|
||||
$ rump_server -lrumpvfs -lrumpfs_ffs -r 16m unix:///tmp/ffs_server
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.Xr rump.halt 1 ,
|
||||
.Xr dlopen 3 ,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump_allserver.c,v 1.19 2011/02/18 09:54:03 pooka Exp $ */
|
||||
/* $NetBSD: rump_allserver.c,v 1.20 2011/02/21 18:50:21 pooka Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
|
||||
|
@ -27,7 +27,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: rump_allserver.c,v 1.19 2011/02/18 09:54:03 pooka Exp $");
|
||||
__RCSID("$NetBSD: rump_allserver.c,v 1.20 2011/02/21 18:50:21 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -126,7 +126,7 @@ main(int argc, char *argv[])
|
|||
setprogname(argv[0]);
|
||||
|
||||
sflag = 0;
|
||||
while ((ch = getopt(argc, argv, "c:d:l:m:s")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "c:d:l:m:r:sv")) != -1) {
|
||||
switch (ch) {
|
||||
case 'c':
|
||||
ncpu = atoi(optarg);
|
||||
|
@ -299,9 +299,15 @@ main(int argc, char *argv[])
|
|||
}
|
||||
modarray[curmod++] = optarg;
|
||||
break;
|
||||
case 'r':
|
||||
setenv("RUMP_MEMLIMIT", optarg, 1);
|
||||
break;
|
||||
case 's':
|
||||
sflag = 1;
|
||||
break;
|
||||
case 'v':
|
||||
setenv("RUMP_VERBOSE", "1", 1);
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
/*NOTREACHED*/
|
||||
|
|
Loading…
Reference in New Issue