1.\"	$Id: pdf.1,v 1.14 2006/01/25 18:51:51 garbled Exp $
2.\"
3.\" Copyright (c) 1998, 1999, 2000
4.\"	Tim Rightnour.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgment:
16.\"	This product includes software developed by Tim Rightnour for
17.\"	The NetBSD Foundation, Inc.
18.\" 4. The name of Tim Rightnour may not be used to endorse or promote
19.\"    products derived from this software without specific prior written
20.\"    permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY TIM RIGHTNOUR ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL TIM RIGHTNOUR BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\" The following requests are required for all man pages.
35.Dd May 5, 1999
36.Dt PDF 1
37.Sh NAME
38.Nm pdf
39.Nd display free disk space across a group of machines
40.Sh SYNOPSIS
41.Nm
42.Op Fl ln
43.Op Fl g Ar nodegroup1,...,nodegroupN
44.Op Fl m Ar size
45.Op Fl t Ar type
46.Op Fl w Ar node1,...,nodeN
47.Op Fl x Ar node1,...,nodeN
48.Op Ar file | Ar file_system ...
49.Sh DESCRIPTION
50.Nm
51displays statistics about the amount of free disk space on the specified
52.Ar file_system
53or on the file system of which
54.Ar file
55is a part on all machines in a cluster.
56If neither a file or a
57.Ar file_system
58operand is specified,
59statistics for all mounted file systems, on all machines are displayed
60(subject to the
61.Fl w ,
62.Fl x ,
63.Fl g ,
64.Fl m ,
65.Fl l
66and
67.Fl t
68options below).
69The following options are available:
70.Bl -tag -width www
71.It Fl l
72Display statistics only about mounted file systems with the MNT_LOCAL
73flag set.  If a non-local file system is given as an argument, a
74warning is issued and no information is given on that file system.
75.It Fl n
76Print out the previously obtained statistics from the file systems.
77This option should be used if it is possible that one or more
78file systems are in a state such that they will not be able to provide
79statistics without a long delay.
80When this option is specified,
81.Nm
82will not request new statistics from the file systems, but will respond
83with the possibly stale statistics that were previously obtained.
84.It Fl g
85If the
86.Fl g
87option is specified, followed by a comma separated list of group
88names, the command will only be run on that group of nodes.  A node
89may be a part of more than one group if desired, however running
90without the
91.Fl g
92option will run the command on the same node as many times as it
93appears in the file specified by the
94.Ev CLUSTER
95environment variable.  This option is silently ignored if used with the
96.Fl w
97option.
98.It Fl m Ar size
99Is used to limit the displayed file systems to only those with a
100capacity greater than the user-supplied
101.Ar size
102argument.  This can be used to find filesystems over a given threshold.
103.It Fl t Ar type
104Is used to indicate the actions should only be taken on
105filesystems of the specified type.
106More than one type may be specified in a comma separated list.
107The list of filesystem types can be prefixed with
108.Dq no
109to specify the filesystem types for which action should
110.Em not
111be taken.  If a file system is given on the command line that is not of
112the specified type, a warning is issued and no information is given on
113that file system.
114.It Fl w
115If the
116.Fl w
117option is specified, followed by a comma delimited list of machine names,
118the
119.Ar command
120will be run on each node in the list.  Without this flag,
121.Nm
122runs on the nodes listed in the file pointed to by the
123.Ev CLUSTER
124environment variable.
125.It Fl x
126The
127.Fl x
128option can be used to exclude specific nodes from the cluster.  The
129format is the same as the
130.Fl w
131option, a comma delimited list of machine names.  This option is
132silently ignored if used with the
133.Fl w
134option.
135.El
136.Pp
137.Sh ENVIRONMENT
138.Nm
139utilizes the following environment variables.
140.Bl -tag -width "RCMD_CMD"
141.It Ev CLUSTER
142Contains a filename, which is a newline separated list of nodes
143in the cluster.
144.It Ev RCMD_CMD
145Command to use to connect to remote machines.  The command chosen must
146be able to connect with no password to the remote host.  Defaults to
147.Ic rsh
148.\" .Sh FILES
149.Sh EXAMPLES
150To find all the filesystems which are more than 90% full across your cluster,
151you would issue:
152.Bd -literal -offset indent
153pdf -m 90
154.Ed
155.Sh DIAGNOSTICS
156Exit status is 0 on success, 1 if an error occurs.
157.Sh SEE ALSO
158.Xr dsh 1 ,
159.Xr df 1 ,
160.Xr rsh 1 ,
161.Xr kerberos 3 ,
162.Xr hosts.equiv 5 ,
163.Xr rhosts 5
164.Sh HISTORY
165The
166.Nm
167command appeared in clusterit 1.0. It is based on the
168.Nm
169command in IBM PSSP.
170.Sh AUTHOR
171.Nm Pdf
172was written by Tim Rightnour.
173.Sh BUGS
174Output is formatted for 80 columns.  This means that mount points and
175filesystems with long names
176.Po
177\*(Gt 20 characters
178.Pc
179will be truncated.  In
180addition, numbers longer than 9 digits will be truncated as well.
181.Pp
182.Nm
183will only work on nodes that produce the
184.Xr df 1
185output that it expects.  It has been made to work on HP-UX, Solaris, and
186AIX, along with any BSD, and most versions of Linux.