]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/amd/amq/amq.8
Virgin import of AMD (am-utils) v6.1.5
[FreeBSD/FreeBSD.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 .\"
43 .TH AMQ 8 "25 April 1989"
44 .SH NAME
45 amq \- automounter query tool
46 .SH SYNOPSIS
47 .B amq
48 [
49 .BI \-fmpsvwHTU
50 ] [
51 .BI \-h " hostname"
52 ] [
53 .BI \-l " log_file"
54 ] [
55 .BI \-x " log_options"
56 ] [
57 .BI \-D " debug_options"
58 ] [
59 .BI \-P " program_number"
60 ] [[
61 .B \-u
62 ]
63 .I directory .\|.\|.
64 ]
65 .SH DESCRIPTION
66 .B Amq
67 provides a simple way of determining the current state of
68 .B amd
69 program.
70 Communication is by
71 .SM RPC.
72 Three modes of operation are supported by the current protocol.  By default
73 a list of mount points and auto-mounted filesystems is output.  An
74 alternative host can be specified using the
75 .I \-h
76 option.
77 .LP
78 If
79 .I directory
80 names are given, as output by default, then per-filesystem
81 information is displayed.
82 .SH OPTIONS
83
84 .TP
85 .B \-f
86 Ask the automounter to flush the internal caches and reload all the maps.
87
88 .TP
89 .BI \-h " hostname"
90 Specify an alternate host to query.  By default the local host is used.  In
91 an
92 .SM HP-UX
93 cluster, the root server is queried by default, since that is the system on
94 which the automounter is normally run.
95
96 .TP
97 .BI \-l " log_file"
98 Tell amd to use
99 .I log_file
100 as the log file name.  For security reasons, this must be the same log file
101 which amd used when started.  This option is therefore only useful to
102 refresh amd's open file handle on the log file, so that it can be rotated
103 and compressed via daily cron jobs.
104
105 .TP
106 .B \-m
107 Ask the automounter to provide a list of mounted filesystems, including the
108 number of references to each filesystem and any error which occurred while
109 mounting.
110
111 .TP
112 .B \-p
113 Return the process ID of the remote or locally running amd.  Useful when you
114 need to send a signal to the local amd process, and would rather not have to
115 search through the process table.  This option is used in the
116 .I ctl-amd
117 script.
118
119 .TP
120 .B \-s
121 Ask the automounter to provide system-wide mount statistics.
122
123 .TP
124 .B \-u
125 Ask the automounter to unmount the filesystems named in
126 .I directory
127 instead of providing
128 information about them.  Unmounts are requested, not forced.  They merely
129 cause the mounted filesystem to timeout, which will be picked up by
130 .BR amd 's
131 main scheduler thus causing the normal timeout action to be taken.
132
133 .TP
134 .B \-v
135 Ask the automounter for its version information.  This is a subset of the
136 information output by
137 .BR amd 's
138 .I -v
139 option.
140
141 .TP
142 .B \-w
143 Translate a full pathname as returned by
144 .IR getpwd (3)
145 into a short
146 .B Amd
147 pathname that goes through its mount points.   This option requires that
148 .B Amd
149 is running.
150
151 .TP
152 .BI \-x " log_options"
153 Ask the automounter to use the logging options specified in
154 .I log_options
155 from now on.
156
157 .TP
158 .BI \-D " log_options"
159 Ask the automounter to use the debugging options specified in
160 .I debug_options
161 from now on.
162
163 .TP
164 .B \-H
165 Display short usage message.
166
167 .TP
168 .BI \-P " program_number"
169 Contact an alternate running amd that had registered itself on a different
170 RPC
171 .I program_number
172 and apply all other operations to that instance of the automounter.  This is
173 useful when you run multiple copies of amd, and need to manage each
174 one separately.  If not specified, amq will use the default program number
175 for amd, 300019.  For security reasons, the only alternate program numbers
176 amd can use range from 300019 to 300029, inclusive.
177
178 .TP
179 .B \-T
180 Contact
181 .B amd
182 using the TCP transport only.  Normally
183 .B amq
184 will try TCP, and if that failed, will try UDP.
185
186 .TP
187 .B \-U
188 Contact
189 .B amd
190 using UDP (connectionless) transport only.  Normally
191 .B amq
192 will try TCP, and if that failed, will try UDP.
193
194 .SH FILES
195 .TP 20
196 .B amq.x
197 .SM RPC
198 protocol description.
199
200 .SH CAVEATS
201 .B Amq
202 uses a Sun registered
203 .SM RPC
204 program number (300019 decimal) which may not
205 be in the /etc/rpc database.
206 .PP
207 If the TCP wrappers library is available, and the
208 .B use_tcpwrappers
209 global
210 .B amd.conf
211 option is set to ``yes'', then
212 .B amd
213 will verify that the host running
214 .B amq
215 is authorized to connect.  The
216 .I amd
217 service name must used in the
218 .B /etc/hosts.allow
219 and
220 .B /etc/hosts.deny
221 files.  For example, to allow only localhost to connect to
222 .B amd,
223 add this line to
224 .B /etc/hosts.allow:
225 .PP
226 .RS
227 amd: localhost
228 .RE
229 .PP
230 and this line to
231 .B /etc/hosts.deny:
232 .PP
233 .RS
234 amd: ALL
235 .RE
236
237 .SH "SEE ALSO"
238 .BR amd (8),
239 .BR ctl-amd (8),
240 .BR amd.conf (5),
241 .BR hosts_access (5).
242 .LP
243 ``am-utils''
244 .BR info (1)
245 entry.
246 .LP
247 .I "Linux NFS and Automounter Administration"
248 by Erez Zadok, ISBN 0-7821-2739-8, (Sybex, 2001).
249 .LP
250 .I http://www.am-utils.org
251 .LP
252 .I "Amd \- The 4.4 BSD Automounter"
253
254 .SH AUTHORS
255 Jan-Simon Pendry <jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK.
256 .P
257 Erez Zadok <ezk@cs.sunysb.edu>, Computer Science Department, Stony Brook
258 University, Stony Brook, New York, USA.
259 .P
260 Other authors and contributors to am-utils are listed in the
261 .B AUTHORS
262 file distributed with am-utils.