CPU_REBOOT(9) BSD Kernel Developer's Manual CPU_REBOOT(9)NAME
cpu_reboot -- halt or reboot the system
SYNOPSIS
#include <sys/reboot.h>
void
cpu_reboot(int howto, char *bootstr);
DESCRIPTION
The cpu_reboot() function handles final system shutdown, and either halts or reboots the system. The exact action to be taken is determined
by the flags passed in howto and by whether or not the system has finished autoconfiguration.
If the system has finished autoconfiguration, cpu_reboot() does the following:
1. Sets the boothowto system variable (see boothowto(9)) from the howto argument.
2. If this is the first invocation of cpu_reboot() and the RB_NOSYNC flag is not set in howto, syncs and unmounts the system disks by
calling vfs_shutdown(9) and sets the time of day clock by calling resettodr(9).
3. Disables interrupts.
4. If rebooting after a crash (i.e., if RB_DUMP is set in howto, but RB_HALT is not), saves a system crash dump.
5. Runs any shutdown hooks by calling pmf_system_shutdown(9).
6. Prints a message indicating that the system is about to be halted or rebooted.
7. If RB_HALT is set in howto, halts the system. Otherwise, reboots the system.
If the system has not finished autoconfiguration, cpu_reboot() runs any shutdown hooks by calling pmf_system_shutdown(9), prints a message,
and halts the system.
If RB_STRING is set in howto, then the parameter bootstr is passed to the system boot loader on some ports.
SEE ALSO boothowto(9), dumpsys(9), pmf_system_shutdown(9), resettodr(9), vfs_shutdown(9)BSD February 11, 2010 BSD
Check Out this Related Man Page
reboot(2) System Calls Manual reboot(2)Name
reboot - reboot system or halt processor
Syntax
#include <sys/reboot.h>
reboot(howto)
int howto;
Arguments
howto The howto argument is a mask of options passed to the bootstrap program.
The bits of howto are:
RB_HALT
the processor is simply halted; no reboot takes place. RB_HALT should be used with caution.
RB_ASKNAME
Interpreted by the bootstrap program itself, causing it to inquire as to what file should be booted. Normally, the system
is booted from the file "xx(0,0)vmunix" without asking.
RB_SINGLE
Normally, the reboot procedure involves an automatic disk consistency check and then multi-user operations. RB_SINGLE pre-
vents the consistency check, rather simply booting the system with a single-user shell on the console. RB_SINGLE is inter-
preted by the init(8) program in the newly booted system. This switch is not available from the system call interface.
Only the superuser may a machine.
Description
The system call reboots the system, and is invoked automatically in the event of unrecoverable system failures. The system call interface
permits only RB_HALT or RB_AUTOBOOT to be passed to the reboot program; the other flags are used in scripts stored on the console storage
media or used in manual bootstrap procedures. When none of these options (for example, RB_AUTOBOOT) is given, the system is rebooted from
file in the root file system of unit 0 of a disk chosen in a processor-specific way. Normally, an automatic consistency check of the disks
is then performed.
Return Values
If successful, this call never returns. Otherwise, a -1 is returned, and an error is stored in the global variable errno.
Diagnostics
The call fails under the following condition:
[EPERM] The caller is not the superuser.
See Alsocrash(8v), halt(8), init(8), reboot(8)reboot(2)
So last week I posted about my system that will not completely boot. It reports a bad trap and reboots in an endless cycle. I'm at a point where I just want to wipe the system clean, reload the software and basically start from scratch.
I can interrupt the boot cycle and get to an ok prompt.... (2 Replies)
Hello!
Does anyone know howto reload your kernal without rebooting the machine?
I´ve updated the "/etc/security/limits.conf " file and need to make this active without rebooting the machine. this is Red Hat Advanced Server 2.1AS
Regards...
dOzY (3 Replies)
Good day,
i'm an absolute newbie on SunOs. just finished reading a book about it and decided to have a go. However, things did not go as smooth as i had thought. The system doesn't respond to anything after booting up. I have no idea what is wrong.I've managed to jot down the screen. Any form... (11 Replies)
Hello, i should finished this program, if anyone could tell me whats wrong... This is an optional university work, though i cant leave this nearly finished. I need to see where is my error :(
What my program should do.
The user must type "num_proc" ( number of children). The program creates a... (4 Replies)
ok, i know the syntax that goes along with the Shutdown command... but my box never wants to ... well... shutdown.. it only halts, kills all the process's, stalls the comp to a complete stop, but does actually kill the monitor and/or shut off the physical computer. it will reboot properly though,... (3 Replies)
Ok.. for some reason my system loves to halt every so many seconds.. everytime it halts.. it halts for about 1-2 seconds.. completely PAUSING the whole system (my mouse freezes and keyboard freezes) for about 1-2 seconds.. it's starting to piss me off.. what do you think might be the problem? i'm... (4 Replies)
system() in a c++ program halts in AIX 5.3, though the corresponding binary working fine in AIX 5.2 and lower version. I am executing a script using system in a c++ program. the script has the execute permission by all. (0 Replies)
Hello,
My old AIX version is having the following in the script -- so whenever the system reboots -- the following is set:
vmtune -f 480 -F 512 -R 32 -P 30 -p 10
Now, we have a new P-series system which has AIX 5.3 ; As i understand that vmtune is no longer supported on AIX 5.2 and above ;... (13 Replies)
Hi
I'm trying to substitute word "January" with word "March" in my script but in certain lines only.
I have couple words containing pattern that I want to substitute e.g.
- log.January.1.array
- log_January_1_array_1
- log.January.1.array
- log_January_1_array_11
Trying to do cmd below... (9 Replies)
Hi Everyone, I'm trying to figure out how many times my LPAR has been bounced? Anybody know a command or a place I can look into. The "who -b" shows the last system boot and I couldn't find anything useful using the "last" command. (8 Replies)
A quick howto on how to set nautilus as your default filemanager.
Add this line to the file below. This is for user settings
inode/directory=nautilus.desktop
vi ~/.local/share/applications/mimeapps.list
This is for global settings.
ls /usr/share/applications | grep nautilus
Check... (1 Reply)