aboutsummaryrefslogtreecommitdiffstats
path: root/amq/amq.8
blob: 203a52938014637bd039e91c226e5ffb69875305 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
.\"
.\" Copyright (c) 1997-2006 Erez Zadok
.\" Copyright (c) 1990 Jan-Simon Pendry
.\" Copyright (c) 1990 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to Berkeley by
.\" Jan-Simon Pendry at Imperial College, London.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgment:
.\"      This product includes software developed by the University of
.\"      California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"	%W% (Berkeley) %G%
.\"
.\" $Id: amq.8,v 1.15.2.1 2006/01/02 18:48:24 ezk Exp $
.\"
.TH AMQ 8 "25 April 1989"
.SH NAME
amq \- automounter query tool
.SH SYNOPSIS
.B amq
[
.BI \-fmpsvwHTU
] [
.BI \-h " hostname"
] [
.BI \-l " log_file"
] [
.BI \-x " log_options"
] [
.BI \-D " debug_options"
] [
.BI \-P " program_number"
] [[
.B \-u
]
.I directory .\|.\|.
]
.SH DESCRIPTION
.B Amq
provides a simple way of determining the current state of
.B amd
program.
Communication is by
.SM RPC.
Three modes of operation are supported by the current protocol.  By default
a list of mount points and auto-mounted filesystems is output.  An
alternative host can be specified using the
.I \-h
option.
.LP
If
.I directory
names are given, as output by default, then per-filesystem
information is displayed.
.SH OPTIONS

.TP
.B \-f
Ask the automounter to flush the internal caches and reload all the maps.

.TP
.BI \-h " hostname"
Specify an alternate host to query.  By default the local host is used.  In
an
.SM HP-UX
cluster, the root server is queried by default, since that is the system on
which the automounter is normally run.

.TP
.BI \-l " log_file"
Tell amd to use
.I log_file
as the log file name.  For security reasons, this must be the same log file
which amd used when started.  This option is therefore only useful to
refresh amd's open file handle on the log file, so that it can be rotated
and compressed via daily cron jobs.

.TP
.B \-m
Ask the automounter to provide a list of mounted filesystems, including the
number of references to each filesystem and any error which occurred while
mounting.

.TP
.B \-p
Return the process ID of the remote or locally running amd.  Useful when you
need to send a signal to the local amd process, and would rather not have to
search through the process table.  This option is used in the
.I ctl-amd
script.

.TP
.B \-s
Ask the automounter to provide system-wide mount statistics.

.TP
.B \-u
Ask the automounter to unmount the filesystems named in
.I directory
instead of providing
information about them.  Unmounts are requested, not forced.  They merely
cause the mounted filesystem to timeout, which will be picked up by
.BR amd 's
main scheduler thus causing the normal timeout action to be taken.

.TP
.B \-v
Ask the automounter for its version information.  This is a subset of the
information output by
.BR amd 's
.I -v
option.

.TP
.B \-w
Translate a full pathname as returned by
.IR getpwd (3)
into a short
.B Amd
pathname that goes through its mount points.   This option requires that
.B Amd
is running.

.TP
.BI \-x " log_options"
Ask the automounter to use the logging options specified in
.I log_options
from now on.

.TP
.BI \-D " log_options"
Ask the automounter to use the debugging options specified in
.I debug_options
from now on.

.TP
.B \-H
Display short usage message.

.TP
.BI \-P " program_number"
Contact an alternate running amd that had registered itself on a different
RPC
.I program_number
and apply all other operations to that instance of the automounter.  This is
useful when you run multiple copies of amd, and need to manage each
one separately.  If not specified, amq will use the default program number
for amd, 300019.  For security reasons, the only alternate program numbers
amd can use range from 300019 to 300029, inclusive.

.TP
.B \-T
Contact
.B amd
using the TCP transport only.  Normally
.B amq
will try TCP, and if that failed, will try UDP.

.TP
.B \-U
Contact
.B amd
using UDP (connectionless) transport only.  Normally
.B amq
will try TCP, and if that failed, will try UDP.

.SH FILES
.TP 20
.B amq.x
.SM RPC
protocol description.

.SH CAVEATS
.B Amq
uses a Sun registered
.SM RPC
program number (300019 decimal) which may not
be in the /etc/rpc database.
.PP
If the TCP wrappers library is available, and the
.B use_tcpwrappers
global
.B amd.conf
option is set to ``yes'', then
.B amd
will verify that the host running
.B amq
is authorized to connect.  The
.I amd
service name must used in the
.B /etc/hosts.allow
and
.B /etc/hosts.deny
files.  For example, to allow only localhost to connect to
.B amd,
add this line to
.B /etc/hosts.allow:
.PP
.RS
amd: localhost
.RE
.PP
and this line to
.B /etc/hosts.deny:
.PP
.RS
amd: ALL
.RE

.SH "SEE ALSO"
.BR amd (8),
.BR ctl-amd (8),
.BR amd.conf (5),
.BR hosts_access (5).
.LP
``am-utils''
.BR info (1)
entry.
.LP
.I "Linux NFS and Automounter Administration"
by Erez Zadok, ISBN 0-7821-2739-8, (Sybex, 2001).
.LP
.I http://www.am-utils.org
.LP
.I "Amd \- The 4.4 BSD Automounter"

.SH AUTHORS
Jan-Simon Pendry <jsp@doc.ic.ac.uk>, Department of Computing, Imperial College, London, UK.
.P
Erez Zadok <ezk@cs.sunysb.edu>, Computer Science Department, Stony Brook
University, Stony Brook, New York, USA.
.P
Other authors and contributors to am-utils are listed in the
.B AUTHORS
file distributed with am-utils.