uadmin - administrative control
int uadmin(int cmd, int fcn, uintptr_t mdep);
The uadmin() function provides control for basic administra-
tive functions. This function is tightly coupled to the sys-
tem administrative procedures and is not intended for gen-
eral use. The argument mdep is provided for machine-
dependent use and is not defined here.
As specified by cmd, the following commands are available:
The system is shut down. All user processes are
killed, the buffer cache is flushed, and the root file
system is unmounted. The action to be taken after the
system has been shut down is specified by fcn. The
functions are generic; the hardware capabilities vary
on specific machines.
Halt the processor(s).
Halt the processor(s) and turn off the power.
Reboot the system, using the kernel file.
Interactive reboot; user is prompted for boot-
able program name.
The system stops immediately without any further pro-
cessing. The action to be taken next is specified by
fcn as above.
The system is forced to panic immediately without any
further processing and a crash dump is written to the
dump device (see dumpadm(1M)). The action to be taken
next is specified by fcn as above.
The root file system is mounted again after having
been fixed. This should be used only during the
Suspend the whole system. The system state is
preserved in the state file. The following three sub-
commands are available.
Save the system state to the state file with
compression of data.
Check if your system supports suspend and
resume. Without performing a system
suspend/resume, this command checks if this
feature is currently available on your system.
Force AD_COMPRESS even when threads of user
applications are not suspendable.
Upon successful completion, the value returned depends on
cmd as follows:
0 upon resume.
Otherwise, -1 is returned and errno is set to indicate the
The uadmin() function will fail if:
EPERM The effective user of the calling process is not
Suspend/resume ran out of physical memory.
Suspend/resume could not allocate enough space on the
root file system to store system information.
Suspend/resume not supported on this platform.
ENXIO Unable to successfully suspend system.
EBUSY Suspend already in progress.
When a UFS file system is mounted with logging enabled, file
system transactions that free blocks from files might not
actually add those freed blocks to the file system's free
list until some unspecified time in the future. This
behavior improves file system performance but does not con-
form to the POSIX, Single UNIX Specification, SPARC Confor-
mance Definition, System V Application Binary Interface,
System V Interface Definition, and X/Open Portability Guide
Standards, which require that freed space be available
immediately. To enable standards conformance regarding file
deletions or to address the problem of not being able to
grow files on a relatively full UFS file system even after
files have been deleted, disable UFS logging (see
dumpadm(1M), kernel(1M), mount_ufs(1M), uadmin(1M)
Man(1) output converted with