1*a06e2ab3SBen Gras.\" $NetBSD: reboot.8,v 1.29 2011/02/16 19:32:26 wiz Exp $ 2*a06e2ab3SBen Gras.\" 3*a06e2ab3SBen Gras.\" Copyright (c) 1990, 1991, 1993 4*a06e2ab3SBen Gras.\" The Regents of the University of California. All rights reserved. 5*a06e2ab3SBen Gras.\" 6*a06e2ab3SBen Gras.\" Redistribution and use in source and binary forms, with or without 7*a06e2ab3SBen Gras.\" modification, are permitted provided that the following conditions 8*a06e2ab3SBen Gras.\" are met: 9*a06e2ab3SBen Gras.\" 1. Redistributions of source code must retain the above copyright 10*a06e2ab3SBen Gras.\" notice, this list of conditions and the following disclaimer. 11*a06e2ab3SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 12*a06e2ab3SBen Gras.\" notice, this list of conditions and the following disclaimer in the 13*a06e2ab3SBen Gras.\" documentation and/or other materials provided with the distribution. 14*a06e2ab3SBen Gras.\" 3. Neither the name of the University nor the names of its contributors 15*a06e2ab3SBen Gras.\" may be used to endorse or promote products derived from this software 16*a06e2ab3SBen Gras.\" without specific prior written permission. 17*a06e2ab3SBen Gras.\" 18*a06e2ab3SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19*a06e2ab3SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20*a06e2ab3SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21*a06e2ab3SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22*a06e2ab3SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23*a06e2ab3SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24*a06e2ab3SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25*a06e2ab3SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26*a06e2ab3SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27*a06e2ab3SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28*a06e2ab3SBen Gras.\" SUCH DAMAGE. 29*a06e2ab3SBen Gras.\" 30*a06e2ab3SBen Gras.\" @(#)reboot.8 8.1 (Berkeley) 6/9/93 31*a06e2ab3SBen Gras.\" 32*a06e2ab3SBen Gras.Dd February 16, 2011 33*a06e2ab3SBen Gras.Dt REBOOT 8 34*a06e2ab3SBen Gras.Os 35*a06e2ab3SBen Gras.Sh NAME 36*a06e2ab3SBen Gras.Nm reboot , 37*a06e2ab3SBen Gras.Nm poweroff , 38*a06e2ab3SBen Gras.Nm halt 39*a06e2ab3SBen Gras.Nd restarting, powering down and stopping the system 40*a06e2ab3SBen Gras.Sh SYNOPSIS 41*a06e2ab3SBen Gras.Nm halt 42*a06e2ab3SBen Gras.Op Fl dlnpqvxz 43*a06e2ab3SBen Gras.Nm poweroff 44*a06e2ab3SBen Gras.Op Fl dlnqvxz 45*a06e2ab3SBen Gras.Nm 46*a06e2ab3SBen Gras.Op Fl dlnqvxz 47*a06e2ab3SBen Gras.Op Ar arg ... 48*a06e2ab3SBen Gras.Sh DESCRIPTION 49*a06e2ab3SBen GrasThe 50*a06e2ab3SBen Gras.Nm poweroff , 51*a06e2ab3SBen Gras.Nm halt 52*a06e2ab3SBen Grasand 53*a06e2ab3SBen Gras.Nm 54*a06e2ab3SBen Grasutilities flush the file system cache to disk, send all running processes 55*a06e2ab3SBen Grasa 56*a06e2ab3SBen Gras.Dv SIGTERM , 57*a06e2ab3SBen Graswait for up to 30 seconds for them to die, send a 58*a06e2ab3SBen Gras.Dv SIGKILL 59*a06e2ab3SBen Grasto the survivors and, respectively, power down, halt or restart the system. 60*a06e2ab3SBen GrasThe action is logged, including entering a shutdown record into the login 61*a06e2ab3SBen Grasaccounting file and sending a message via 62*a06e2ab3SBen Gras.Xr syslog 3 . 63*a06e2ab3SBen Gras.Pp 64*a06e2ab3SBen GrasThe options are as follows: 65*a06e2ab3SBen Gras.Bl -tag -width Ds 66*a06e2ab3SBen Gras.It Fl d 67*a06e2ab3SBen GrasCreate a dump before halting or restarting. 68*a06e2ab3SBen GrasThis option is useful for debugging system dump procedures or 69*a06e2ab3SBen Grascapturing the state of a corrupted or misbehaving system. 70*a06e2ab3SBen Gras.It Fl l 71*a06e2ab3SBen GrasSuppress sending a message via 72*a06e2ab3SBen Gras.Xr syslog 3 73*a06e2ab3SBen Grasbefore halting or restarting. 74*a06e2ab3SBen Gras.It Fl n 75*a06e2ab3SBen GrasDo not flush the file system cache. 76*a06e2ab3SBen GrasThis option should be used with extreme caution. 77*a06e2ab3SBen GrasIt can be used if a disk or a processor is on fire. 78*a06e2ab3SBen Gras.It Fl p 79*a06e2ab3SBen GrasAttempt to powerdown the system. 80*a06e2ab3SBen GrasIf the powerdown fails, or the system does not support 81*a06e2ab3SBen Grassoftware powerdown, the system will halt. 82*a06e2ab3SBen GrasThis option is only valid for 83*a06e2ab3SBen Gras.Nm halt . 84*a06e2ab3SBen Gras.It Fl v 85*a06e2ab3SBen GrasTo enable verbose messages on the console, pass the 86*a06e2ab3SBen Gras.Xr boothowto 9 87*a06e2ab3SBen Grasflag 88*a06e2ab3SBen Gras.Dv AB_VERBOSE 89*a06e2ab3SBen Grasto 90*a06e2ab3SBen Gras.Xr reboot 2 . 91*a06e2ab3SBen Gras.It Fl x 92*a06e2ab3SBen GrasTo enable debugging messages on the console, pass the 93*a06e2ab3SBen Gras.Xr boothowto 9 94*a06e2ab3SBen Grasflag 95*a06e2ab3SBen Gras.Dv AB_DEBUG 96*a06e2ab3SBen Grasto 97*a06e2ab3SBen Gras.Xr reboot 2 . 98*a06e2ab3SBen Gras.It Fl z 99*a06e2ab3SBen GrasTo silence some shutdown messages on the console, pass the 100*a06e2ab3SBen Gras.Xr boothowto 9 101*a06e2ab3SBen Grasflag 102*a06e2ab3SBen Gras.Dv AB_SILENT 103*a06e2ab3SBen Grasto 104*a06e2ab3SBen Gras.Xr reboot 2 . 105*a06e2ab3SBen Gras.It Fl q 106*a06e2ab3SBen GrasDo not give processes a chance to shut down before halting or restarting. 107*a06e2ab3SBen GrasThis option should not normally be used. 108*a06e2ab3SBen Gras.El 109*a06e2ab3SBen Gras.Pp 110*a06e2ab3SBen GrasIf there are any arguments passed to 111*a06e2ab3SBen Gras.Nm reboot 112*a06e2ab3SBen Grasthey are concatenated with spaces and passed as 113*a06e2ab3SBen Gras.Fa bootstr 114*a06e2ab3SBen Grasto the 115*a06e2ab3SBen Gras.Xr reboot 2 116*a06e2ab3SBen Grassystem call. 117*a06e2ab3SBen GrasThe string is passed to the firmware on platforms that support it. 118*a06e2ab3SBen Gras.Pp 119*a06e2ab3SBen GrasNormally, the 120*a06e2ab3SBen Gras.Xr shutdown 8 121*a06e2ab3SBen Grasutility is used when the system needs to be halted or restarted, giving 122*a06e2ab3SBen Grasusers advance warning of their impending doom. 123*a06e2ab3SBen Gras.Sh SEE ALSO 124*a06e2ab3SBen Gras.Xr reboot 2 , 125*a06e2ab3SBen Gras.Xr syslog 3 , 126*a06e2ab3SBen Gras.Xr utmp 5 , 127*a06e2ab3SBen Gras.Xr boot 8 , 128*a06e2ab3SBen Gras.Xr init 8 , 129*a06e2ab3SBen Gras.Xr rescue 8 , 130*a06e2ab3SBen Gras.Xr shutdown 8 , 131*a06e2ab3SBen Gras.Xr sync 8 132*a06e2ab3SBen Gras.Sh HISTORY 133*a06e2ab3SBen GrasA 134*a06e2ab3SBen Gras.Nm 135*a06e2ab3SBen Grascommand appeared in 136*a06e2ab3SBen Gras.At v6 . 137*a06e2ab3SBen Gras.Pp 138*a06e2ab3SBen GrasThe 139*a06e2ab3SBen Gras.Nm poweroff 140*a06e2ab3SBen Grascommand first appeared in 141*a06e2ab3SBen Gras.Nx 1.5 . 142*a06e2ab3SBen Gras.Sh CAVEATS 143*a06e2ab3SBen GrasOnce the command has begun its work, stopping it before it completes 144*a06e2ab3SBen Graswill probably result in a system so crippled it must be 145*a06e2ab3SBen Grasphysically reset. 146*a06e2ab3SBen GrasTo prevent premature termination, the command 147*a06e2ab3SBen Grasblocks many signals early in its execution. 148*a06e2ab3SBen GrasHowever, nothing can defend against deliberate attempts to evade this. 149*a06e2ab3SBen Gras.Pp 150*a06e2ab3SBen GrasThis command will stop the system without running any 151*a06e2ab3SBen Gras.Xr shutdown 8 152*a06e2ab3SBen Grasscripts. 153*a06e2ab3SBen GrasAmongst other things, this means that swapping will not be 154*a06e2ab3SBen Grasdisabled so that 155*a06e2ab3SBen Gras.Xr raid 4 156*a06e2ab3SBen Grascan shutdown cleanly. 157*a06e2ab3SBen GrasYou should normally use 158*a06e2ab3SBen Gras.Xr shutdown 8 159*a06e2ab3SBen Grasunless you are running in single user mode. 160*a06e2ab3SBen Gras.Sh BUGS 161*a06e2ab3SBen GrasThe single user shell will ignore the 162*a06e2ab3SBen Gras.Dv SIGTERM 163*a06e2ab3SBen Grassignal. 164*a06e2ab3SBen GrasTo avoid waiting for the timeout when 165*a06e2ab3SBen Grasrebooting or halting from the single user shell, you have to 166*a06e2ab3SBen Gras.Ic exec reboot 167*a06e2ab3SBen Grasor 168*a06e2ab3SBen Gras.Ic exec halt . 169