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