]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/amd/amq/amq.8
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / amd / amq / amq.8
1 .\"
2 .\" Copyright (c) 1997-2006 Erez Zadok
3 .\" Copyright (c) 1990 Jan-Simon Pendry
4 .\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
5 .\" Copyright (c) 1990 The Regents of the University of California.
6 .\" All rights reserved.
7 .\"
8 .\" This code is derived from software contributed to Berkeley by
9 .\" Jan-Simon Pendry at Imperial College, London.
10 .\"
11 .\" Redistribution and use in source and binary forms, with or without
12 .\" modification, are permitted provided that the following conditions
13 .\" are met:
14 .\" 1. Redistributions of source code must retain the above copyright
15 .\"    notice, this list of conditions and the following disclaimer.
16 .\" 2. Redistributions in binary form must reproduce the above copyright
17 .\"    notice, this list of conditions and the following disclaimer in the
18 .\"    documentation and/or other materials provided with the distribution.
19 .\" 3. All advertising materials mentioning features or use of this software
20 .\"    must display the following acknowledgment:
21 .\"      This product includes software developed by the University of
22 .\"      California, Berkeley and its contributors.
23 .\" 4. Neither the name of the University nor the names of its contributors
24 .\"    may be used to endorse or promote products derived from this software
25 .\"    without specific prior written permission.
26 .\"
27 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 .\" SUCH DAMAGE.
38 .\"
39 .\"     %W% (Berkeley) %G%
40 .\"
41 .\" $Id: amq.8,v 1.15.2.1 2006/01/02 18:48:24 ezk Exp $
42 .\" $FreeBSD$
43 .\"
44 .Dd January 2, 2006
45 .Dt AMQ 8
46 .Os
47 .Sh NAME
48 .Nm amq
49 .Nd automounter query tool
50 .Sh SYNOPSIS
51 .Nm
52 .Op Fl fmpsvwHTU
53 .Op Fl h Ar hostname
54 .Op Fl l Ar log_file
55 .Op Fl x Ar log_options
56 .Op Fl D Ar debug_options
57 .Op Fl P Ar program_number
58 .Op Oo Fl u Oc Ar directory ...
59 .Sh DESCRIPTION
60 The
61 .Nm
62 utility
63 provides a simple way of determining the current state of the
64 .Xr amd 8
65 program.
66 Communication is by
67 .Tn RPC .
68 Three modes of operation are supported by the current protocol.
69 By default
70 a list of mount points and auto-mounted file systems is output.
71 An
72 alternative host can be specified using the
73 .Fl h
74 option.
75 .Pp
76 If
77 .Ar directory
78 names are given, as output by default, then per file system
79 information is displayed.
80 .Sh OPTIONS
81 .Bl -tag -width indent
82 .It Fl f
83 Ask the automounter to flush the internal caches and reload all the maps.
84 .It Fl h Ar hostname
85 Specify an alternate host to query.
86 By default the local host is used.
87 In
88 an
89 .Tn HP-UX
90 cluster, the root server is queried by default, since that is the system on
91 which the automounter is normally run.
92 .It Fl l Ar log_file
93 Tell
94 .Xr amd 8
95 to use
96 .Ar log_file
97 as the log file name.
98 For security reasons, this must be the same log file
99 which
100 .Xr amd 8
101 used when started.
102 This option is therefore only useful to
103 refresh
104 .Nm amd Ns 's
105 open file handle on the log file, so that it can be rotated
106 and compressed via daily cron jobs.
107 .It Fl m
108 Ask the automounter to provide a list of mounted file systems, including the
109 number of references to each file system and any error which occurred while
110 mounting.
111 .It Fl p
112 Return the process ID of the remote or locally running
113 .Xr amd 8 .
114 Useful when you
115 need to send a signal to the local
116 .Xr amd 8
117 process, and would rather not have to
118 search through the process table.
119 This option is used in the
120 .Pa ctl-amd
121 script.
122 .It Fl s
123 Ask the automounter to provide system-wide mount statistics.
124 .It Fl u
125 Ask the automounter to unmount the file systems named in
126 .Ar directory
127 instead of providing
128 information about them.
129 Unmounts are requested, not forced.
130 They merely
131 cause the mounted file system to timeout, which will be picked up by
132 .Nm amd Ns 's
133 main scheduler thus causing the normal timeout action to be taken.
134 .It Fl v
135 Ask the automounter for its version information.
136 This is a subset of the
137 information output by
138 .Xr amd 8 Ns 's
139 .Fl v
140 option.
141 .It Fl w
142 Translate a full pathname as returned by
143 .Xr getcwd 3
144 into a short
145 .Xr amd 8
146 pathname that goes through its mount points.
147 This option requires that
148 .Xr amd 8
149 is running.
150 .It Fl x Ar log_options
151 Ask the automounter to use the logging options specified in
152 .Ar log_options
153 from now on.
154 .It Fl D Ar debug_options
155 Ask the automounter to use the debugging options specified in
156 .Ar debug_options
157 from now on.
158 .It Fl H
159 Display short usage message.
160 .It Fl P Ar program_number
161 Contact an alternate running
162 .Xr amd 8
163 that had registered itself on a different
164 .Tn RPC
165 .Ar program_number
166 and apply all other operations to that instance of the automounter.
167 This is
168 useful when you run multiple copies of
169 .Xr amd 8 ,
170 and need to manage each
171 one separately.
172 If not specified,
173 .Nm
174 will use the default program number for
175 .Xr amd 8 ,
176 300019.
177 For security reasons, the only alternate program numbers
178 .Xr amd 8
179 can use range from 300019 to 300029, inclusive.
180 .It Fl T
181 Contact
182 .Xr amd 8
183 using the TCP transport only.
184 Normally
185 .Nm
186 will try TCP, and if that failed, will try UDP.
187 .It Fl U
188 Contact
189 .Xr amd 8
190 using UDP (connectionless) transport only.
191 Normally
192 .Nm
193 will try TCP, and if that failed, will try UDP.
194 .El
195 .Sh FILES
196 .Bl -tag -width ".Pa amq.x" -compact
197 .It Pa amq.x
198 .Tn RPC
199 protocol description.
200 .El
201 .Sh CAVEATS
202 The
203 .Nm
204 utility
205 uses a Sun registered
206 .Tn RPC
207 program number (300019 decimal) which may not
208 be in the
209 .Xr rpc 5
210 database.
211 .Pp
212 If the TCP wrappers library is available, and the
213 .Va use_tcpwrappers
214 global
215 .Xr amd.conf 5
216 option is set to
217 .Dq Li yes ,
218 then
219 .Xr amd 8
220 will verify that the host running
221 .Nm
222 is authorized to connect.
223 The
224 .Dq Li amd
225 service name must be used in the
226 .Pa /etc/hosts.allow
227 and
228 .Pa /etc/hosts.deny
229 files.
230 For example, to allow only localhost to connect to
231 .Xr amd 8 ,
232 add this line to
233 .Pa /etc/hosts.allow :
234 .Pp
235 .Dl "amd: localhost"
236 .Pp
237 and this line to
238 .Pa /etc/hosts.deny :
239 .Pp
240 .Dl "amd: ALL"
241 .Sh SEE ALSO
242 .Xr amd.conf 5 ,
243 .Xr hosts_access 5 ,
244 .Xr amd 8
245 .Pp
246 .Dq am-utils
247 .Xr info 1
248 entry.
249 .Rs
250 .%A Erez Zadok
251 .%B "Linux NFS and Automounter Administration"
252 .%O ISBN 0-7821-2739-8
253 .%I Sybex
254 .%D 2001
255 .Re
256 .Pp
257 .Pa http://www.am-utils.org/
258 .Rs
259 .%T Amd \- The 4.4 BSD Automounter
260 .Re
261 .Sh HISTORY
262 The
263 .Nm
264 utility
265 first appeared in
266 .Bx 4.4 .
267 .Sh AUTHORS
268 .An Jan-Simon Pendry Aq jsp@doc.ic.ac.uk ,
269 Department of Computing, Imperial College, London, UK.
270 .Pp
271 .An Erez Zadok Aq ezk@cs.sunysb.edu ,
272 Computer Science Department, Stony Brook
273 University, Stony Brook, New York, USA.
274 .Pp
275 Other authors and contributors to
276 .Nm am-utils
277 are listed in the
278 .Pa AUTHORS
279 file distributed with
280 .Nm am-utils .