xref: /netbsd-src/usr.bin/sys_info/sys_info.1 (revision 598b83d451d36fa02db9787aef70b3c54bcdf2ca)
1.\" $NetBSD: sys_info.1,v 1.8 2017/09/21 07:07:28 wiz Exp $
2.\"
3.\" Copyright (c) 2016 Alistair Crooks <agc@NetBSD.org>
4.\" 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.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd September 20, 2017
27.Dt SYS_INFO 1
28.Os
29.Sh NAME
30.Nm sys_info
31.Nd script to show system version information
32.Sh SYNOPSIS
33.Nm
34.Op Fl v
35.Op Fl d Ar destination-dir
36.Op Fl L Ar lib-path
37.Op Fl P Ar path
38.Op Ar component No ...
39.Sh DESCRIPTION
40The
41.Nm
42script displays version numbers for system components.
43It is useful for finding out the installed versions of
44the components of a system.
45The
46.Nm
47utility uses a combination of ways to retrieve version
48information from the installed utilities.
49.Sh OPTIONS
50The following options are available:
51.Bl -tag -width inits
52.It Fl d
53This option provides a destination directory, used
54as the root directory of an alternative set of programs
55and libraries.
56This can be useful for finding versions of utilities
57and libraries rooted in the file system directory,
58such as the destination directory from a
59.Dv build.sh
60run.
61.It Fl L
62Give a list of directories
63.Pq "colon separated"
64that are used when searching for libraries.
65If not given the value of
66.Ev LD_LIBRARY_PATH
67is used if set in the environment, or otherwise
68a standard (built-in) set of directories.
69.It Fl P
70Set
71.Ev PATH .
72If not given, the system default path, as obtained from
73.Ic user.cs_path
74via
75.Xr sysctl 8
76is used.
77To use the current value of $PATH from the caller, use:
78.Dl -P \*q$PATH\*q
79.It Fl v
80Show the commands used to obtain the version information
81for each component
82.El
83.Pp
84Arguments may be given to
85.Nm .
86If any arguments are specified, they are assumed
87to be names of programs, or shared libraries,
88installed on the system.
89If no arguments are provided, then all of the
90items that are known to
91.Nm
92are reported.
93.Sh EXIT STATUS
94.Nm
95exits with status 2 if an unknown option is given,
96otherwise with status 1 if an unknown component is specified,
97otherwise, with status 0.
98.Sh SEE ALSO
99.Xr awk 1 ,
100.Xr sed 1 ,
101.Xr strings 1 ,
102.Xr uname 1 ,
103.Xr sysctl 8
104.Sh HISTORY
105The
106.Nm
107program was first seen in
108.Nx 8 .
109.Sh AUTHORS
110The
111.Nm
112script was written by
113.An Alistair Crooks Aq Mt agc@NetBSD.org .
114