Print this page
10067 Miscellaneous man page typos
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Reviewed by: Volker A. Brandt <vab@bb-c.de>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man2/sysinfo.2.man.txt
+++ new/usr/src/man/man2/sysinfo.2.man.txt
1 1 SYSINFO(2) System Calls SYSINFO(2)
2 2
3 3
4 4
5 5 NAME
6 6 sysinfo - get and set system information strings
7 7
8 8 SYNOPSIS
9 9 #include <sys/systeminfo.h>
10 10
11 11 int sysinfo(int command, char *buf, long count);
12 12
13 13
14 14 DESCRIPTION
15 15 The sysinfo() function copies information relating to the operating
16 16 system on which the process is executing into the buffer pointed to by
17 17 buf. It can also set certain information where appropriate commands are
18 18 available. The count parameter indicates the size of the buffer.
19 19
20 20
21 21 The POSIX P1003.1 interface (see standards(5)) sysconf(3C) provides a
22 22 similar class of configuration information, but returns an integer
23 23 rather than a string.
24 24
25 25
26 26 The values for command are as follows:
27 27
28 28 SI_SYSNAME
29 29
30 30 Copy into the array pointed to by buf the string that would be
31 31 returned by uname(2) in the sysname field. This is the name of the
32 32 implementation of the operating system, for example, SunOS or UTS.
33 33
34 34
35 35 SI_HOSTNAME
36 36
37 37 Copy into the array pointed to by buf a string that names the
38 38 present host machine. This is the string that would be returned by
39 39 uname() in the nodename field. This hostname or nodename is often
40 40 the name the machine is known by locally. The hostname is the name
41 41 of this machine as a node in some network. Different networks might
42 42 have different names for the node, but presenting the nodename to
43 43 the appropriate network directory or name-to-address mapping
44 44 service should produce a transport end point address. The name
45 45 might not be fully qualified. Internet host names can be up to 256
46 46 bytes in length (plus the terminating null).
47 47
48 48
49 49 SI_SET_HOSTNAME
50 50
51 51 Copy the null-terminated contents of the array pointed to by buf
52 52 into the string maintained by the kernel whose value will be
53 53 returned by succeeding calls to sysinfo() with the command
54 54 SI_HOSTNAME. This command requires that {PRIV_SYS_ADMIN} is
55 55 asserted in the effective set of the calling process.
56 56
57 57
58 58 SI_RELEASE
59 59
60 60 Copy into the array pointed to by buf the string that would be
61 61 returned by uname(2) in the release field. Typical values might be
62 62 5.2 or 4.1.
63 63
64 64
65 65 SI_VERSION
66 66
67 67 Copy into the array pointed to by buf the string that would be
68 68 returned by uname(2) in the version field. The syntax and semantics
69 69 of this string are defined by the system provider.
70 70
71 71
72 72 SI_MACHINE
73 73
74 74 Copy into the array pointed to by buf the string that would be
75 75 returned by uname(2) in the machine field, for example, sun4u.
76 76
77 77
78 78 SI_ARCHITECTURE
79 79
80 80 Copy into the array pointed to by buf a string describing the basic
81 81 instruction set architecture of the current system, for example,
82 82 sparc, mc68030, m32100, or i386. These names might not match
83 83 predefined names in the C language compilation system.
84 84
85 85
86 86 SI_ARCHITECTURE_64
87 87
88 88 Copy into the array pointed to by buf a string describing the
89 89 64-bit instruction set architecture of the current system, for
90 90 example, sparcv9 or amd64. These names might not match predefined
91 91 names in the C language compilation system. This subcode is not
92 92 recognized on systems that do not allow a 64-bit application to
93 93 run.
94 94
95 95
96 96 SI_ARCHITECTURE_32
97 97
98 98 Copy into the array pointed to by buf a string describing the
99 99 32-bit instruction set architecture of the current system, for
100 100 example, sparc or i386. These names might not match predefined
101 101 names in the C language compilation system.
102 102
103 103
104 104 SI_ARCHITECTURE_K
105 105
106 106 Copy into the array pointed to by buf a string describing the
107 107 kernel instruction set architecture of the current system for
108 108 example sparcv9 or i386. These names might not match predefined
109 109 names in the C language compilation system.
110 110
111 111
112 112 SI_ARCHITECTURE_NATIVE
113 113
114 114 Copy into the array pointed to by buf a string describing the
115 115 native instruction set architecture of the current system, for
116 116 example sparcv9 or i386. These names might not match predefined
117 117 names in the C language compilation system.
118 118
119 119
120 120 SI_ISALIST
121 121
122 122 Copy into the array pointed to by buf the names of the variant
123 123 instruction set architectures executable on the current system.
124 124
125 125 The names are space-separated and are ordered in the sense of best
126 126 performance. That is, earlier-named instruction sets might contain
127 127 more instructions than later-named instruction sets; a program that
128 128 is compiled for an earlier-named instruction set will most likely
129 129 run faster on this machine than the same program compiled for a
130 130 later-named instruction set.
131 131
132 132 Programs compiled for an instruction set that does not appear in
133 133 the list will most likely experience performance degradation or not
134 134 run at all on this machine.
135 135
136 136 The instruction set names known to the system are listed in
137 137 isalist(5); these names might not match predefined names or
138 138 compiler options in the C language compilation system.
139 139
140 140 This command is obsolete and might be removed in a future release.
141 141 See getisax(2) and the Linker and Libraries Guide for a better way
142 142 to handle instruction set extensions.
143 143
144 144
145 145 SI_PLATFORM
146 146
147 147 Copy into the array pointed to by buf a string describing the
148 148 specific model of the hardware platform, for example, SUNW,Sun-
149 149 Blade-1500, SUNW,Sun-Fire-T200, or i86pc.
150 150
151 151
152 152 SI_HW_PROVIDER
153 153
154 154 Copies the name of the hardware manufacturer into the array pointed
155 155 to by buf.
156 156
157 157
158 158 SI_HW_SERIAL
159 159
160 160 Copy into the array pointed to by buf a string which is the ASCII
161 161 representation of the hardware-specific serial number of the
162 162 physical machine on which the function is executed. This might be
163 163 implemented in Read-Only Memory, using software constants set when
164 164 building the operating system, or by other means, and might contain
165 165 non-numeric characters. If the function is executed within a non-
166 166 global zone that emulates a host identifier, then the ASCII
167 167 representation of the zone's host identifier is copied into the
168 168 array pointed to by buf. It is anticipated that manufacturers will
169 169 not issue the same "serial number" to more than one physical
170 170 machine. The pair of strings returned by SI_HW_PROVIDER and
171 171 SI_HW_SERIAL is not guaranteed to be unique across all vendor's
172 172 SVR4 implementations and could change over the lifetime of a given
173 173 system.
174 174
175 175
176 176 SI_SRPC_DOMAIN
177 177
178 178 Copies the Secure Remote Procedure Call domain name into the array
179 179 pointed to by buf.
180 180
181 181
182 182 SI_SET_SRPC_DOMAIN
↓ open down ↓ |
182 lines elided |
↑ open up ↑ |
183 183
184 184 Set the string to be returned by sysinfo() with the SI_SRPC_DOMAIN
185 185 command to the value contained in the array pointed to by buf. This
186 186 command requires that {PRIV_SYS_ADMIN} is asserted in the effective
187 187 set of the calling process.
188 188
189 189
190 190 SI_DHCP_CACHE
191 191
192 192 Copy into the array pointed to by buf an ASCII string consisting of
193 - the ASCII hexidecimal encoding of the name of the interface
193 + the ASCII hexadecimal encoding of the name of the interface
194 194 configured by boot(1M) followed by the DHCPACK reply from the
195 195 server. This command is intended for use only by the dhcpagent(1M)
196 196 DHCP client daemon for the purpose of adopting the DHCP maintenance
197 197 of the interface configured by boot.
198 198
199 199
200 200 RETURN VALUES
201 201 Upon successful completion, the value returned indicates the buffer
202 202 size in bytes required to hold the complete value and the terminating
203 203 null character. If this value is no greater than the value passed in
204 204 count, the entire string was copied. If this value is greater than
205 205 count, the string copied into buf has been truncated to count-1 bytes
206 206 plus a terminating null character.
207 207
208 208
209 209 Otherwise, -1 is returned and errno is set to indicate the error.
210 210
211 211 ERRORS
212 212 The sysinfo() function will fail if:
213 213
214 214 EFAULT
215 215 The buf argument does not point to a valid address.
216 216
217 217
218 218 EINVAL
219 219 The count argument for a non-SET command is less than 0 or
220 220 the data for a SET command exceeds the limits established by
221 221 the implementation.
222 222
223 223
224 224 EPERM
225 225 The {PRIV_SYS_ADMIN} was not asserted in the effective set of
226 226 the calling process.
227 227
228 228
229 229 USAGE
230 230 In many cases there is no corresponding programming interface to set
231 231 these values; such strings are typically settable only by the system
232 232 administrator modifying entries in the /etc/system directory or the
233 233 code provided by the particular OEM reading a serial number or code out
234 234 of read-only memory, or hard-coded in the version of the operating
235 235 system.
236 236
237 237
238 238 A good estimation for count is 257, which is likely to cover all
239 239 strings returned by this interface in typical installations.
240 240
241 241 SEE ALSO
242 242 boot(1M), dhcpagent(1M), getisax(2), uname(2), gethostid(3C),
243 243 gethostname(3C), sysconf(3C), isalist(5), privileges(5), standards(5),
244 244 zones(5)
245 245
246 246
247 247 Linker and Libraries Guide
248 248
249 249
250 250
251 251 September 7, 2015 SYSINFO(2)
↓ open down ↓ |
48 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX