Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
uadmin(2)			 System	Calls			     uadmin(2)

NAME
       uadmin -	administrative control

SYNOPSIS
       #include	<sys/uadmin.h>

       int uadmin(int cmd, int fcn, uintptr_t mdep);

DESCRIPTION
       The  uadmin()  function provides	control	for basic administrative func-
       tions. This function is tightly coupled to  the	system	administrative
       procedures  and	is  not	intended for general use. The argument mdep is
       provided	for machine-dependent use and is not defined here.

       As specified by cmd, the	following commands are available:

       A_SHUTDOWN
	     The system	is shut	down. All user processes are killed, the  buf-
	     fer  cache	is flushed, and	the root file system is	unmounted. The
	     action to be taken	after the system has been shut down is	speci-
	     fied by fcn. The functions	are generic; the hardware capabilities
	     vary on  specific machines.

	     AD_HALT
		   Halt	the processor(s).

	     AD_POWEROFF
		   Halt	the processor(s) and turn off the power.

	     AD_BOOT
		   Reboot the system, using the	kernel file.

	     AD_IBOOT
		   Interactive reboot; user is prompted	for  bootable  program
		   name.

       A_REBOOT
	     The  system stops immediately without any further processing. The
	     action to be taken	next is	specified by fcn as above.

       A_DUMP
	     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.

       A_REMOUNT
	     The  root	file  system is	mounted	again after having been	fixed.
	     This should be used only during the startup process.

       A_FREEZE
	     Suspend the whole system.	The system state is preserved  in  the
	     state file. The following three subcommands are available.

	      AD_COMPRESS
		   Save	the system state to the	state file with	compression of
		   data.

	     AD_CHECK
		   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.

	     AD_FORCE
		   Force AD_COMPRESS even when threads	of  user  applications
		   are not suspendable.

RETURN VALUES
       Upon  successful	 completion, the value returned	depends	on cmd as fol-
       lows:

       A_SHUTDOWN
	     Never returns.

       A_REBOOT
	     Never returns.

       A_FREEZE
	     0 upon resume.

       A_REMOUNT
	     0.

       Otherwise, -1 is	returned and errno is set to indicate the error.

ERRORS
       The uadmin() function will fail if:

       EPERM The effective user	of the calling process is not super-user.

       ENOMEM
	     Suspend/resume ran	out of physical	memory.

       ENOSPC
	     Suspend/resume could not allocate enough space on the  root  file
	     system to store system information.

       ENOTSUP
	     Suspend/resume not	supported on this platform.

       ENXIO Unable to successfully suspend system.

       EBUSY Suspend already in	progress.

SEE ALSO
       dumpadm(1M), kernel(1M),	uadmin(1M)

SunOS 5.9			  12 Jan 2001			     uadmin(2)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=uadmin&sektion=2&manpath=SunOS+5.9>

home | help