2 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
5 .\" See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
6 .\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH UADMIN 2 "Mar 25, 2009"
9 uadmin \- administrative control
13 #include <sys/uadmin.h>
15 \fBint\fR \fBuadmin\fR(\fBint\fR \fIcmd\fR, \fBint\fR \fIfcn\fR, \fBuintptr_t\fR \fImdep\fR);
21 The \fBuadmin()\fR function provides control for basic administrative
22 functions. This function is tightly coupled to the system administrative
23 procedures and is not intended for general use. The argument \fImdep\fR is
24 provided for machine-dependent use and is not defined here. It should be
25 initialized to \fINULL\fR if not used.
28 As specified by \fIcmd\fR, the following commands are available:
32 \fB\fBA_SHUTDOWN\fR\fR
35 The system is shut down. All user processes are killed, the buffer cache is
36 flushed, and the root file system is unmounted. The action to be taken after
37 the system has been shut down is specified by \fIfcn\fR. The functions are
38 generic; the hardware capabilities vary on specific machines.
45 Halt the processor(s).
51 \fB\fBAD_POWEROFF\fR\fR
54 Halt the processor(s) and turn off the power.
63 Reboot the system, using the kernel file.
72 Interactive reboot; user is prompted for bootable program name.
78 \fB\fBAD_FASTREBOOT\fR\fR
81 Bypass BIOS and boot loader
92 The system stops immediately without any further processing. The action to be
93 taken next is specified by \fIfcn\fR as above.
102 The system is forced to panic immediately without any further processing and a
103 crash dump is written to the dump device (see \fBdumpadm\fR(1M)). The action
104 to be taken next is specified by \fIfcn\fR, as above.
110 \fB\fBA_REMOUNT\fR\fR
113 The root file system is mounted again after having been fixed. This should be
114 used only during the startup process.
123 Suspend the whole system. The system state is preserved in the state file. The
124 following subcommands, specified by \fIfcn\fR, are available.
128 \fB\fBAD_SUSPEND_TO_DISK\fR\fR
132 Save the system state to the state file. This subcommand is equivalent to ACPI
139 \fB\fBAD_CHECK_SUSPEND_TO_DISK\fR\fR
143 Check if your system supports suspend to disk. Without performing a system
144 suspend/resume, this subcommand checks if this feature is currently available
151 \fB\fBAD_SUSPEND_TO_RAM\fR\fR
155 Save the system state to memory This subcommand is equivalent to ACPI state S3.
161 \fB\fBAD_CHECK_SUSPEND_TO_RAM\fR\fR
165 Check if your system supports suspend to memory. Without performing a system
166 suspend/resume, this subcommand checks if this feature is currently available
170 The following subcommands, specified by \fIfcn\fR, are obsolete and might be
171 removed in a subsequent release:
175 \fB\fBAD_COMPRESS\fR\fR
179 Save the system state to the state file with compression of data. This
180 subcommand has been replaced by \fBAD_SUSPEND_TO_DISK\fR, which should be used
191 Check if your system supports suspend and resume. Without performing a system
192 suspend/resume, this command checks if this feature is currently available on
193 your system. This subcommand has been replaced by
194 \fBAD_CHECK_SUSPEND_TO_DISK\fR, which should be used instead.
204 Force \fBAD_COMPRESS\fR even when threads of user applications are not
205 suspendable. This subcommand should never be used, as it might result in
214 Upon successful completion, the value returned depends on \fIcmd\fR as follows:
218 \fB\fBA_SHUTDOWN\fR\fR
245 \fB\fBA_REMOUNT\fR\fR
253 Otherwise, \fB\(mi1\fR is returned and \fBerrno\fR is set to indicate the
258 The \fBuadmin()\fR function will fail if:
265 Suspend is already in progress.
274 The \fIcmd\fR argument is invalid.
283 Suspend/resume ran out of physical memory.
292 Suspend/resume could not allocate enough space on the root file system to store
302 Suspend/resume is not supported on this platform or the command specified by
303 \fIcmd\fR is not allowed.
312 Unable to successfully suspend system.
321 The {\fBPRIV_SYS_CONFIG\fR} privilege is not asserted in the effective set of
328 See \fBattributes\fR(5) for descriptions of the following attributes:
336 ATTRIBUTE TYPE ATTRIBUTE VALUE
338 Interface Stability See below.
343 The \fBA_FREEZE\fR command and its subcommands are Committed.
347 \fBdumpadm\fR(1M), \fBhalt\fR(1M), \fBkernel\fR(1M), \fBreboot\fR(1M),
348 \fBuadmin\fR(1M), \fBattributes\fR(5), \fBprivileges\fR(5)
352 Shutting down or halting the system by means of \fBuadmin\fR(1M) does not
353 update the boot archive. Avoid using this command after
358 editing of files such as \fB/etc/system\fR
364 installing new driver binaries or kernel binaries
370 updating existing driver binaries or kernel binaries.
374 Use \fBreboot\fR(1M) or \fBhalt\fR(1M) instead.