Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support Shutdown to a Halt and restart Post 302432511 by methyl on Friday 25th of June 2010 07:06:58 AM
Old 06-25-2010
If this is a cluster or there are NFS mounts you will need special instructions to shut down in a sensible manner. These instructions may or may not include a "shutdown" command.


You will need to know more about you "special login thru a console" and what piece of hardware you are connected to and how to toggle between console and server remote management. Is it an iLO (Integrated Lights-Out) or a MP (Management Processor) or a Web Console? We assume it is not just a telnet session.


The unix "shutdown" command just shuts down the Operating System and halts the processor. It does not turn the power off. Most remote power controls only control the system unit not any add-on hardware such as disc arrays.


Beware that unix "shutdown" does not shut down databases etc. unless "rc" scripts have been installed to achieve this.


If you are in a hurryand you have already closed all applications and client connection, this method answers any prompts:
Code:
cd /;/sbin/shutdown -h -y now

 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

where's solaris halt log?

hi folks could tell my anyone where solaris 8 stores the logs about shutdown/halt command. I found no entries in syslog, but there more logs directories. probabaly a stupid question, but fast help would be great! thanks king regards, patrick (6 Replies)
Discussion started by: mrsaint
6 Replies

2. Programming

How to halt Prog Execution for some time?

Hi, Perhaps I am asking a silly question, but I really don't know about it. Can anyone tell me the function for "sleep" kind of functionality in C language for Unix. I don't think any function with the name of sleep() exits in Unix's C language. or perhaps I am not known with the header file... (3 Replies)
Discussion started by: Ahsan
3 Replies

3. Solaris

difference b/w halt shutdown

Hi, I want to know the difference between halt and shutdown commands and which is better to use? Regards, visu (2 Replies)
Discussion started by: visu_ak
2 Replies

4. Solaris

Restart/Shutdown the Solaris from SC>

Hi Experts, I am running solris 9. Sun-Fire 880. How do i shutdowon the whole server using ALOM i.e sc> console. If the server is down or somehow hang How do i Restart from sc> //purple (6 Replies)
Discussion started by: thepurple
6 Replies

5. Solaris

unable to halt the zone

Hi Experts, I have to delete the non- global zone from one of the server. As per my understanding we need to halt the zone , then uninstall and later delete it with zoneadm however once I am trying to halt the zone the screen is getting hanged, after canceling the process and... (23 Replies)
Discussion started by: kumarmani
23 Replies

6. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

7. UNIX for Advanced & Expert Users

SCO Open Server 6 - System Halt

========================================================= Errrr previously post: https://www.unix.com/sco/140055-sco-open-server-6-system-halt.html Then I think it's better to post here. If I wrong, please ignore. ========================================================= Dear All, Newbie... (1 Reply)
Discussion started by: virgani
1 Replies

8. Linux

Delay gnome shutdown/restart

Hi to all. My first message here, but i following you via twitter feed from many time... The question: I need to delay 5-10 seconds the shutdown command executed when the user click on the power off/reboot in their session or at login screen. I need that because i have in the background a... (18 Replies)
Discussion started by: mendez
18 Replies

9. Solaris

Solaris paging bringing system to halt

Hi experts, I am running a solaris 10 with oracle 10 on a system with 96 GB physical memory. the system has a lot of swap space. the oracle SGA is 50 GB and PGA 40 GB. Here are the stats vmstat -i interrupt total rate -------------------------------- clock ... (5 Replies)
Discussion started by: afadaghi
5 Replies
shutdown(8)						      System Manager's Manual						       shutdown(8)

NAME
shutdown - Shuts down a single system or an entire cluster SYNOPSIS
/usr/sbin/shutdown [-bfhknrs] time [warning-message ...] /usr/sbin/shutdown -c [-hs] time [warning-message ...] PARAMETERS
Defines the time at which the shutdown command will shut down the system (or cluster when the -c option is specified). There are several ways to express this time: Use the word now to cause an immediate shutdown. Specify a future time using the format: +number. This format starts a shutdown in number minutes. Specify a future time using the format: hhmm. This format starts a shutdown at the indicated time. You can separate the hours (hh) and minutes (mm) with a colon (:). Anything following the time parameter on the command line is considered to be a message, which is broadcast to users currently logged into the system or cluster. Prior to shutdown, the message is displayed on all user terminals. The message is sent more frequently as the shutdown time approaches. OPTIONS
Sends a shutdown message to the rwalld daemon on all remote client hosts that have NFS file systems mounted from this system. This option is incompatible with the -c option. Shuts down and halts all members of a cluster in an orderly fashion. The -h and -s options are invoked by default when the -c option is specified. That is, there is no difference between specifying the -c option alone and specifying -csh. If any options other than -h and -s are specified with the -c option, the shutdown command displays a usage message and exits. Performs a fast shutdown (in the manner of the fastboot and the fasthalt programs), bypassing the messages to other users and bringing the system down as quickly as possible. The system halts or reboots without checking the file systems. For example, the shutdown -f time command brings the system to single user and creates the /fastboot file; when the system reboots to multiuser, it does not invoke fsck. The shutdown -f -r time command shuts the system down, creates the /fastboot file, then immediately reboots. The shutdown -f -h time command creates the /fastboot file and halts the system. The -f option is incompatible with the -c option. Causes the system or cluster to shut down and halt. When shutting down a single system, the shutdown command sends a SIGTERM signal to the init process, which brings it to single-user mode, and then issues a halt command. However, if the -s option is specified with the -h option, the shutdown command executes the run-level transition scripts (and does not send the SIGTERM signal) before halting the system. Because halt is the only option when shutting down an entire cluster, the -h option is invoked by default when the -c option is specified. Additionally, executing the run-level scripts is mandatory in a clusterwide shutdown, thus the -s option is invoked by default, too. Sends shutdown messages to users, warning them of an impending shutdown. However, the system does not actually shut down. The /etc/nologin_hostname file is not created. This option is incompatible with the -c option. Bypasses the normal synchronization (syncing) of disks before stopping the system. The -n option is incompatible with the -f and -c options. Causes the system to shut down and reboot. The shutdown command accomplishes this by sending a SIGTERM signal to the init process, which brings it to single-user mode, and then issues the reboot command. However, if the -s option is specified with the -h option, the shutdown command executes the run- level transition scripts (and does not send the SIGTERM signal) before rebooting the system. This option is incompatible with the -c option. Executes the stop entry point of the run-level transition scripts in /sbin/rc0.d/[Knn_name], /sbin/rc2.d/[Knn_name], and /sbin/rc3.d/[Knn_name] (for example, the stop entry point of /sbin/rc0.d/K45sys- log). The run level at which the shutdown command is invoked determines which scripts are executed. If the current run level is level 3 or higher, the Knn_name scripts from all three directories are run. If the run level is 2, then only scripts from /sbin/rc0.d and /sbin/rc2.d are run. If the run level is 1, only scripts from /sbin/rc0.d are run. This option is optional for single-system shutdowns but is invoked by default for clusterwide shutdowns. It can be used only with the -r, -c, or -h options. DESCRIPTION
The shutdown command provides an automated shutdown procedure. You must be root to use this command. When shutting down a single system, use the shutdown command shown in the first format line in the SYNOPSIS section. If the -s option is not specified, the shutdown command sends a SIGTERM signal to the init process, which shuts the system down to single-user mode. It then halts the system, reboots it, or does nothing, depending upon whether the -h, -r, or neither option is specified: If the -h option is spec- ified, the system is shut down to single-user mode and then halted. If the -r option is specified, the system is shut down to single-user mode and rebooted. If neither the -h or -r options is specified, the system is shut down to and remains in single-user mode. If you specify the -s option with the -h or -r option, the shutdown command does not send the SIGTERM signal prior to halting or rebooting the system. Rather, it executes the stop entry point of the run level transition scripts in /sbin/rc0.d/[Knn_name], /sbin/rc2.d/[Knn_name], and /sbin/rc3.d/[Knn_name]. The run level at which the shutdown command is invoked determines which scripts are executed. When shutting down an entire cluster, use the shutdown command shown in the second format line in the SYNOPSIS section: /usr/sbin/shutdown -c [-hs] time [warning-message ...] You must shut an entire cluster down to a halt. (Automatic reboots and shutting down to single user mode are not supported.) If you specify the -c option, the -h and -s options are invoked by default. The shutdown process is similar for single-system and cluster shutdowns. Five minutes before shutdown (or immediately, if shutdown is in less than five minutes) the shutdown command creates the /etc/nologin_hostname file (or /etc/nologin in the case of a clusterwide shutdown) and copies the warning-message and time of the shutdown to it. If a user subsequently attempts to log in, the login program checks for the existence of /etc/nologin_hostname or /etc/nologin as appropri- ate, prints the contents, and exits. The shutdown command removes the /etc/nologin_hostname or /etc/nologin file just before it exits. Similarly, when the shutdown command is invoked with the -c option to shut down an entire cluster, the shutdown command creates the /clus- ter/admin/.clu_shutdown_file file and copies the command parameters to it. The existence of this file prevents new members from joining a cluster while a clusterwide shutdown is in progress. It also prevents multiple clusterwide shutdowns from occurring simultaneously. The time parameter establishes a "grace period" during which you can cancel a shutdown. You must not abort a shutdown process once the grace period ends and the shutdown actually begins. To cancel a system or cluster shutdown during the grace period, use the following procedure: From the system on which you executed the shutdown command, identify the shutdown processes. There is a single shutdown process for /usr/sbin/shutdown; in a cluster, there may also be a /usr/sbin/clu_shutdown process. For example: # ps ax | grep -v grep | grep shutdown 14680 ttyp5 I < 0:00.01 /usr/sbin/shutdown +20 going down 14687 ttyp5 I < 0:00.01 /usr/sbin/clu_shutdown Terminate all of them by specifying their PIDs in a kill command. For example: # kill 14680 14687 If you kill the shutdown processes during the grace period, the shutdown is canceled and the /etc/nologin_host- name file is removed. In a clusterwide shutdown, the /etc/nologin and /cluster/admin/.clu_shutdown_file files are removed. Warning If a clusterwide shutdown does not run to completion, the remaining members might be left in a state with quorum checking turned off. Logins, member boots, and additional clusterwide shutdowns might all be disabled. To clear this state, you must manually shut down the remaining members one at a time (for example, by using the shutdown -h command) before resuming cluster operation. Failure to do so can lead to unpredictable cluster operation and possible data corruption. In the rare event that a member does not respond to the shutdown -h command, use the /usr/sbin/halt command to halt it. (If you must halt multiple members in this manner, halt them one at a time.) As a final resort, press the member's halt button to halt it and then crash the system at the console prompt to create a crash dump. At shutdown time, the shutdown command writes a message to the system log. This message states the time of the shutdown, who ran the shut- down command, and the reason. FILES
Specifies the command path. Location of the nologin file for a clusterwide shutdown. Location of the nologin file for a nonclustered system. For example, /etc/nologin_sys5.zk3.dec.com. Contains parameters associated with a clusterwide shutdown. This file is locked during a clusterwide shutdown to prevent multiple simulta- neous clusterwide shutdowns and to keep new members from joining the cluster during the shutdown. A record of all clusterwide shutdowns for the cluster is written to this file. Clusterwide shutdown script called by the shutdown command. RELATED INFORMATION
Commands: fastboot(8), fasthalt(8), halt(8), login(1), reboot(8), wall(1) delim off shutdown(8)
All times are GMT -4. The time now is 11:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy