xref: /netbsd-src/usr.sbin/perfused/perfused.8 (revision bdc22b2e01993381dcefeff2bc9b56ca75a4235c)
1.\" $NetBSD: perfused.8,v 1.12 2016/10/18 15:06:17 manu Exp $
2.\"
3.\" Copyright (c) 2010 Emmanuel Dreyfus. 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
15.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
18.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24.\" POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd January 29, 2012
27.Dt PERFUSED 8
28.Os
29.Sh NAME
30.Nm perfused
31.Nd PUFFS Enabled Relay to FUSE Daemon
32.Sh SYNOPSIS
33.Nm
34.Op Fl fs
35.Op Fl d Ar types
36.Op Fl i fd
37.Sh DESCRIPTION
38.Nm
39is a userland daemon implementing the FUSE kernel level API.
40It creates a
41.Pa /dev/fuse
42socket for FUSE file system daemons to connect to.
43.Nm
44takes care of mounting the file system using
45.Xr puffs 3 .
46.Pp
47When the kernel sends a
48.Xr puffs 3
49operation for the mounted file system,
50.Nm
51will translate it into a FUSE request, and will send it to the file system
52daemon through
53.Pa /dev/fuse .
54The FUSE reply will be converted back into a
55.Xr puffs 3
56reply and will be relayed to the kernel.
57.Pp
58FUSE file system daemons must be modified so that they request
59.Nm
60to perform the
61.Xr mount 2
62system call instead of doing it on their own.
63This is done by replacing
64.Xr mount 2
65and the
66.Xr open 2
67calls for
68.Pa /dev/fuse
69with
70.Fn perfuse_mount
71and
72.Fn perfuse_open ,
73respectively, in their sources.
74.Xr libperfuse 3
75must be used at link time.
76Most FUSE file system daemons use
77.Nm libfuse
78and will work unmodified, provided the modification is done in
79.Nm libfuse
80itself .
81.Pp
82The following options are available:
83.Bl -tag -width XdXtypesXX
84.It Fl d Ar types
85Print additional debug information.
86.Ar types
87is a comma-separated list of information types to print:
88.Bl -tag -width indent
89.It Ar puffs
90Display PUFFS requests and replies.
91.It Ar fuse
92Display FUSE requests and replies.
93.It Ar dump
94Dump content of FUSE frames.
95.It Ar fh
96Display file handle activity.
97.It Ar reclaim
98Display reclaim activity.
99.It Ar readdir
100Display readdir activity.
101.It Ar requeue
102Display requeue activity.
103.It Ar sync
104Display dirty flags and sync operations.
105.El
106.It Fl f
107Do not fork, but stay in the foreground.
108.It Fl i Ar fd
109Do not open
110.Pa /dev/fuse
111but use the socket available from the file descriptor
112.Ar fd .
113This is used when
114.Nm
115is started from
116.Xr libperfuse 3 .
117.It Fl s
118Enable debug output only when receiving
119.Li SIGINFO .
120.El
121.Sh ENVIRONMENT
122See
123.Xr libperfuse 3
124for environment variables affecting
125.Nm
126behavior.
127.Sh SIGNALS
128.Bl -tag -width indent
129.It Dv SIGINFO
130If the
131.Fl s
132flag was used, toggle debug output.
133Do nothing otherwise.
134.It Dv SIGUSR1
135Toggle FUSE operation dump on and off.
136When toggling off, the trace
137is is stored in
138.Pa /var/run/perfuse-xxx.trace
139(xxx is the filesystem mount point).
140.El
141.Sh ERRORS
142The program logs to the syslog daemon as facility
143.Dq daemon .
144For detailed debugging use the
145.Fl d
146(debug) option.
147.Sh SEE ALSO
148.Xr mount 2 ,
149.Xr perfuse_mount 3 ,
150.Xr puffs 4
151.Sh AUTHORS
152The program was written by
153.An Emmanuel Dreyfus
154.Aq manu@NetBSD.org .
155.Sh BUGS
156When
157.Nm
158runs in the foreground (using the
159.Fl f
160flag), some processes using the FUSE file system will
161sometime hang on
162.Sq uvn_fp2 .
163